2019-07-02 10:41:04 +00:00
|
|
|
Name: pyproject-rpm-macros
|
2019-07-02 14:53:05 +00:00
|
|
|
Summary: RPM macros for PEP 517 Python packages
|
2019-07-02 10:41:04 +00:00
|
|
|
License: MIT
|
2019-07-02 14:53:05 +00:00
|
|
|
|
2019-07-17 15:34:24 +00:00
|
|
|
%bcond_without tests
|
|
|
|
|
2019-07-02 14:53:05 +00:00
|
|
|
# Keep the version at zero and increment only release
|
|
|
|
Version: 0
|
2019-10-08 11:01:08 +00:00
|
|
|
Release: 7%{?dist}
|
2019-07-02 14:53:05 +00:00
|
|
|
|
2019-07-02 10:41:04 +00:00
|
|
|
Source0: macros.pyproject
|
2019-07-02 14:53:05 +00:00
|
|
|
Source1: pyproject_buildrequires.py
|
|
|
|
|
|
|
|
Source8: README.md
|
|
|
|
Source9: LICENSE
|
|
|
|
|
2019-07-17 13:44:22 +00:00
|
|
|
Source10: test_pyproject_buildrequires.py
|
|
|
|
Source11: testcases.yaml
|
|
|
|
|
2019-07-02 11:05:10 +00:00
|
|
|
URL: https://src.fedoraproject.org/rpms/pyproject-rpm-macros
|
2019-07-02 14:53:05 +00:00
|
|
|
|
2019-07-02 10:41:04 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
Requires: python3-pip >= 19
|
|
|
|
Requires: python3-devel
|
|
|
|
|
2019-08-10 12:34:24 +00:00
|
|
|
# We keep these here for now to avoid one loop of %%generate_buildrequires
|
|
|
|
# But those are also always in the output of %%generate_buildrequires
|
|
|
|
# in order to be removable in the future
|
|
|
|
Requires: python3dist(packaging)
|
|
|
|
Requires: python3dist(pytoml)
|
|
|
|
|
|
|
|
# This is not output from %%generate_buildrequires to work around:
|
|
|
|
# https://github.com/rpm-software-management/mock/issues/336
|
|
|
|
Requires: (python3dist(importlib-metadata) if python3 < 3.8)
|
|
|
|
|
2019-07-17 15:34:24 +00:00
|
|
|
%if %{with tests}
|
2019-07-17 13:44:22 +00:00
|
|
|
BuildRequires: python3dist(pytest)
|
|
|
|
BuildRequires: python3dist(pyyaml)
|
|
|
|
BuildRequires: python3dist(packaging)
|
2019-08-10 12:34:24 +00:00
|
|
|
%if 0%{fedora} < 32
|
|
|
|
# The %%if should not be needed, it works around:
|
|
|
|
# https://github.com/rpm-software-management/mock/issues/336
|
|
|
|
BuildRequires: (python3dist(importlib-metadata) if python3 < 3.8)
|
|
|
|
%endif
|
2019-07-17 13:44:22 +00:00
|
|
|
BuildRequires: python3dist(pytoml)
|
|
|
|
BuildRequires: python3dist(pip)
|
2019-07-17 16:16:16 +00:00
|
|
|
BuildRequires: python3dist(setuptools)
|
2019-08-13 12:42:21 +00:00
|
|
|
BuildRequires: python3dist(tox-current-env) >= 0.0.2
|
2019-07-17 16:16:16 +00:00
|
|
|
BuildRequires: python3dist(wheel)
|
2019-07-17 15:34:24 +00:00
|
|
|
%endif
|
2019-07-17 13:44:22 +00:00
|
|
|
|
|
|
|
|
2019-07-02 10:41:04 +00:00
|
|
|
%description
|
|
|
|
This is a provisional implementation of pyproject RPM macros for Fedora 30+.
|
|
|
|
These macros are useful for packaging Python projects that use the PEP 517
|
|
|
|
pyproject.toml file, which specifies the package's build dependencies
|
|
|
|
(including the build system, such as setuptools, flit or poetry).
|
|
|
|
|
2019-07-02 14:53:05 +00:00
|
|
|
|
2019-07-02 10:41:04 +00:00
|
|
|
%prep
|
2019-07-02 11:40:47 +00:00
|
|
|
# Not strictly necessary but allows working on file names instead
|
|
|
|
# of source numbers in install section
|
|
|
|
%setup -c -T
|
|
|
|
cp -p %{sources} .
|
2019-07-02 10:41:04 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
# nothing to do, sources are not buildable
|
|
|
|
|
|
|
|
%install
|
2019-07-02 14:53:05 +00:00
|
|
|
mkdir -p %{buildroot}%{_rpmmacrodir}
|
|
|
|
mkdir -p %{buildroot}%{_rpmconfigdir}/redhat
|
|
|
|
install -m 644 macros.pyproject %{buildroot}%{_rpmmacrodir}/
|
|
|
|
install -m 644 pyproject_buildrequires.py %{buildroot}%{_rpmconfigdir}/redhat/
|
2019-07-02 10:41:04 +00:00
|
|
|
|
2019-07-17 15:34:24 +00:00
|
|
|
%if %{with tests}
|
2019-07-17 13:44:22 +00:00
|
|
|
%check
|
|
|
|
%{__python3} -m pytest -vv
|
2019-07-17 15:34:24 +00:00
|
|
|
%endif
|
2019-07-17 13:44:22 +00:00
|
|
|
|
|
|
|
|
2019-07-02 10:41:04 +00:00
|
|
|
%files
|
|
|
|
%{_rpmmacrodir}/macros.pyproject
|
2019-07-02 14:53:05 +00:00
|
|
|
%{_rpmconfigdir}/redhat/pyproject_buildrequires.py
|
2019-07-02 10:41:04 +00:00
|
|
|
|
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
|
|
|
|
|
|
|
%changelog
|
2019-10-08 11:01:08 +00:00
|
|
|
* Tue Oct 08 2019 Miro Hrončok <mhroncok@redhat.com> - 0-7
|
|
|
|
- Move a verbose line of %%pyproject_buildrequires from stdout to stderr
|
|
|
|
|
2019-09-20 08:18:12 +00:00
|
|
|
* Fri Jul 26 2019 Petr Viktorin <pviktori@redhat.com> - 0-6
|
|
|
|
- Use importlib_metadata rather than pip freeze
|
|
|
|
|
2019-07-26 12:34:21 +00:00
|
|
|
* Fri Jul 26 2019 Miro Hrončok <mhroncok@redhat.com> - 0-5
|
|
|
|
- Allow to fetch test dependencies from tox
|
2019-07-26 15:50:36 +00:00
|
|
|
- Add %%tox macro to invoke tests
|
2019-07-26 12:34:21 +00:00
|
|
|
|
2019-07-26 11:47:03 +00:00
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-4
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
2019-07-02 14:53:05 +00:00
|
|
|
* Tue Jul 02 2019 Miro Hrončok <mhroncok@redhat.com> - 0-3
|
|
|
|
- Add %%pyproject_buildrequires
|
|
|
|
|
2019-07-02 12:02:54 +00:00
|
|
|
* Tue Jul 02 2019 Miro Hrončok <mhroncok@redhat.com> - 0-2
|
|
|
|
- Fix shell syntax errors in %%pyproject_install
|
|
|
|
- Drop PATH warning in %%pyproject_install
|
2019-07-02 10:41:04 +00:00
|
|
|
|
|
|
|
* Fri Jun 28 2019 Patrik Kopkan <pkopkan@redhat.com> - 0-1
|
|
|
|
- created package
|