Add python3 fixes for CS8/EL8
This commit is contained in:
+23
-12
@@ -3,9 +3,11 @@
|
||||
%global pypi_prefix %(c=%{pypi_name}; echo ${c:0:1})
|
||||
%global python_version_min 3.6
|
||||
|
||||
%bcond_without docs
|
||||
|
||||
Name: python-%{pypi_name}
|
||||
Version: %{pypi_version}
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: The secure Argon2 password hashing algorithm
|
||||
|
||||
License: MIT
|
||||
@@ -14,10 +16,12 @@ Source0: https://files.pythonhosted.org/packages/source/%{pypi_prefix}/%{
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: python3dist(setuptools)
|
||||
BuildRequires: python3dist(cffi) >= 1
|
||||
BuildRequires: python3dist(six)
|
||||
BuildRequires: python3dist(sphinx)
|
||||
BuildRequires: python%{python3_version}dist(setuptools)
|
||||
BuildRequires: python%{python3_version}dist(cffi)
|
||||
|
||||
%if %{with docs}
|
||||
BuildRequires: python%{python3_version}dist(sphinx)
|
||||
%endif
|
||||
|
||||
%global _description %{expand:
|
||||
CFFI-based Argon2 Bindings for Python.}
|
||||
@@ -25,23 +29,22 @@ CFFI-based Argon2 Bindings for Python.}
|
||||
%description %{_description}
|
||||
|
||||
|
||||
%package -n python3-%{pypi_name}
|
||||
%package -n python%{python3_pkgversion}-%{pypi_name}
|
||||
Summary: %{summary}
|
||||
%{?python_provide:%python_provide python3-%{pypi_name}}
|
||||
|
||||
Requires: python3dist(cffi) >= 1
|
||||
Requires: python3dist(six)
|
||||
Requires: python3dist(sphinx)
|
||||
Requires: python%{python3_version}dist(cffi)
|
||||
|
||||
%description -n python3-%{pypi_name}
|
||||
%description -n python%{python3_pkgversion}-%{pypi_name}
|
||||
%{common_description}
|
||||
|
||||
|
||||
%if %{with docs}
|
||||
%package -n python-%{pypi_name}-doc
|
||||
Summary: argon2-cffi documentation
|
||||
|
||||
%description -n python-%{pypi_name}-doc
|
||||
Documentation for argon2-cffi
|
||||
%endif
|
||||
|
||||
|
||||
%prep
|
||||
@@ -50,21 +53,29 @@ rm -rf %{pypi_name}.egg-info
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
%if %{with docs}
|
||||
PYTHONPATH=${PWD} sphinx-build-3 docs html
|
||||
rm -rf html/.{doctrees,buildinfo}
|
||||
%endif
|
||||
|
||||
%install
|
||||
%py3_install
|
||||
|
||||
%files -n python3-%{pypi_name}
|
||||
%files -n python%{python3_pkgversion}-%{pypi_name}
|
||||
%license LICENSE docs/license.rst extras/libargon2/LICENSE
|
||||
%doc README.rst extras/libargon2/README.md
|
||||
%{python3_sitearch}/argon2
|
||||
%{python3_sitearch}/argon2_cffi-%{version}-py%{python3_version}.egg-info
|
||||
|
||||
%if %{with docs}
|
||||
%files -n python-%{pypi_name}-doc
|
||||
%doc html
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sat Apr 16 2022 Daniel Uvehag <daniel.uvehag@gmail.com> - 20.1.0-2
|
||||
- Fixed build for CS8
|
||||
- Made docs optional
|
||||
|
||||
* Thu Apr 14 2022 Daniel Uvehag <daniel.uvehag@gmail.com> - 20.1.0-1
|
||||
- Initial package.
|
||||
|
||||
Reference in New Issue
Block a user