diff --git a/bcrypt-4.3.0.tar.gz b/bcrypt-4.3.0.tar.gz deleted file mode 100644 index 9f854f72b7c14e07f01c0fb3ded4cf9088d93798..0000000000000000000000000000000000000000 --- a/bcrypt-4.3.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3a3fd2204178b6d2adcf09cb4f6426ffef54762577a7c9b54c159008cb288c18 -size 25697 diff --git a/bcrypt-5.0.0.tar.gz b/bcrypt-5.0.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..a6c15c57ebf92cd792432b301a0edc787ba3ab99 Binary files /dev/null and b/bcrypt-5.0.0.tar.gz differ diff --git a/python-bcrypt.spec b/python-bcrypt.spec index 2713635dc36a809520b935cabd46d8e50342ab4b..106ecac75570054483cefc702cb5a866b928a62c 100644 --- a/python-bcrypt.spec +++ b/python-bcrypt.spec @@ -1,24 +1,21 @@ +%global _empty_manifest_terminate_build 0 +%undefine _python_dist_allow_version_zero Name: python-bcrypt -Version: 4.3.0 +Version: 5.0.0 Release: 1 Summary: Modern password hashing for your software and your servers License: Apache-2.0 URL: https://github.com/pyca/bcrypt -Source0: %{pypi_source bcrypt} +Source0: https://files.pythonhosted.org/packages/source/b/bcrypt/bcrypt-%{version}.tar.gz # tar -xf bcrypt-version.tar.gz # cd bcrypt-version/src/_bcrypt # cargo vendor # tar -czvf vendor.tar.gz vendor Source1: vendor.tar.gz Source2: config.toml -%description -Good password hashing for your software and your servers. -This library should be compatible with py-bcrypt and it will run on Python 3.7+. - -%package -n python3-bcrypt -Summary: Modern password hashing for your software and your servers -Provides: python-bcrypt = %{version}-%{release} - +BuildRequires: python3-devel +BuildRequires: python3-build +BuildRequires: python3-hatchling BuildRequires: python3-devel >= 3.7 BuildRequires: python3-setuptools >= 42.0 BuildRequires: python3-setuptools-rust >= 1.7.0 @@ -30,6 +27,15 @@ BuildRequires: gcc BuildRequires: python3-pytest >= 3.2.1 BuildRequires: python3-pip BuildRequires: python3-wheel + +%description +Good password hashing for your software and your servers. +This library should be compatible with py-bcrypt and it will run on Python 3.7+. + +%package -n python3-bcrypt +Summary: Modern password hashing for your software and your servers +Provides: python-bcrypt = %{version}-%{release} + Obsoletes: %{name}-help < %{version}-%{release} %description -n python3-bcrypt @@ -38,14 +44,32 @@ This library should be compatible with py-bcrypt and it will run on Python 3.7+. %prep %autosetup -n bcrypt-%{version} -p1 -a1 + +# Fix setuptools_scm version issue +if [ -f pyproject.toml ]; then + sed -i '/^version *=/d' pyproject.toml + sed -i '/^\[project\]/a version = "%{version}"' pyproject.toml + sed -i '/dynamic *= *\[.*version.*\]/d' pyproject.toml + if grep -q '^\[tool\.setuptools_scm\]' pyproject.toml; then + sed -i '/^\[tool\.setuptools_scm\]/,/^\[/ {/^write_to *=/d}' pyproject.toml + sed -i '/^\[tool\.setuptools_scm\]/a fallback_version = "%{version}"' pyproject.toml + fi +fi mkdir .cargo cp %{SOURCE2} .cargo/ %build +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" %set_build_flags %pyproject_build %install +export PYTHONDONTWRITEBYTECODE=1 + +# Clean __pycache__ directories and .pyc/.pyo files +find %{buildroot} -name '*.py[co]' -delete +find %{buildroot} -type d -name '__pycache__' -exec rm -rf {} + 2>/dev/null || true +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" %set_build_flags %pyproject_install @@ -58,6 +82,9 @@ pytest %{python3_sitearch}/* %changelog +* Thu Nov 27 2025 zhangzeyang0718 - 5.0.0-1 +- Update package to version 5.0.0 + * Thu Aug 21 2025 wangkai <13474090681@163.com> - 4.3.0-1 - Update to 4.3.0 * Dropped support for Python 3.7.