Initial package forked from EPEL 9

This has been forked from 3196f17ff4

Changes initially proposed via https://src.fedoraproject.org/rpms/python-flit-core/pull-request/12
This commit is contained in:
Miro Hrončok 2023-11-20 13:19:18 +01:00
parent 7f3fb03d83
commit f2c877989e
4 changed files with 138 additions and 0 deletions

22
.gitignore vendored
View File

@ -0,0 +1,22 @@
/flit-0.9.tar.gz
/flit-0.11.1.tar.gz
/flit-0.11.4.tar.gz
/flit-0.12.tar.gz
/flit-0.12.1.tar.gz
/flit-0.12.2.tar.gz
/flit-0.13.tar.gz
/flit-1.0.tar.gz
/flit-1.1.tar.gz
/flit-1.3.tar.gz
/flit-2.1.0.tar.gz
/flit-2.2.0.tar.gz
/flit-2.3.0.tar.gz
/flit-3.0.0.tar.gz
/flit-3.2.0.tar.gz
/flit-3.3.0.tar.gz
/flit-3.4.0.tar.gz
/flit-3.5.1.tar.gz
/flit-3.7.1.tar.gz
/flit-3.8.0.tar.gz
/flit_core-3.8.0.tar.gz
/flit_core-3.9.0.tar.gz

98
python-flit-core.spec Normal file
View File

@ -0,0 +1,98 @@
# Tests are disabled by default, unless on EPEL.
# We don't have testpath in RHEL 9.
%bcond tests %{defined epel}
Name: python-flit-core
Version: 3.9.0
Release: 5%{?dist}
Summary: PEP 517 build backend for packages using Flit
# flit-core is BSD-3-Clause
# flit_core/versionno.py contains a regex that is from packaging, BSD-2-Clause
License: BSD
URL: https://flit.pypa.io/
Source: %{pypi_source flit_core}
BuildArch: noarch
BuildRequires: python3-devel
%if %{with tests}
BuildRequires: python3-pytest
# Test deps that require flit-core to build:
BuildRequires: python3-testpath
%endif
%global _description %{expand:
This provides a PEP 517 build backend for packages using Flit.
The only public interface is the API specified by PEP 517,
at flit_core.buildapi.}
%description %_description
%package -n python3-flit-core
Summary: %{summary}
Conflicts: python3-flit < 2.1.0-2
%description -n python3-flit-core %_description
%prep
%autosetup -p1 -n flit_core-%{version}
# Add tomli to build-system.requires and project.dependencies to account for
# our tomli unbundling.
# tomllib is a part of standard library since Python 3.11, so we only need this
# for python_version<'3.11'.
sed -i 's/^\(dependencies\|requires\) = \[\]/\1 = ["tomli; python_version<'\'3.11\''"]/' pyproject.toml
# 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).
rm -rf flit_core/vendor
%generate_buildrequires
%pyproject_buildrequires
%build
%pyproject_wheel
%install
%pyproject_install
# 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 flit_core.buildapi
%if %{with tests}
%pytest
%endif
%files -n python3-flit-core
%license LICENSE
%doc README.rst
%{python3_sitelib}/flit_core-*.dist-info/
%{python3_sitelib}/flit_core/
%changelog
* Mon Oct 16 2023 Miro Hrončok <mhroncok@redhat.com> - 3.9.0-5
- Initial package for RHEL 9
- Resolves: RHEL-12338
- Fedora+EPEL contributions by:
Charalampos Stratakis <cstratak@redhat.com>
Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Karolina Surma <ksurma@redhat.com>
Lumir Balhar <lbalhar@redhat.com>
Maxwell G <gotmax@e.email>
Michel Alexandre Salim <salimma@fedoraproject.org>
Miro Hrončok <miro@hroncok.cz>
Mukundan Ragavan <nonamedotc@fedoraproject.org>
Tomáš Hrnčiar <thrnciar@redhat.com>
Yaakov Selkowitz <yselkowi@redhat.com>

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (flit_core-3.9.0.tar.gz) = 1205589930d2c51d6aa6b2533a122a912e63b157e94adba2a0649a58d324fa98a5b84609d9b53e9d236f1cdb6a6984de2cefcf2f11abc2cd83956df21f269ad6

17
tests/tests.yml Normal file
View File

@ -0,0 +1,17 @@
---
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
repositories:
- repo: "https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git"
dest: "pyproject-rpm-macros"
tests:
- pyproject_entrypoints:
dir: pyproject-rpm-macros/tests
run: ./mocktest.sh python-entrypoints
required_packages:
- mock
- rpmdevtools
- rpm-build