diff --git a/.gitignore b/.gitignore index 47b92dc..00d4ff0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/bcrypt-3.1.6.tar.gz +SOURCES/bcrypt-4.2.1.tar.gz diff --git a/.python-bcrypt.metadata b/.python-bcrypt.metadata index 9021125..eaffaf2 100644 --- a/.python-bcrypt.metadata +++ b/.python-bcrypt.metadata @@ -1 +1 @@ -03a17719edea2f3d1e32b5c510171df304769542 SOURCES/bcrypt-3.1.6.tar.gz +5d6d0974af4452bc8462891e1ac786a00031de07 SOURCES/bcrypt-4.2.1.tar.gz diff --git a/SPECS/python-bcrypt.spec b/SPECS/python-bcrypt.spec index f1ab94e..ed00b2b 100644 --- a/SPECS/python-bcrypt.spec +++ b/SPECS/python-bcrypt.spec @@ -1,135 +1,180 @@ -%{!?_licensedir: %global license %%doc} -%global with_python2 1 - -%if 0%{?rhel} && 0%{?rhel} >= 8 -%global with_python2 0 -%endif +## START: Set by rpmautospec +## (rpmautospec version 0.7.3) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 1; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec %global modname bcrypt %global sum Modern password hashing for your software and your servers Name: python-bcrypt -Version: 3.1.6 -Release: 2%{?dist}.1 +Version: 4.2.1 +Release: %autorelease Summary: %{sum} #crypt_blowfish code is in Public domain and all other code in ASL 2.0 -License: ASL 2.0 and Public Domain and BSD +License: Apache-2.0 AND LicenseRef-Fedora-Public-Domain URL: http://pypi.python.org/pypi/bcrypt -Source0: https://files.pythonhosted.org/packages/source/b/%{modname}/%{modname}-%{version}.tar.gz - -BuildRequires: gcc - -%if 0%{?with_python2} -BuildRequires: python2-devel -BuildRequires: python2-setuptools -BuildRequires: python2-six -BuildRequires: python2-pytest -%if (0%{?fedora} && 0%{?fedora} <= 27) || (0%{?rhel} && 0%{?rhel} <= 7) -BuildRequires: python-cffi -%else -BuildRequires: python2-cffi -%endif -%endif - -BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: python%{python3_pkgversion}-setuptools -BuildRequires: python%{python3_pkgversion}-cffi -BuildRequires: python%{python3_pkgversion}-six -BuildRequires: python%{python3_pkgversion}-pytest +Source0: %pypi_source bcrypt %description %{sum}. -%if 0%{?with_python2} -%package -n python2-%{modname} -Summary: %{sum} -%{?python_provide:%python_provide python2-%{modname}} - -Requires: python2-six -%if (0%{?fedora} && 0%{?fedora} <= 27) || (0%{?rhel} && 0%{?rhel} <= 7) -Requires: python-cffi -%else -Requires: python2-cffi -%endif -Provides: py-bcrypt = 0.4-11 -Obsoletes: py-bcrypt < 0.4-11 - -%description -n python2-%{modname} -%{sum}. -%endif - - -%package -n python%{python3_pkgversion}-%{modname} +%package -n python3-%{modname} Summary: %{sum} -%{?python_provide:%python_provide python%{python3_pkgversion}-%{modname}} - -Requires: python%{python3_pkgversion}-six -Requires: python%{python3_pkgversion}-cffi -Conflicts: python3-py-bcritp -Provides: python3-py-bcrypt = 0.4-11 -Obsoletes: python3-py-bcrypt < 0.4-11 +# LICENSE.dependencies contains a full license breakdown +License: Apache-2.0 AND LicenseRef-Fedora-Public-Domain AND BSD-3-Clause AND MIT AND (Apache-2.0 OR MIT) AND (Unlicense OR MIT) +BuildRequires: python3-devel +BuildRequires: rust-packaging -%description -n python%{python3_pkgversion}-%{modname} +%description -n python3-%{modname} %{sum}. %prep -%autosetup -n %{modname}-%{version} +%autosetup -n %{modname}-%{version} -p1 +%cargo_prep +rm src/_bcrypt/Cargo.lock + +%generate_buildrequires +%pyproject_buildrequires -t +(cd src/_bcrypt +%cargo_generate_buildrequires +) + %build -%if 0%{?with_python2} -%py2_build -%endif +export RUSTFLAGS="%build_rustflags --cfg pyo3_unsafe_allow_subinterpreters" +%pyproject_wheel -%py3_build +(cd src/_bcrypt +%cargo_license_summary +%{cargo_license} > ../../LICENSE.dependencies +) -%install -%if 0%{?with_python2} -%py2_install -%endif -%py3_install +%install +%pyproject_install +%pyproject_save_files bcrypt -# Better safe than sorry -%if 0%{?with_python2} -find %{buildroot}%{python2_sitearch} -name '*.so' -exec chmod 755 {} ';' -%endif -find %{buildroot}%{python3_sitearch} -name '*.so' -exec chmod 755 {} ';' %check -# Tests can't run on epel7 due to an old pytest -%if (0%{?rhel} && 0%{?rhel} > 7) -%if 0%{?with_python2} -%{__python2} setup.py test -%endif -%{__python3} setup.py test -%endif - +%tox -%if 0%{?with_python2} -%files -n python2-%{modname} -%doc README.rst -%license LICENSE -%{python2_sitearch}/%{modname}/ -%{python2_sitearch}/%{modname}-%{version}* -%endif -%files -n python%{python3_pkgversion}-%{modname} +%files -n python%{python3_pkgversion}-%{modname} -f %{pyproject_files} %doc README.rst -%license LICENSE -%{python3_sitearch}/%{modname}/ -%{python3_sitearch}/%{modname}-%{version}* +%license LICENSE LICENSE.dependencies %changelog -* Fri Jul 12 2024 Arkady L. Shane - 3.1.6-2R.1 -- Rebuilt for MSVSphere 8.10 +* Sun Jan 05 2025 Arkady L. Shane - 4.2.1-1 +- Rebuilt for MSVSphere 10 + +## START: Generated by rpmautospec +* Sat Dec 28 2024 Orion Poplawski - 4.2.1-1 +- Update to 4.2.1 + +* Fri Jul 26 2024 Hector Martin - 4.1.2-5 +- Add support for subinterpreters + +* Fri Jul 19 2024 Fedora Release Engineering - 4.1.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jun 07 2024 Python Maint - 4.1.2-3 +- Rebuilt for Python 3.13 + +* Wed Feb 21 2024 Sandro Mani - 4.1.2-2 +- Add AND (Unlicense OR MIT) to License + +* Mon Feb 19 2024 Sandro Mani - 4.1.2-1 +- Update to 4.1.2 + +* Fri Jan 26 2024 Fedora Release Engineering - 4.0.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 4.0.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Nov 18 2023 Kevin Fenzi - 4.0.1-6 +- Add patch to use current pyo version. Fixes rhbz#2249378 + +* Fri Jul 21 2023 Fedora Release Engineering - 4.0.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jun 14 2023 Python Maint - 4.0.1-4 +- Rebuilt for Python 3.12 + +* Mon May 01 2023 Major Hayden - 4.0.1-3 +- Fix rhbz#2120929 -* Wed Jun 19 2019 Troy Dawson - 3.1.6-1.1 -- Make python2 optional -- Do not build python2 on RHEL8 +* Mon May 01 2023 Major Hayden - 4.0.1-2 +- Switch to rpm-autospec + +* Tue Mar 28 2023 Sandro Mani - 4.0.1-1 +- Update to 4.0.1 + +* Fri Jan 20 2023 Fedora Release Engineering - 3.2.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Mon Jul 25 2022 Miro Hrončok - 3.2.2-4 +- Bump the obsoleted release of python3-py-bcrypt + +* Fri Jul 22 2022 Fedora Release Engineering - 3.2.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 3.2.2-2 +- Rebuilt for Python 3.11 + +* Mon May 02 2022 Major Hayden - 3.2.2-1 +- Update to 3.2.2 + +* Fri Jan 21 2022 Fedora Release Engineering - 3.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Aug 05 2021 Major Hayden - 3.2.0-1 +- Update to 3.2.0 + +* Fri Jul 23 2021 Fedora Release Engineering - 3.1.7-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu Jun 03 2021 Python Maint - 3.1.7-9 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 3.1.7-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 3.1.7-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sat May 23 2020 Miro Hrončok - 3.1.7-6 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 3.1.7-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sun Oct 13 2019 Miro Hrončok - 3.1.7-4 +- Fix %%check conditional to run tests on Fedora + +* Sun Oct 13 2019 Miro Hrončok - 3.1.7-3 +- Subpackage python2-bcrypt has been removed + +* Thu Oct 03 2019 Miro Hrončok - 3.1.7-2 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Tue Aug 20 2019 Pierre-Yves Chibon - 3.1.7-1 +- Upgrade to 3.1.7 + +* Fri Aug 16 2019 Miro Hrončok - 3.1.6-4 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 3.1.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Mon Mar 18 2019 Marc Dequènes (Duck) - 3.1.6-2 - Adaptations to build Python 3 on EPEL @@ -137,72 +182,76 @@ find %{buildroot}%{python3_sitearch} -name '*.so' -exec chmod 755 {} ';' * Fri Feb 08 2019 Alfredo Moralejo - 3.1.6-1 - Update to 3.1.6. -* Sat Feb 02 2019 Fedora Release Engineering - 3.1.4-7 +* Sat Feb 02 2019 Fedora Release Engineering - 3.1.4-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild -* Fri Jul 13 2018 Fedora Release Engineering - 3.1.4-6 +* Fri Jul 13 2018 Fedora Release Engineering - 3.1.4-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild -* Sat Jun 16 2018 Miro Hrončok - 3.1.4-5 +* Tue Jul 10 2018 Igor Gnatenko - 3.1.4-7 +- add BuildRequires: gcc + +* Sat Jun 16 2018 Miro Hrončok - 3.1.4-6 - Rebuilt for Python 3.7 -* Thu Apr 05 2018 Pierre-Yves Chibon - 3.1.4-4 -- Fix Requires for epel7 +* Thu Apr 05 2018 Pierre-Yves Chibon - 3.1.4-5 +- Fix requires on epel7 + +* Wed Apr 04 2018 Pierre-Yves Chibon - 3.1.4-4 +- Adjust spec file to build in epel7 * Fri Feb 09 2018 Fedora Release Engineering - 3.1.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild -* Sat Oct 21 2017 williamjmorenor@gmail.com - 3.1.4-2 -- Update python2 requirements -- Enable tests in build +* Sat Oct 21 2017 William Moreno Reyes - 3.1.4-2 +- Update spec +- Remane to python2-XXX requeriments +- Enable tests in builUpdate spec -* Sat Oct 21 2017 williamjmorenor@gmail.com - 3.1.4-1 +* Sat Oct 21 2017 William Moreno Reyes - 3.1.4-1 - Update to 3.1.4 - Upstream notes: - - Fixed compilation with mingw and on illumos. * Wed Aug 09 2017 Gwyn Ciesla - 3.1.3-4 - Replace py-bcrypt. * Thu Aug 03 2017 Fedora Release Engineering - 3.1.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild +- Rebuilt for + https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 3.1.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild -* Tue Jun 06 2017 William Moreno - 3.1.3-1 -- Update to 3.1.3 upstream release +* Tue Jun 06 2017 William Moreno Reyes - 3.1.3-1 +- Update to v3.1.3 upstream release * Sat Feb 11 2017 Fedora Release Engineering - 3.1.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild -* Fri Feb 10 2017 William Moreno - 3.1.2-1 -- Update to v3.1.2 +* Fri Feb 10 2017 William Moreno Reyes - 3.1.2-1 +- Update to 3.1.2 upstream release * Mon Dec 12 2016 Charalampos Stratakis - 3.1.0-3 - Rebuild for Python 3.6 -* Tue Jul 19 2016 Fedora Release Engineering - 3.1.0-2 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages +* Tue Jul 19 2016 Fedora Release Engineering - 3.1.0-2 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_ + Packages + +* Fri Jul 01 2016 William Moreno Reyes - 3.1.0-1 +- Update to v3.1.0 -* Thu Jun 30 2016 William Moreno - 3.1.0-1 -- Update to bugfix release 3.1.0 -- Add conflicts for the python3 subpackage +* Thu Jun 30 2016 Pierre-Yves Chibon - 3.0.0-2 +- Patch the README file to fix the build on py3 * Thu Jun 30 2016 Pierre-Yves Chibon - 3.0.0-1 -- Update to 3.0.0 (Fixes RHBZ#1351377) +- Upgrade to 3.0.0 -* Thu Feb 04 2016 Fedora Release Engineering - 2.0.0-4 +* Thu Feb 04 2016 Fedora Release Engineering - 2.0.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild -* Wed Jan 06 2016 Pierre-Yves Chibon - 2.0.0-3 -- Add conflicts to py-bcrypt since they both provide a bcrypt python module -- Fix macro that were using %%{module} instead of %%{modname} -- In fact the .so files must be executable, so ensure they are such - -* Wed Jan 06 2016 Pierre-Yves Chibon - 2.0.0-2 -- Fix the license as the package has some Public Domain files -- Ensure the .so files are not executable +* Tue Jan 19 2016 Pierre-Yves Chibon - 2.0.0-2 +- Explain a little more the licensing situation -* Tue Jan 05 2016 Pierre-Yves Chibon - 2.0.0-1 -- initial package for Fedora +* Tue Jan 19 2016 Pierre-Yves Chibon - 2.0.0-1 +- Initial import +## END: Generated by rpmautospec