%if 0%{?fedora} %global with_python3 1 %endif %global pypi_name scrypt %global common_desc Python scrypt bindings This is a set of Python bindings \ for the scrypt key derivation function. Scrypt is useful when encrypting \ password as it is possible to specify a *minimum* amount of time to use when \ encrypting and decrypting. If, for example, a password takes 0.05 seconds to \ verify, a user won't notice the slight delay when signing in, but doing a \ brute force search of several... Name: python-%{pypi_name} Version: 0.8.0 Release: 2%{?dist} Summary: Bindings for the scrypt key derivation function library License: BSD URL: http://bitbucket.org/mhallin/py-scrypt Source0: https://files.pythonhosted.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildRequires: openssl-devel # Missing license file: https://bitbucket.org/mhallin/py-scrypt/issues/31 # Broken tests in source tarball: https://bitbucket.org/mhallin/py-scrypt/issues/21 %description %{common_desc} %package -n python2-%{pypi_name} Summary: Bindings for the scrypt key derivation function library BuildRequires: python2-devel BuildRequires: python-setuptools Provides: bundled(scrypt) = 1.2.0 %{?python_provide:%python_provide python2-%{pypi_name}} %description -n python2-%{pypi_name} %{common_desc} %if 0%{?with_python3} %package -n python3-%{pypi_name} Summary: Bindings for the scrypt key derivation function library BuildRequires: python3-devel BuildRequires: python3-setuptools Provides: bundled(scrypt) = 1.2.0 %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} %{common_desc} %endif %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py2_build %if 0%{?with_python3} %py3_build %endif %install %if 0%{?with_python3} %py3_install %endif %py2_install %files -n python2-%{pypi_name} %doc README.rst %{python2_sitearch}/%{pypi_name}.py* %{python2_sitearch}/_%{pypi_name}.so %{python2_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info %if 0%{?with_python3} %files -n python3-%{pypi_name} %doc README.rst %{python3_sitearch}/__pycache__/%{pypi_name}* %{python3_sitearch}/%{pypi_name}.py* %{python3_sitearch}/_%{pypi_name}*.so %{python3_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info %endif %changelog * Wed Jun 7 2017 Haïkel Guémar - 0.8.0-2 - Add virtual provides for bundled code * Fri Jun 2 2017 Haïkel Guémar - 0.8.0-1 - Initial package.