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