]> git.pld-linux.org Git - packages/python3-PyNaCl.git/blame - python3-PyNaCl.spec
- noarch apidocs
[packages/python3-PyNaCl.git] / python3-PyNaCl.spec
CommitLineData
eded7ae5
JP
1#
2# Conditional build:
2afa1370
JB
3%bcond_without doc # Sphinx documentation
4%bcond_without tests # unit tests
eded7ae5
JP
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8%define module PyNaCl
2afa1370
JB
9Summary: Python 2 binding to the Networking and Cryptography (NaCl) library
10Summary(pl.UTF-8): Wiązania Pythona 2 do biblioteki NaCl (Networking and Cryptography)
2600e18a
JB
11Name: python3-%{module}
12Version: 1.5.0
13Release: 1
eded7ae5
JP
14License: Apache v2.0
15Group: Libraries/Python
2afa1370 16Source0: https://github.com/pyca/pynacl/archive/%{version}/pynacl-%{version}.tar.gz
2600e18a 17# Source0-md5: 5f4332422b2be24fb1584eb447061b30
eded7ae5 18URL: https://github.com/dstufft/pynacl/
2afa1370 19BuildRequires: libsodium-devel >= 1.0.18
2afa1370 20BuildRequires: python3-cffi >= 1.4.1
2600e18a
JB
21BuildRequires: python3-devel >= 1:3.6
22BuildRequires: python3-modules >= 1:3.6
2afa1370 23BuildRequires: python3-setuptools
eded7ae5
JP
24%if %{with tests}
25BuildRequires: python3-hypothesis >= 3.27.0
2afa1370 26BuildRequires: python3-pytest >= 3.3.1
eded7ae5 27%endif
7fcffcff 28BuildRequires: rpm-build >= 4.6
2afa1370
JB
29BuildRequires: rpm-pythonprov
30BuildRequires: rpmbuild(macros) >= 1.714
31%if %{with doc}
2afa1370
JB
32BuildRequires: python3-sphinx_rtd_theme
33BuildRequires: sphinx-pdg-3 >= 1.6.5
34%endif
35Requires: libsodium >= 1.0.18
eded7ae5
JP
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39PyNaCl is a Python binding to libsodium, which is a fork of the
40Networking and Cryptography library.
41
2afa1370
JB
42%description -l pl.UTF-8
43PyNaCl to wiązanie Pythona do libsodium - odgałęzienia biblioteki
44NaCl (Networking and Cryptography).
45
eded7ae5 46%package apidocs
2afa1370
JB
47Summary: API documentation for PyNaCl module
48Summary(pl.UTF-8): Dokumentacja API modułu PyNaCl
eded7ae5 49Group: Documentation
7fcffcff 50BuildArch: noarch
eded7ae5
JP
51
52%description apidocs
2afa1370
JB
53API documentation for PyNaCl module.
54
55%description apidocs -l pl.UTF-8
56Dokumentacja API modułu PyNaCl.
eded7ae5
JP
57
58%prep
59%setup -q -n pynacl-%{version}
60
61%build
2afa1370
JB
62export SODIUM_INSTALL=system
63
2afa1370
JB
64%py3_build
65
66%if %{with tests}
67PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
68PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
69%{__python3} -m pytest tests
70%endif
eded7ae5
JP
71
72%if %{with doc}
2afa1370
JB
73PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
74%{__make} -C docs html \
75 SPHINXBUILD=sphinx-build-3
eded7ae5
JP
76%endif
77
78%install
79rm -rf $RPM_BUILD_ROOT
80
2afa1370
JB
81export SODIUM_INSTALL=system
82
eded7ae5 83%py3_install
eded7ae5
JP
84
85%clean
86rm -rf $RPM_BUILD_ROOT
87
eded7ae5
JP
88%files
89%defattr(644,root,root,755)
2afa1370 90%doc CHANGELOG.rst README.rst
eded7ae5 91%dir %{py3_sitedir}/nacl
2afa1370 92%attr(755,root,root) %{py3_sitedir}/nacl/_sodium.abi3.so
2600e18a 93%{py3_sitedir}/nacl/py.typed
eded7ae5 94%{py3_sitedir}/nacl/*.py
2afa1370
JB
95%{py3_sitedir}/nacl/__pycache__
96%{py3_sitedir}/nacl/bindings
97%{py3_sitedir}/nacl/pwhash
eded7ae5 98%{py3_sitedir}/PyNaCl-%{version}-py*.egg-info
eded7ae5
JP
99
100%if %{with doc}
101%files apidocs
102%defattr(644,root,root,755)
2afa1370 103%doc docs/_build/html/{_downloads,_images,_modules,_static,api,vectors,*.html,*.js}
eded7ae5 104%endif
This page took 1.490754 seconds and 4 git commands to generate.