Files
rpm-python-argon2-cffi/python-argon2-cffi.spec
T
2022-04-16 08:23:07 +02:00

82 lines
2.0 KiB
RPMSpec

%global pypi_name argon2-cffi
%global pypi_version 20.1.0
%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: 2%{?dist}
Summary: The secure Argon2 password hashing algorithm
License: MIT
URL: https://argon2-cffi.readthedocs.io/
Source0: https://files.pythonhosted.org/packages/source/%{pypi_prefix}/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: python%{python3_pkgversion}-devel
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.}
%description %{_description}
%package -n python%{python3_pkgversion}-%{pypi_name}
Summary: %{summary}
Requires: python%{python3_version}dist(cffi)
%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
%autosetup -n %{pypi_name}-%{version}
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 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.