[packages/python-argon2-cffi] - initial, not for builders

qboosh qboosh at pld-linux.org
Mon Feb 16 05:41:12 CET 2026


commit 1752e2a935c56e64043ebfdcbacb9e9f60800093
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Feb 16 05:41:02 2026 +0100

    - initial, not for builders

 python-argon2-cffi.spec | 163 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 163 insertions(+)
---
diff --git a/python-argon2-cffi.spec b/python-argon2-cffi.spec
new file mode 100644
index 0000000..bea744c
--- /dev/null
+++ b/python-argon2-cffi.spec
@@ -0,0 +1,163 @@
+#
+# Conditional build:
+%bcond_without	doc	# API documentation
+%bcond_without	tests	# unit tests
+%bcond_without	python2 # CPython 2.x module
+%bcond_with	python3 # CPython 3.x module (built from python3-argon-cffi.spec)
+
+Summary:	CFFI-based Argon2 bindings for Python 2
+Summary(pl.UTF-8):	Oparte na CFFI wiązania Argon2 dla Pythona 2
+Name:		python-argon2-cffi
+# keep 20.x here for python2 support
+Version:	20.1.0
+Release:	0.1
+License:	MIT
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/argon2-cffi/
+Source0:	https://files.pythonhosted.org/packages/source/a/argon2-cffi/argon2-cffi-%{version}.tar.gz
+# Source0-md5:	e49ccb29351387fd853f31bf19b67f59
+URL:		https://pypi.org/project/argon2-cffi/
+BuildRequires:	libargon2-devel
+%if %{with python2}
+BuildRequires:	python-devel >= 1:2.7
+BuildRequires:	python-cffi >= 1.0.0
+BuildRequires:	python-setuptools >= 1:40.6.0
+%if %{with tests}
+BuildRequires:	python-enum34
+BuildRequires:	python-hypothesis
+BuildRequires:	python-pytest
+BuildRequires:	python-six
+%endif
+%endif
+%if %{with python3}
+BuildRequires:	python3-devel >= 1:3.5
+BuildRequires:	python3-cffi >= 1.0.0
+BuildRequires:	python3-setuptools >= 1:40.6.0
+%if %{with tests}
+BuildRequires:	python3-hypothesis
+BuildRequires:	python3-pytest
+BuildRequires:	python3-six
+%endif
+%endif
+BuildRequires:	rpm-build >= 4.6
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires:	sphinx-pdg-2
+%endif
+Requires:	python-modules >= 1:2.7
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Argon2 (<https://github.com/p-h-c/phc-winner-argon2>) won the Password
+Hashing Competition <https://password-hashing.net/> and argon2-cffi is
+the simplest way to use it in Python and PyPy.
+
+%description -l pl.UTF-8
+Argon2 (<https://github.com/p-h-c/phc-winner-argon2>) zwyciężył
+konkurs skrótów haseł (Password Hashing Competition
+<https://password-hashing.net/>), a argon2-cffi to naprostrzy sposób
+używania tego skrótu w Pythonie.
+
+%package -n python3-argon2-cffi
+Summary:	CFFI-based Argon2 bindings for Python 3
+Summary(pl.UTF-8):	Oparte na CFFI wiązania Argon2 dla Pythona 3
+Group:		Libraries/Python
+Requires:	python3-modules >= 1:3.5
+
+%description -n python3-argon2-cffi
+Argon2 (<https://github.com/p-h-c/phc-winner-argon2>) won the Password
+Hashing Competition <https://password-hashing.net/> and argon2-cffi is
+the simplest way to use it in Python and PyPy.
+
+%description -n python3-argon2-cffi -l pl.UTF-8
+Argon2 (<https://github.com/p-h-c/phc-winner-argon2>) zwyciężył
+konkurs skrótów haseł (Password Hashing Competition
+<https://password-hashing.net/>), a argon2-cffi to naprostrzy sposób
+używania tego skrótu w Pythonie.
+
+%package apidocs
+Summary:	API documentation for Python argon2-cffi module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona argon2-cffi
+Group:		Documentation
+BuildArch:	noarch
+
+%description apidocs
+API documentation for Python argon2-cffi module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona argon2-cffi.
+
+%prep
+%setup -q -n argon2-cffi-%{version}
+
+%build
+export ARGON2_CFFI_USE_SYSTEM=1
+%if %{with python2}
+%py_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTHONPATH=$(readlink -f build-2/lib.*) \
+%{__python} -m pytest tests
+%endif
+%endif
+
+%if %{with python3}
+%py3_build
+
+%if %{with tests}
+# TestHash.test_hash_fast fails in hypothesis health check
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTHONPATH=$(readlink -f build-3/lib.*) \
+%{__python3} -m pytest tests -k 'not test_hash_fast'
+%endif
+%endif
+
+%if %{with doc}
+%{__make} -C docs html \
+	SPHINXBUILD=sphinx-build-2
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS.rst CHANGELOG.rst FAQ.rst LICENSE README.rst SECURITY.md
+%dir %{py_sitedir}/argon2
+%{py_sitedir}/argon2/*.py[co]
+%{py_sitedir}/argon2/_ffi.so
+%{py_sitedir}/argon2_cffi-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-argon2-cffi
+%defattr(644,root,root,755)
+%doc AUTHORS.rst CHANGELOG.rst FAQ.rst LICENSE README.rst SECURITY.md
+%dir %{py3_sitedir}/argon2
+%{py3_sitedir}/argon2/*.py
+%{py3_sitedir}/argon2/_ffi.abi3.so
+%{py3_sitedir}/argon2/__pycache__
+%{py3_sitedir}/argon2_cffi-%{version}-py*.egg-info
+%endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/{_static,*.html,*.js}
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-argon2-cffi.git/commitdiff/1752e2a935c56e64043ebfdcbacb9e9f60800093



More information about the pld-cvs-commit mailing list