[packages/python-PyNaCl] - updated to 1.4.0 - added no-wheel patch (don't require wheel to build) - build apidocs
qboosh
qboosh at pld-linux.org
Tue Feb 16 19:51:07 CET 2021
commit 2afa1370a1abce45648a869493e109802ec7634f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Feb 16 19:51:36 2021 +0100
- updated to 1.4.0
- added no-wheel patch (don't require wheel to build)
- build apidocs
python-PyNaCl-no-wheel.patch | 12 ++++
python-PyNaCl.spec | 141 ++++++++++++++++++++++++-------------------
2 files changed, 91 insertions(+), 62 deletions(-)
---
diff --git a/python-PyNaCl.spec b/python-PyNaCl.spec
index e1ac884..ac5234a 100644
--- a/python-PyNaCl.spec
+++ b/python-PyNaCl.spec
@@ -1,106 +1,134 @@
#
# Conditional build:
-%bcond_with doc # build doc
-%bcond_without tests # do not perform "make test"
+%bcond_without doc # Sphinx documentation
+%bcond_without tests # unit tests
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
%define module PyNaCl
-Summary: Python binding to the Networking and Cryptography (NaCl) library
+Summary: Python 2 binding to the Networking and Cryptography (NaCl) library
+Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki NaCl (Networking and Cryptography)
Name: python-%{module}
-Version: 1.3.0
-Release: 2
+Version: 1.4.0
+Release: 1
License: Apache v2.0
Group: Libraries/Python
-Source0: https://github.com/pyca/pynacl/archive/%{version}.tar.gz
-# Source0-md5: cb6560512d1d2300b3ddbe1a1daf871d
+Source0: https://github.com/pyca/pynacl/archive/%{version}/pynacl-%{version}.tar.gz
+# Source0-md5: 50b7f2d00b16c270095b7ae4bea9fba8
+Patch0: %{name}-no-wheel.patch
URL: https://github.com/dstufft/pynacl/
-BuildRequires: libsodium-devel
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.710
-%if %{with doc}
-BuildRequires: sphinx-pdg
-%endif
+BuildRequires: libsodium-devel >= 1.0.18
%if %{with python2}
-BuildRequires: python-devel
-BuildRequires: python-distribute
-BuildRequires: python-modules
-BuildRequires: python-six
+BuildRequires: python-cffi >= 1.4.1
+BuildRequires: python-devel >= 1:2.7
+BuildRequires: python-modules >= 1:2.7
+BuildRequires: python-setuptools
%if %{with tests}
BuildRequires: python-hypothesis >= 3.27.0
-BuildRequires: python-pytest > 3.3.0
+BuildRequires: python-pytest >= 3.3.1
+BuildRequires: python-six
%endif
%endif
%if %{with python3}
-BuildRequires: python3-devel
-BuildRequires: python3-distribute
-BuildRequires: python3-modules
-BuildRequires: python3-six
+BuildRequires: python3-cffi >= 1.4.1
+BuildRequires: python3-devel >= 1:3.5
+BuildRequires: python3-modules >= 1:3.5
+BuildRequires: python3-setuptools
%if %{with tests}
BuildRequires: python3-hypothesis >= 3.27.0
-BuildRequires: python3-pytest > 3.3.0
+BuildRequires: python3-pytest >= 3.3.1
+BuildRequires: python3-six
%endif
%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires: python3-six
+BuildRequires: python3-sphinx_rtd_theme
+BuildRequires: sphinx-pdg-3 >= 1.6.5
+%endif
+Requires: libsodium >= 1.0.18
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
PyNaCl is a Python binding to libsodium, which is a fork of the
Networking and Cryptography library.
+%description -l pl.UTF-8
+PyNaCl to wiązanie Pythona do libsodium - odgałęzienia biblioteki
+NaCl (Networking and Cryptography).
+
%package -n python3-%{module}
-Summary: Python binding to the Networking and Cryptography (NaCl) library
+Summary: Python 3 binding to the Networking and Cryptography (NaCl) library
+Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki NaCl (Networking and Cryptography)
Group: Libraries/Python
+Requires: libsodium >= 1.0.18
%description -n python3-%{module}
PyNaCl is a Python binding to libsodium, which is a fork of the
Networking and Cryptography library.
+%description -n python3-%{module} -l pl.UTF-8
+PyNaCl to wiązanie Pythona do libsodium - odgałęzienia biblioteki
+NaCl (Networking and Cryptography).
+
%package apidocs
-Summary: %{module} API documentation
+Summary: API documentation for PyNaCl module
+Summary(pl.UTF-8): Dokumentacja API modułu PyNaCl
Group: Documentation
%description apidocs
-API documentation for %{module}.
+API documentation for PyNaCl module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu PyNaCl.
%prep
%setup -q -n pynacl-%{version}
+%patch0 -p1
%build
+export SODIUM_INSTALL=system
+
%if %{with python2}
-CC="%{__cc}" \
-CFLAGS="%{rpmcppflags} %{rpmcflags}" \
-SODIUM_INSTALL=system; export SODIUM_INSTALL \
-%py_build %{?with_tests:test}
+%py_build
+
+%if %{with tests}
+PYTHONPATH=$(echo $(pwd)/build-2/lib.*) \
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python} -m pytest tests
+%endif
%endif
%if %{with python3}
-CC="%{__cc}" \
-CFLAGS="%{rpmcppflags} %{rpmcflags}" \
-SODIUM_INSTALL=system; export SODIUM_INSTALL \
-%py3_build %{?with_tests:test}
+%py3_build
+
+%if %{with tests}
+PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest tests
+%endif
%endif
%if %{with doc}
-cd docs
-%{__make} -j1 html
-rm -rf _build/html/_sources
+PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
+%{__make} -C docs html \
+ SPHINXBUILD=sphinx-build-3
%endif
%install
rm -rf $RPM_BUILD_ROOT
+export SODIUM_INSTALL=system
+
%if %{with python2}
-SODIUM_INSTALL=system; export SODIUM_INSTALL \
%py_install
%py_postclean
-
%endif
%if %{with python3}
-SODIUM_INSTALL=system; export SODIUM_INSTALL \
%py3_install
-
%endif
%clean
@@ -109,41 +137,30 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python2}
%files
%defattr(644,root,root,755)
-%doc README.rst
+%doc CHANGELOG.rst README.rst
%dir %{py_sitedir}/nacl
-%attr(755,root,root) %{py_sitedir}/nacl/*.so
+%attr(755,root,root) %{py_sitedir}/nacl/_sodium.so
%{py_sitedir}/nacl/*.py[co]
-%dir %{py_sitedir}/nacl/bindings
-%{py_sitedir}/nacl/bindings/*.py[co]
-%dir %{py_sitedir}/nacl/pwhash
-%{py_sitedir}/nacl/pwhash/*.py[co]
-%if "%{py_ver}" > "2.4"
+%{py_sitedir}/nacl/bindings
+%{py_sitedir}/nacl/pwhash
%{py_sitedir}/PyNaCl-%{version}-py*.egg-info
%endif
-%endif
%if %{with python3}
%files -n python3-%{module}
%defattr(644,root,root,755)
-%doc README.rst
+%doc CHANGELOG.rst README.rst
%dir %{py3_sitedir}/nacl
-%attr(755,root,root) %{py3_sitedir}/nacl/*.so
+%attr(755,root,root) %{py3_sitedir}/nacl/_sodium.abi3.so
%{py3_sitedir}/nacl/*.py
-%dir %{py3_sitedir}/nacl/__pycache__
-%{py3_sitedir}/nacl/__pycache__/*.py[co]
-%dir %{py3_sitedir}/nacl/bindings
-%{py3_sitedir}/nacl/bindings/*.py
-%dir %{py3_sitedir}/nacl/bindings/__pycache__
-%{py3_sitedir}/nacl/bindings/__pycache__/*.py[co]
-%dir %{py3_sitedir}/nacl/pwhash
-%{py3_sitedir}/nacl/pwhash/*.py
-%dir %{py3_sitedir}/nacl/pwhash/__pycache__
-%{py3_sitedir}/nacl/pwhash/__pycache__/*.py[co]
+%{py3_sitedir}/nacl/__pycache__
+%{py3_sitedir}/nacl/bindings
+%{py3_sitedir}/nacl/pwhash
%{py3_sitedir}/PyNaCl-%{version}-py*.egg-info
%endif
%if %{with doc}
%files apidocs
%defattr(644,root,root,755)
-%doc docs/_build/html/*
+%doc docs/_build/html/{_downloads,_images,_modules,_static,api,vectors,*.html,*.js}
%endif
diff --git a/python-PyNaCl-no-wheel.patch b/python-PyNaCl-no-wheel.patch
new file mode 100644
index 0000000..a6c94b4
--- /dev/null
+++ b/python-PyNaCl-no-wheel.patch
@@ -0,0 +1,12 @@
+--- pynacl-1.4.0/setup.py.orig 2020-05-25 21:08:38.000000000 +0200
++++ pynacl-1.4.0/setup.py 2021-02-16 19:15:25.587854544 +0100
+@@ -35,8 +35,7 @@
+
+
+ requirements = ["six"]
+-setup_requirements = ["setuptools",
+- "wheel"]
++setup_requirements = ["setuptools"]
+ test_requirements = ["pytest>=3.2.1,!=3.3.0",
+ "hypothesis>=3.27.0"]
+ docs_requirements = ["sphinx>=1.6.5",
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-PyNaCl.git/commitdiff/2afa1370a1abce45648a869493e109802ec7634f
More information about the pld-cvs-commit
mailing list