2020-10-14 23:43:13 +00:00
|
|
|
Name: pyproject-rpm-macros
|
|
|
|
Summary: RPM macros for PEP 517 Python packages
|
|
|
|
License: MIT
|
|
|
|
|
2021-03-08 18:09:15 +00:00
|
|
|
# Disable tests on RHEL9 as to not pull in the test dependencies
|
|
|
|
# Specify --with tests to run the tests e.g. on EPEL
|
|
|
|
%bcond_with tests
|
|
|
|
|
|
|
|
# Keep the version at zero and increment only release.
|
|
|
|
# The release number indicates the feature set so only
|
|
|
|
# increment it when syncing or rebasing from Fedora.
|
|
|
|
# In other cases, such as backports, increment the point
|
|
|
|
# release.
|
2020-10-14 23:43:13 +00:00
|
|
|
Version: 0
|
2021-07-23 08:00:01 +00:00
|
|
|
Release: 46%{?dist}
|
2020-10-14 23:43:13 +00:00
|
|
|
|
|
|
|
# Macro files
|
|
|
|
Source001: macros.pyproject
|
|
|
|
|
|
|
|
# Implementation files
|
|
|
|
Source101: pyproject_buildrequires.py
|
|
|
|
Source102: pyproject_save_files.py
|
2021-02-04 13:32:12 +00:00
|
|
|
Source103: pyproject_convert.py
|
|
|
|
Source104: pyproject_preprocess_record.py
|
|
|
|
Source105: pyproject_construct_toxenv.py
|
2021-07-23 08:00:01 +00:00
|
|
|
Source106: pyproject_requirements_txt.py
|
2020-10-14 23:43:13 +00:00
|
|
|
|
|
|
|
# Tests
|
|
|
|
Source201: test_pyproject_buildrequires.py
|
|
|
|
Source202: test_pyproject_save_files.py
|
2021-07-23 08:00:01 +00:00
|
|
|
Source203: test_pyproject_requirements_txt.py
|
2020-10-14 23:43:13 +00:00
|
|
|
|
|
|
|
# Test data
|
|
|
|
Source301: pyproject_buildrequires_testcases.yaml
|
|
|
|
Source302: pyproject_save_files_test_data.yaml
|
|
|
|
Source303: test_RECORD
|
|
|
|
|
|
|
|
# Metadata
|
|
|
|
Source901: README.md
|
|
|
|
Source902: LICENSE
|
|
|
|
|
|
|
|
URL: https://src.fedoraproject.org/rpms/pyproject-rpm-macros
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
BuildRequires: python3dist(pytest)
|
|
|
|
BuildRequires: python3dist(pyyaml)
|
|
|
|
BuildRequires: python3dist(packaging)
|
|
|
|
BuildRequires: python3dist(pip)
|
|
|
|
BuildRequires: python3dist(setuptools)
|
|
|
|
BuildRequires: python3dist(toml)
|
2021-04-07 14:01:33 +00:00
|
|
|
BuildRequires: python3dist(tox-current-env) >= 0.0.6
|
2020-10-14 23:43:13 +00:00
|
|
|
BuildRequires: python3dist(wheel)
|
|
|
|
%endif
|
|
|
|
|
2021-07-17 13:05:33 +00:00
|
|
|
# We build on top of those:
|
|
|
|
Requires: python-rpm-macros
|
|
|
|
Requires: python-srpm-macros
|
|
|
|
Requires: python3-rpm-macros
|
|
|
|
|
2020-10-14 23:43:13 +00:00
|
|
|
|
|
|
|
%description
|
2021-02-04 13:32:12 +00:00
|
|
|
These macros allow projects that follow the Python packaging specifications
|
|
|
|
to be packaged as RPMs.
|
|
|
|
|
|
|
|
They are still provisional: we can make non-backwards-compatible changes to
|
|
|
|
the API.
|
|
|
|
Please subscribe to Fedora's python-devel list if you use the macros.
|
|
|
|
|
|
|
|
They work for:
|
|
|
|
|
|
|
|
* traditional Setuptools-based projects that use the setup.py file,
|
|
|
|
* newer Setuptools-based projects that have a setup.cfg file,
|
|
|
|
* general Python projects that use the PEP 517 pyproject.toml file
|
|
|
|
(which allows using any build system, such as setuptools, flit or poetry).
|
|
|
|
|
|
|
|
These macros replace %%py3_build and %%py3_install,
|
|
|
|
which only work with setup.py.
|
2020-10-14 23:43:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
# Not strictly necessary but allows working on file names instead
|
|
|
|
# of source numbers in install section
|
|
|
|
%setup -c -T
|
|
|
|
cp -p %{sources} .
|
|
|
|
|
|
|
|
%build
|
|
|
|
# nothing to do, sources are not buildable
|
|
|
|
|
|
|
|
%install
|
|
|
|
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/
|
2021-02-04 13:32:12 +00:00
|
|
|
install -m 644 pyproject_convert.py %{buildroot}%{_rpmconfigdir}/redhat/
|
2020-10-14 23:43:13 +00:00
|
|
|
install -m 644 pyproject_save_files.py %{buildroot}%{_rpmconfigdir}/redhat/
|
2021-02-04 13:32:12 +00:00
|
|
|
install -m 644 pyproject_preprocess_record.py %{buildroot}%{_rpmconfigdir}/redhat/
|
|
|
|
install -m 644 pyproject_construct_toxenv.py %{buildroot}%{_rpmconfigdir}/redhat/
|
2021-07-23 08:00:01 +00:00
|
|
|
install -m 644 pyproject_requirements_txt.py %{buildroot}%{_rpmconfigdir}/redhat/
|
2020-10-14 23:43:13 +00:00
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
%check
|
|
|
|
export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856356
|
|
|
|
%{python3} -m pytest -vv --doctest-modules
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%{_rpmmacrodir}/macros.pyproject
|
|
|
|
%{_rpmconfigdir}/redhat/pyproject_buildrequires.py
|
2021-02-04 13:32:12 +00:00
|
|
|
%{_rpmconfigdir}/redhat/pyproject_convert.py
|
2020-10-14 23:43:13 +00:00
|
|
|
%{_rpmconfigdir}/redhat/pyproject_save_files.py
|
2021-02-04 13:32:12 +00:00
|
|
|
%{_rpmconfigdir}/redhat/pyproject_preprocess_record.py
|
|
|
|
%{_rpmconfigdir}/redhat/pyproject_construct_toxenv.py
|
2021-07-23 08:00:01 +00:00
|
|
|
%{_rpmconfigdir}/redhat/pyproject_requirements_txt.py
|
2020-10-14 23:43:13 +00:00
|
|
|
|
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
|
|
|
|
|
|
|
%changelog
|
2021-07-23 08:00:01 +00:00
|
|
|
* Fri Jul 23 2021 Miro Hrončok <miro@hroncok.cz> - 0-46
|
|
|
|
- %%pyproject_buildrequires now fails when it encounters an invalid requirement
|
2021-07-23 08:01:13 +00:00
|
|
|
- Rename %%_pyproject_ghost_distinfo and %%_pyproject_record to indicate they are private
|
2021-07-23 11:30:43 +00:00
|
|
|
- Automatically detect LICENSE files and mark them with %%license macro
|
2021-07-23 08:00:01 +00:00
|
|
|
|
2021-07-23 04:29:49 +00:00
|
|
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0-45
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
2021-07-16 22:36:57 +00:00
|
|
|
* Fri Jul 09 2021 Python Maint <python-maint@redhat.com> - 0-44
|
2021-07-13 09:29:19 +00:00
|
|
|
- Escape weird paths generated by %%pyproject_save_files
|
2021-07-13 10:23:35 +00:00
|
|
|
- Support x.* versions in %%pyproject_buildrequires
|
2021-07-16 22:36:57 +00:00
|
|
|
- %%pyproject_buildrequires fallbacks to setuptools only if setup.py exists
|
2021-07-17 13:05:33 +00:00
|
|
|
- Explicitly require the "basic" Python RPM macros
|
2021-08-10 00:06:40 +00:00
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
2021-07-08 11:08:04 +00:00
|
|
|
* Thu Jul 01 2021 Tomas Hrnciar <thrnciar@redhat.com> - 0-43
|
|
|
|
- Generate BuildRequires from file
|
|
|
|
|
2021-06-29 10:43:13 +00:00
|
|
|
* Tue Jun 29 2021 Miro Hrončok <mhroncok@redhat.com> - 0-42
|
|
|
|
- Don't accidentally treat "~= X.0" requirement as "~= X"
|
|
|
|
- Fixes rhzb#1977060
|
|
|
|
|
2021-06-28 12:07:29 +00:00
|
|
|
* Mon Jun 28 2021 Miro Hrončok <mhroncok@redhat.com> - 0-41
|
|
|
|
- Don't leak %%{_pyproject_builddir} to pytest collection
|
|
|
|
|
2021-05-27 19:28:01 +00:00
|
|
|
* Thu May 27 2021 Miro Hrončok <mhroncok@redhat.com> - 0-40
|
|
|
|
- Don't leak $TMPDIR outside of pyproject macros
|
2021-05-27 19:28:01 +00:00
|
|
|
- Set %%_pyproject_wheeldir and %%_pyproject_builddir relative to the source tree, not $PWD
|
2021-05-27 19:28:01 +00:00
|
|
|
|
2021-04-07 14:01:33 +00:00
|
|
|
* Thu Apr 22 2021 Miro Hrončok <mhroncok@redhat.com> - 0-39.2
|
|
|
|
- Handle tox provision (tox.requires / tox.minversion)
|
2021-04-07 14:25:06 +00:00
|
|
|
- Generate BuildRequires on extras in lower case
|
|
|
|
- Fixes: rhbz#1947074
|
2021-04-07 14:01:33 +00:00
|
|
|
|
2021-04-16 04:10:31 +00:00
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0-39.1
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
2021-04-22 16:07:35 +00:00
|
|
|
* Mon Mar 08 2021 Charalampos Stratakis <cstratak@redhat.com> - 0-38.1
|
2021-03-08 18:09:15 +00:00
|
|
|
- Disable tests on RHEL9 to remove tox dependency
|
|
|
|
|
2021-02-11 16:56:05 +00:00
|
|
|
* Sun Feb 07 2021 Miro Hrončok <mhroncok@redhat.com> - 0-38
|
|
|
|
- Include nested __pycache__ directories in %%pyproject_save_files
|
|
|
|
- Fixes: rhbz#1925963
|
|
|
|
|
2021-02-04 13:32:12 +00:00
|
|
|
* Tue Feb 02 2021 Miro Hrončok <mhroncok@redhat.com> - 0-37
|
|
|
|
- Remove support for Python 3.7 from %%pyproject_buildrequires
|
|
|
|
- Generate python3dist(toml) BR with pyproject.toml earlier to avoid extra install round
|
|
|
|
- Generate python3dist(setutpools/wheel) BR without pyproject.toml earlier as well
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0-36
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
* Fri Jan 15 2021 Miro Hrončok <mhroncok@redhat.com> - 0-35
|
|
|
|
- Update the description of the package to match the new README content
|
|
|
|
|
|
|
|
* Fri Dec 04 2020 Miro Hrončok <miro@hroncok.cz> - 0-34
|
|
|
|
- List all files in %%pyproject_files explicitly to avoid duplicate %%lang entries
|
|
|
|
- If you amend the installed files after %%pyproject_install, %%pyproject_files might break
|
|
|
|
|
|
|
|
* Fri Nov 27 2020 Miro Hrončok <mhroncok@redhat.com> - 0-33
|
|
|
|
- Pass PYTHONDONTWRITEBYTECODE=1 to %%tox to avoid packaged PYTEST bytecode
|
|
|
|
|
|
|
|
* Tue Nov 03 2020 Miro Hrončok <mhroncok@redhat.com> - 0-32
|
|
|
|
- Allow multiple -e in %%pyproject_buildrequires
|
|
|
|
- Fixes: rhbz#1886509
|
|
|
|
|
|
|
|
* Mon Oct 05 2020 Miro Hrončok <mhroncok@redhat.com> - 0-31
|
|
|
|
- Support PEP 517 list based backend-path
|
|
|
|
|
|
|
|
* Tue Sep 29 2020 Lumír Balhar <lbalhar@redhat.com> - 0-30
|
|
|
|
- Process RECORD files in %%pyproject_install and remove them
|
|
|
|
- Support the extras configuration option of tox in %%pyproject_buildrequires -t
|
|
|
|
- Support multiple -x options for %%pyproject_buildrequires
|
|
|
|
- Fixes: rhbz#1877977
|
|
|
|
- Fixes: rhbz#1877978
|
|
|
|
|
|
|
|
* Wed Sep 23 2020 Miro Hrončok <mhroncok@redhat.com> - 0-29
|
|
|
|
- Check the requirements after installing "requires_for_build_wheel"
|
|
|
|
- If not checked, installing runtime requirements might fail
|
|
|
|
|
|
|
|
* Tue Sep 08 2020 Gordon Messmer <gordon.messmer@gmail.com> - 0-28
|
|
|
|
- Support more Python version specifiers in generated BuildRequires
|
|
|
|
- This adds support for the '~=' operator and wildcards
|
|
|
|
|
|
|
|
* Fri Sep 04 2020 Miro Hrončok <miro@hroncok.cz> - 0-27
|
|
|
|
- Make code in $PWD importable from %%pyproject_buildrequires
|
|
|
|
- Only require toml for projects with pyproject.toml
|
|
|
|
- Remove a no longer useful warning for unrecognized files in %%pyproject_save_files
|
|
|
|
|
|
|
|
* Mon Aug 24 2020 Tomas Hrnciar <thrnciar@redhat.com> - 0-26
|
|
|
|
- Implement automatic detection of %%lang files in %%pyproject_save_files
|
|
|
|
and mark them with %%lang in filelist
|
|
|
|
|
|
|
|
* Fri Aug 14 2020 Miro Hrončok <mhroncok@redhat.com> - 0-25
|
|
|
|
- Handle Python Extras in %%pyproject_buildrequires on Fedora 33+
|
2020-12-09 18:42:29 +00:00
|
|
|
|
2020-10-14 23:43:13 +00:00
|
|
|
* Tue Aug 11 2020 Miro Hrončok <mhroncok@redhat.com> - 0-24
|
|
|
|
- Allow multiple, comma-separated extras in %%pyproject_buildrequires -x
|
|
|
|
|
|
|
|
* Mon Aug 10 2020 Lumír Balhar <lbalhar@redhat.com> - 0-23
|
|
|
|
- Make macros more universal for alternative Python stacks
|
|
|
|
|
|
|
|
* Thu Aug 06 2020 Tomas Hrnciar <thrnciar@redhat.com> - 0-22
|
|
|
|
- Change %%pyproject_save_files +bindir argument to +auto
|
|
|
|
to list all unclassified files in filelist
|
|
|
|
|
|
|
|
* Tue Aug 04 2020 Miro Hrončok <mhroncok@redhat.com> - 0-21
|
|
|
|
- Actually implement %%pyproject_extras_subpkg
|
|
|
|
|
|
|
|
* Wed Jul 29 2020 Miro Hrončok <mhroncok@redhat.com> - 0-20
|
|
|
|
- Implement %%pyproject_extras_subpkg
|
|
|
|
|
|
|
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-19
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
* Thu Jul 16 2020 Miro Hrončok <mhroncok@redhat.com> - 0-18
|
|
|
|
- %%pyproject_buildrequires -x (extras requires for tests) now implies -r
|
|
|
|
(runtime requires) instead of erroring without it for better UX.
|
|
|
|
|
|
|
|
* Wed Jul 15 2020 Miro Hrončok <mhroncok@redhat.com> - 0-17
|
|
|
|
- Set HOSTNAME to prevent tox 3.17+ from a DNS query
|
|
|
|
- Fixes rhbz#1856356
|
|
|
|
|
|
|
|
* Fri Jun 19 2020 Miro Hrončok <mhroncok@redhat.com> - 0-16
|
|
|
|
- Switch from upstream deprecated pytoml to toml
|
|
|
|
|
|
|
|
* Thu May 07 2020 Tomas Hrnciar <thrnciar@redhat.com> - 0-15
|
|
|
|
- Adapt %%pyproject_install not to create a PEP 610 direct_url.json file
|
|
|
|
|
|
|
|
* Wed Apr 15 2020 Patrik Kopkan <pkopkan@redhat.com> - 0-14
|
|
|
|
- Add %%pyproject_save_file macro for generating file section
|
|
|
|
- Handle extracting debuginfo from extension modules (#1806625)
|
|
|
|
|
|
|
|
* Mon Mar 02 2020 Miro Hrončok <mhroncok@redhat.com> - 0-13
|
|
|
|
- Tox dependency generator: Handle deps read in from a text file (#1808601)
|
|
|
|
|
|
|
|
* Wed Feb 05 2020 Miro Hrončok <mhroncok@redhat.com> - 0-12
|
|
|
|
- Fallback to setuptools.build_meta:__legacy__ backend instead of setuptools.build_meta
|
|
|
|
- Properly handle backends with colon
|
|
|
|
- Preserve existing flags in shebangs of Python files in /usr/bin
|
|
|
|
|
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0-11
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
* Fri Nov 15 2019 Patrik Kopkan <pkopkan@redhat.com> - 0-10
|
|
|
|
- Install wheel in '$PWD/pyproject-macros-wheeldir' to have more explicit path from which we install.
|
|
|
|
- The path can be changed by redefining %%_pyproject_wheeldir.
|
|
|
|
|
|
|
|
* Wed Nov 13 2019 Anna Khaitovich <akhaitov@redhat.com> - 0-9
|
|
|
|
- Remove stray __pycache__ directory from /usr/bin when running %%pyproject_install
|
|
|
|
|
|
|
|
* Fri Oct 25 2019 Miro Hrončok <mhroncok@redhat.com> - 0-8
|
|
|
|
- When tox fails, print tox output before failing
|
|
|
|
|
|
|
|
* Tue Oct 08 2019 Miro Hrončok <mhroncok@redhat.com> - 0-7
|
|
|
|
- Move a verbose line of %%pyproject_buildrequires from stdout to stderr
|
|
|
|
|
|
|
|
* Fri Jul 26 2019 Petr Viktorin <pviktori@redhat.com> - 0-6
|
|
|
|
- Use importlib_metadata rather than pip freeze
|
|
|
|
|
|
|
|
* Fri Jul 26 2019 Miro Hrončok <mhroncok@redhat.com> - 0-5
|
|
|
|
- Allow to fetch test dependencies from tox
|
|
|
|
- Add %%tox macro to invoke tests
|
|
|
|
|
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-4
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
* Tue Jul 02 2019 Miro Hrončok <mhroncok@redhat.com> - 0-3
|
|
|
|
- Add %%pyproject_buildrequires
|
|
|
|
|
|
|
|
* 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
|
|
|
|
|
|
|
|
* Fri Jun 28 2019 Patrik Kopkan <pkopkan@redhat.com> - 0-1
|
|
|
|
- created package
|