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-07-26 12:34:21 +00:00
|
|
|
Release: 5%{?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
|
|
|
|
|
2019-07-02 14:53:05 +00:00
|
|
|
# We keep them here for now to avoid one loop of %%generate_buildrequires
|
|
|
|
# And to allow the other macros without %%pyproject_buildrequires (e.g. on Fedora 30)
|
|
|
|
# But those are also always in the output of %%generate_buildrequires
|
|
|
|
# in order to be removable in the future
|
2019-07-02 10:41:04 +00:00
|
|
|
Requires: python3-pip >= 19
|
|
|
|
Requires: python3-devel
|
|
|
|
|
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)
|
|
|
|
BuildRequires: python3dist(pytoml)
|
|
|
|
BuildRequires: python3dist(pip)
|
2019-07-17 16:16:16 +00:00
|
|
|
BuildRequires: python3dist(setuptools)
|
2019-07-26 12:34:21 +00:00
|
|
|
BuildRequires: python3dist(tox-current-env)
|
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-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 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
|