Convert to pyproject macros
This commit is contained in:
parent
60473c05e3
commit
28387ac15d
|
@ -1,11 +1,10 @@
|
|||
%{?python_enable_dependency_generator}
|
||||
%bcond_without check
|
||||
|
||||
%global modname pynacl
|
||||
|
||||
Name: python-%{modname}
|
||||
Version: 1.4.0
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
Summary: Python binding to the Networking and Cryptography (NaCl) library
|
||||
|
||||
License: ASL 2.0
|
||||
|
@ -18,24 +17,16 @@ Patch1: %{url}/pull/596.patch
|
|||
BuildRequires: gcc
|
||||
BuildRequires: libsodium-devel
|
||||
|
||||
%global _description \
|
||||
PyNaCl is a Python binding to the Networking and Cryptography library,\
|
||||
a crypto library with the stated goal of improving usability, security\
|
||||
and speed.
|
||||
%global _description %{expand:
|
||||
PyNaCl is a Python binding to the Networking and Cryptography library,
|
||||
a crypto library with the stated goal of improving usability, security
|
||||
and speed.}
|
||||
|
||||
%description %{_description}
|
||||
|
||||
%package -n python3-%{modname}
|
||||
Summary: %{summary}
|
||||
%{?python_provide:%python_provide python3-%{modname}}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python3-cffi >= 1.4.1
|
||||
%if %{with check}
|
||||
BuildRequires: python3-six
|
||||
BuildRequires: python3-pytest >= 3.2.1
|
||||
BuildRequires: python3-hypothesis >= 3.27.0
|
||||
%endif
|
||||
|
||||
%description -n python3-%{modname} %{_description}
|
||||
|
||||
|
@ -53,25 +44,31 @@ rm -vrf src/libsodium/
|
|||
sed -i 's/@settings(deadline=1500, max_examples=5)/@settings(deadline=4000, max_examples=5)/' tests/test_pwhash.py
|
||||
%endif
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires %{?with_check:-x tests}
|
||||
|
||||
%build
|
||||
export SODIUM_INSTALL=system
|
||||
%py3_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
%pyproject_install
|
||||
%pyproject_save_files nacl
|
||||
|
||||
%if %{with check}
|
||||
%check
|
||||
PYTHONPATH=%{buildroot}%{python3_sitearch} py.test-3 -v
|
||||
%if %{with check}
|
||||
%pytest
|
||||
%else
|
||||
%pyproject_check_import
|
||||
%endif
|
||||
|
||||
%files -n python3-%{modname}
|
||||
%license LICENSE
|
||||
%files -n python3-%{modname} -f %{pyproject_files}
|
||||
%doc README.rst
|
||||
%{python3_sitearch}/PyNaCl-*.egg-info/
|
||||
%{python3_sitearch}/nacl/
|
||||
|
||||
%changelog
|
||||
* Wed May 11 2022 Carl George <carl@george.computer> - 1.4.0-6
|
||||
- Convert to pyproject macros
|
||||
|
||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
|
|
Loading…
Reference in New Issue