Port to pyproject-rpm-macros (“new Python guidelines”)
This commit is contained in:
parent
a8b60c242c
commit
cf62192b71
@ -17,14 +17,16 @@ Patch: fix-typecasts-s390x.patch
|
|||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
|
|
||||||
%description
|
%global _description %{expand:
|
||||||
It is the C based reader/scanner and emitter for ruamel.yaml.
|
It is the C based reader/scanner and emitter for ruamel.yaml.}
|
||||||
|
|
||||||
|
%description %{_description}
|
||||||
|
|
||||||
%package -n python3-ruamel-yaml-clib
|
%package -n python3-ruamel-yaml-clib
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-setuptools
|
BuildRequires: %{py3_dist Cython}
|
||||||
BuildRequires: python3-Cython
|
|
||||||
|
|
||||||
# Unfortunately, the circular dependency is intentional; the clib extension
|
# Unfortunately, the circular dependency is intentional; the clib extension
|
||||||
# packaged here imports from ruamel.yaml, which in turn uses the extension for
|
# packaged here imports from ruamel.yaml, which in turn uses the extension for
|
||||||
@ -48,8 +50,9 @@ Requires: python3-ruamel-yaml
|
|||||||
# Version number from VERSION in config.h:
|
# Version number from VERSION in config.h:
|
||||||
Provides: bundled(libyaml) = 0.1.7
|
Provides: bundled(libyaml) = 0.1.7
|
||||||
|
|
||||||
%description -n python3-ruamel-yaml-clib
|
%py_provides python3-ruamel.yaml.clib
|
||||||
It is the C based reader/scanner and emitter for ruamel.yaml.
|
|
||||||
|
%description -n python3-ruamel-yaml-clib %{_description}
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n ruamel-yaml-clib-code-%{commit}
|
%autosetup -n ruamel-yaml-clib-code-%{commit}
|
||||||
@ -57,6 +60,11 @@ It is the C based reader/scanner and emitter for ruamel.yaml.
|
|||||||
rm -v $(grep -rl '/\* Generated by Cython')
|
rm -v $(grep -rl '/\* Generated by Cython')
|
||||||
cp -p '%{SOURCE1}' .
|
cp -p '%{SOURCE1}' .
|
||||||
|
|
||||||
|
%generate_buildrequires
|
||||||
|
# Upstream has a tox.ini, but it is for a build-and-install check, not a test
|
||||||
|
# suite, so we do not use it to generate dependencies (-t).
|
||||||
|
%pyproject_buildrequires
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# cython refuses to cythonize a file in a directory that cannot be a Python module ¯\_(ツ)_/¯
|
# cython refuses to cythonize a file in a directory that cannot be a Python module ¯\_(ツ)_/¯
|
||||||
mkdir ruamel.yaml.clib
|
mkdir ruamel.yaml.clib
|
||||||
@ -65,19 +73,21 @@ cythonize -3 ruamel.yaml.clib/*.pyx
|
|||||||
mv ruamel.yaml.clib/* .
|
mv ruamel.yaml.clib/* .
|
||||||
rmdir ruamel.yaml.clib
|
rmdir ruamel.yaml.clib
|
||||||
|
|
||||||
%py3_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{python3} setup.py install --single-version-externally-managed --skip-build --root $RPM_BUILD_ROOT
|
%pyproject_install
|
||||||
|
%pyproject_save_files _ruamel_yaml
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%py3_check_import _ruamel_yaml
|
%py3_check_import _ruamel_yaml
|
||||||
|
|
||||||
%files -n python3-ruamel-yaml-clib
|
%files -n python3-ruamel-yaml-clib -f %{pyproject_files}
|
||||||
|
# pyproject_files handles LICENSE; verify with “rpm -qL -p …”
|
||||||
|
# Remove the following once we no longer have a separate LICENSE-libyaml:
|
||||||
%license LICENSE LICENSE-libyaml
|
%license LICENSE LICENSE-libyaml
|
||||||
|
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%{python3_sitearch}/_ruamel_yaml.cpython-*
|
|
||||||
%{python3_sitearch}/ruamel.yaml.clib-%{version}-py%{python3_version}.egg-info
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed May 03 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.2.6-5
|
* Wed May 03 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.2.6-5
|
||||||
@ -89,6 +99,7 @@ rmdir ruamel.yaml.clib
|
|||||||
- Update URL (close RHBZ#1840610)
|
- Update URL (close RHBZ#1840610)
|
||||||
- Add an import-only “smoke test”
|
- Add an import-only “smoke test”
|
||||||
- Properly handle libyaml bundling
|
- Properly handle libyaml bundling
|
||||||
|
- Port to pyproject-rpm-macros (“new Python guidelines”)
|
||||||
|
|
||||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.6-4
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.6-4
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
Loading…
Reference in New Issue
Block a user