[packages/python3-bcrypt] - python-bcrypt.spec updated to 5.0.0 for python 3.7+

qboosh qboosh at pld-linux.org
Mon Dec 1 05:39:50 CET 2025


commit 0857174202c23969c652dfdb76dbfbdb46f699e3
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Dec 1 05:39:54 2025 +0100

    - python-bcrypt.spec updated to 5.0.0 for python 3.7+

 python-bcrypt.spec  | 120 ----------------------------------------------------
 python3-bcrypt.spec | 105 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 105 insertions(+), 120 deletions(-)
---
diff --git a/python-bcrypt.spec b/python-bcrypt.spec
deleted file mode 100644
index 15081cd..0000000
--- a/python-bcrypt.spec
+++ /dev/null
@@ -1,120 +0,0 @@
-#
-# Conditional build:
-%bcond_without	tests	# unit tests
-%bcond_without	python2 # CPython 2.x module
-%bcond_without	python3 # CPython 3.x module
-
-%define		module	bcrypt
-Summary:	Library for password hashing for your software and your servers
-Summary(pl.UTF-8):	Biblioteka do tworzenia skrótów haseł dla programów i serwerów
-Name:		python-%{module}
-# keep 3.1.x for python2 support
-Version:	3.1.7
-Release:	8
-License:	Apache v2.0
-Group:		Libraries/Python
-#Source0Download: https://pypi.org/simple/bcrypt/
-Source0:	https://files.pythonhosted.org/packages/source/b/bcrypt/%{module}-%{version}.tar.gz
-# Source0-md5:	5d6f93b575ce52470af37a8e7dce76fe
-URL:		https://github.com/dstufft/bcrypt/
-%if %{with python2}
-BuildRequires:	python-cffi >= 1.1
-BuildRequires:	python-devel >= 1:2.7
-BuildRequires:	python-setuptools
-%if %{with tests}
-BuildRequires:	python-pytest >= 3.2.1
-BuildRequires:	python-six >= 1.4.1
-%endif
-%endif
-%if %{with python3}
-BuildRequires:	python3-cffi >= 1.1
-BuildRequires:	python3-devel >= 1:3.4
-BuildRequires:	python3-setuptools
-%if %{with tests}
-BuildRequires:	python3-pytest >= 3.2.1
-BuildRequires:	python3-six >= 1.4.1
-%endif
-%endif
-BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.714
-Requires:	python-modules >= 1:2.7
-BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-This library should be compatible with py-bcrypt.
-
-%description -l pl.UTF-8
-Biblioteka powinna być zgodna z biblioteką py-bcrypt.
-
-%package -n python3-%{module}
-Summary:	Library for password hashing for your software and your servers
-Summary(pl.UTF-8):	Biblioteka do tworzenia skrótów haseł dla programów i serwerów
-Group:		Libraries/Python
-Requires:	python3-modules >= 1:3.4
-
-%description -n python3-%{module}
-This library should be compatible with py-bcrypt.
-
-%description -n python3-%{module} -l pl.UTF-8
-Biblioteka powinna być zgodna z biblioteką py-bcrypt.
-
-%prep
-%setup -q -n %{module}-%{version}
-
-%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTHONPATH=$(echo $(pwd)/build-2/lib.linux-*) \
-%{__python} -m pytest tests
-%endif
-%endif
-
-%if %{with python3}
-%py3_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTHONPATH=$(echo $(pwd)/build-3/lib.linux-*) \
-%{__python3} -m pytest tests
-%endif
-%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 README.rst
-%dir %{py_sitedir}/bcrypt
-%attr(755,root,root) %{py_sitedir}/bcrypt/*.so
-%{py_sitedir}/bcrypt/*.py[co]
-%{py_sitedir}/bcrypt-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}
-%defattr(644,root,root,755)
-%doc README.rst
-%dir %{py3_sitedir}/bcrypt
-%attr(755,root,root) %{py3_sitedir}/bcrypt/*.so
-%{py3_sitedir}/bcrypt/*.py
-%{py3_sitedir}/bcrypt/__pycache__
-%{py3_sitedir}/bcrypt-%{version}-py*.egg-info
-%endif
diff --git a/python3-bcrypt.spec b/python3-bcrypt.spec
new file mode 100644
index 0000000..f3e0c76
--- /dev/null
+++ b/python3-bcrypt.spec
@@ -0,0 +1,105 @@
+#
+# Conditional build:
+%bcond_without	tests	# unit tests
+
+%define		module	bcrypt
+Summary:	Library for password hashing for your software and your servers
+Summary(pl.UTF-8):	Biblioteka do tworzenia skrótów haseł dla programów i serwerów
+Name:		python3-%{module}
+Version:	5.0.0
+Release:	1
+License:	Apache v2.0
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/bcrypt/
+Source0:	https://files.pythonhosted.org/packages/source/b/bcrypt/%{module}-%{version}.tar.gz
+# Source0-md5:	14d72a6f3bc4ccca1dced205cc4e207e
+# cd src/_bcrypt
+# cargo vendor-filterer --platform='*-unknown-linux-*' --tier=2
+Source1:	bcrypt-%{version}-vendor.tar.xz
+# Source1-md5:	ae3bbc3f9876cafa7212bb5cfb9ec5c2
+URL:		https://github.com/dstufft/bcrypt/
+BuildRequires:	python3-build
+BuildRequires:	python3-devel >= 1:3.8
+BuildRequires:	python3-installer
+BuildRequires:	python3-setuptools >= 1:42.0.0
+BuildRequires:	python3-setuptools_rust >= 1.7.0
+%if %{with tests}
+BuildRequires:	python3-pytest >= 3.2.1
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 2.050
+BuildRequires:	rust >= 1.64.0
+%{?rust_req}
+Requires:	python3-modules >= 1:3.8
+ExclusiveArch:	%{rust_arches}
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This library should be compatible with py-bcrypt.
+
+%description -l pl.UTF-8
+Biblioteka powinna być zgodna z biblioteką py-bcrypt.
+
+%prep
+%setup -q -n %{module}-%{version}
+
+cd src/_bcrypt
+%{__tar} xf %{SOURCE1}
+
+# use our offline registry
+export CARGO_HOME="$(pwd)/.cargo"
+
+mkdir -p "$CARGO_HOME"
+cat >.cargo/config.toml <<EOF
+[source.crates-io]
+replace-with = 'vendored-sources'
+
+[source.vendored-sources]
+directory = '$PWD/vendor'
+EOF
+
+%build
+export CARGO_HOME="$(pwd)/src/_bcrypt/.cargo"
+export CARGO_OFFLINE=true
+export CARGO_TERM_VERBOSE=true
+%ifarch x32
+export CARGO_BUILD_TARGET=x86_64-unknown-linux-gnux32
+export PKG_CONFIG_ALLOW_CROSS=1
+export PYO3_CROSS_LIB_DIR=%{_libdir}
+%endif
+
+%py3_build_pyproject
+
+%if %{with tests}
+%{__python3} -m zipfile -e build-3/*.whl build-3-test
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTHONPATH=$(pwd)/build-3-test \
+%{__python3} -m pytest tests
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+export CARGO_HOME="$(pwd)/src/_bcrypt/.cargo"
+export CARGO_OFFLINE=true
+export CARGO_TERM_VERBOSE=true
+%ifarch x32
+export CARGO_BUILD_TARGET=x86_64-unknown-linux-gnux32
+export PKG_CONFIG_ALLOW_CROSS=1
+%endif
+
+%py3_install_pyproject
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.rst
+%dir %{py3_sitedir}/bcrypt
+%{py3_sitedir}/bcrypt/_bcrypt.cpython-*.so
+%{py3_sitedir}/bcrypt/*.py
+%{py3_sitedir}/bcrypt/*.pyi
+%{py3_sitedir}/bcrypt/py.typed
+%{py3_sitedir}/bcrypt/__pycache__
+%{py3_sitedir}/bcrypt-%{version}.dist-info
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-bcrypt.git/commitdiff/0857174202c23969c652dfdb76dbfbdb46f699e3




More information about the pld-cvs-commit mailing list