|
|
|
@ -27,8 +27,11 @@ implemented as C extensions.\
|
|
|
|
|
Note: all modules are installed under the Cryptodome package to avoid conflicts\
|
|
|
|
|
with the PyCrypto library.
|
|
|
|
|
|
|
|
|
|
%global _with_python2 1
|
|
|
|
|
%global _with_tests 1
|
|
|
|
|
|
|
|
|
|
Name: python-%{srcname}
|
|
|
|
|
Version: 3.9.0
|
|
|
|
|
Version: 3.9.3
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Summary: A self-contained cryptographic library for Python
|
|
|
|
|
|
|
|
|
@ -41,13 +44,13 @@ Source0: https://github.com/Legrandin/pycryptodome/archive/v%{version}/%{
|
|
|
|
|
Patch0: %{name}-3.7.3-use_external_libtomcrypt.patch
|
|
|
|
|
# Fix documentation build with Sphinx <= 1.2, especially on EL
|
|
|
|
|
Patch1: %{name}-3.7.0-sphinx.patch
|
|
|
|
|
# Fix compilation flags
|
|
|
|
|
Patch2: %{name}-3.7.3-cflags.patch
|
|
|
|
|
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
|
BuildRequires: libtomcrypt-devel
|
|
|
|
|
%if 0%{?_with_python2}
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
# Needed for documentation
|
|
|
|
@ -57,6 +60,7 @@ BuildRequires: python3-sphinx
|
|
|
|
|
%{common_description}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?_with_python2}
|
|
|
|
|
%package -n python2-%{srcname}
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
# GMP library is dl-opened
|
|
|
|
@ -65,6 +69,7 @@ Requires: gmp%{?_isa}
|
|
|
|
|
|
|
|
|
|
%description -n python2-%{srcname}
|
|
|
|
|
%{common_description}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n python3-%{srcname}
|
|
|
|
@ -91,16 +96,19 @@ mv lib/Crypto/SelfTest/__main__.py.new lib/Crypto/SelfTest/__main__.py
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
touch .separate_namespace
|
|
|
|
|
%if 0%{?_with_python2}
|
|
|
|
|
%py2_build
|
|
|
|
|
%endif
|
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Build documentation
|
|
|
|
|
%make_build -C Doc/ man SPHINXBUILD=sphinx-build-3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%if 0%{?_with_python2}
|
|
|
|
|
%py2_install
|
|
|
|
|
%endif
|
|
|
|
|
%py3_install
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -108,21 +116,29 @@ touch .separate_namespace
|
|
|
|
|
install -Dpm 0644 Doc/_build/man/pycryptodome.1 $RPM_BUILD_ROOT%{_mandir}/man1/pycryptodome.1
|
|
|
|
|
|
|
|
|
|
# Fix permissions
|
|
|
|
|
%if 0%{_with_python2}
|
|
|
|
|
chmod 0755 $RPM_BUILD_ROOT%{python2_sitearch}/Cryptodome/SelfTest/PublicKey/test_vectors/ECC/gen_ecc_p256.sh
|
|
|
|
|
%endif
|
|
|
|
|
chmod 0755 $RPM_BUILD_ROOT%{python3_sitearch}/Cryptodome/SelfTest/PublicKey/test_vectors/ECC/gen_ecc_p256.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%if 0%{?_with_tests}
|
|
|
|
|
%if 0%{?_with_python2}
|
|
|
|
|
%{__python2} setup.py test
|
|
|
|
|
%endif
|
|
|
|
|
%{__python3} setup.py test
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?_with_python2}
|
|
|
|
|
%files -n python2-%{srcname}
|
|
|
|
|
%doc AUTHORS.rst Changelog.rst README.rst
|
|
|
|
|
%license LICENSE.rst
|
|
|
|
|
%{python2_sitearch}/Cryptodome/
|
|
|
|
|
%{python2_sitearch}/%{srcname}-*.egg-info/
|
|
|
|
|
%{_mandir}/man1/pycryptodome.1.*
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python3-%{srcname}
|
|
|
|
@ -134,5 +150,8 @@ chmod 0755 $RPM_BUILD_ROOT%{python3_sitearch}/Cryptodome/SelfTest/PublicKey/test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Fri Nov 15 2019 Mohamed El Morabity <melmorabity@fedoraproject.org> - 3.9.3-1
|
|
|
|
|
- Update to 3.9.3
|
|
|
|
|
|
|
|
|
|
* Thu Oct 31 2019 Mohamed El Morabity <melmorabity@fedoraproject.org> - 3.9.0-1
|
|
|
|
|
- Enable build for EPEL8
|
|
|
|
|