# This specfile is licensed under: # SPDX-License-Identifier: MIT # License text: https://spdx.org/licenses/MIT.html # SPDX-FileCopyrightText: Fedora Project Authors # SPDX-FileCopyrightText: 2022 Maxwell G %global python3_pkgversion 3.11 %bcond_with tests Name: python%{python3_pkgversion}-flit-core-epel Version: 3.9.0 Release: 1~bootstrap%{?dist} Summary: Simplified packaging of Python modules # flit-core is BSD-3-Clause # flit_core/versionno.py contains a regex that is from packaging, BSD-2-Clause License: BSD-3-Clause AND BSD-2-Clause URL: https://github.com/pypa/flit Source0: %{pypi_source flit_core} # The README was in the sdist for the previous release, # but it's not in this one :(. Source1: %{url}/raw/%{version}/flit_core/README.rst#/README.rst.upstream BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel # Pip is needed for %%py3_install_wheel BuildRequires: python%{python3_pkgversion}-pip # Yes, we're intentionally depending on an old version, # as python3.11-rpm-macros has a broken %%py3_check_import. # See https://bugzilla.redhat.com/2207631. BuildRequires: python39-rpm-macros %if %{with tests} BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-testpath %endif %global _description %{expand: Flit is a simple way to put Python packages and modules on PyPI. Flit only creates packages in the new 'wheel' format. People using older versions of pip (<1.5) or easy_install will not be able to install them. Flit packages a single importable module or package at a time, using the import name as the name on PyPI. All sub-packages and data files within a package are included automatically. Flit requires Python 3, but you can use it to distribute modules for Python 2, so long as they can be imported on Python 3.} %description %_description %package -n python%{python3_pkgversion}-flit-core Summary: %{summary} %description -n python%{python3_pkgversion}-flit-core %_description %prep %autosetup -p1 -n flit_core-%{version} cp %{SOURCE1} . mv README.rst{.upstream,} # Remove vendored tomli that flit_core includes to solve the circular dependency on older Pythons # (flit_core requires tomli, but flit_core is needed to build tomli). # We don't use this, as tomllib is a part of standard library since Python 3.11. rm -rf flit_core/vendor %build %python3 -m flit_core.wheel %install %py3_install_wheel flit_core-%{version}-py3-none-any.whl DISTINFO=%{buildroot}%{python3_sitelib}/flit_core-%{version}.dist-info rm -rv "${DISTINFO}/RECORD" "${DISTINFO}/REQUESTED" echo rpm >"${DISTINFO}/INSTALLER" # don't ship tests in flit_core package # if upstream decides to change the installation, it can be removed: # https://github.com/takluyver/flit/issues/403 rm -r %{buildroot}%{python3_sitelib}/flit_core/tests/ %check %py3_check_import flit_core %if %{with tests} %pytest %endif %files -n python%{python3_pkgversion}-flit-core %doc README.rst %license LICENSE %{python3_sitelib}/flit_core/ %{python3_sitelib}/flit_core-%{version}.dist-info/ %changelog * Thu Jun 08 2023 Maxwell G - 3.9.0-1 - Update to 3.9.0. - Initial EPEL python3.11 package * Fri May 19 2023 Miro HronĨok - 3.8.0-3 - Adjust the License tag to include flit_core/versionno.py's regex (BSD-2-Clause) * Sat Nov 12 2022 Maxwell G - 3.8.0-1 - Update to 3.8.0. * Thu Oct 06 2022 Maxwell G - 3.7.1-1 - Initial EPEL 8 package (rhbz#2133111).