From 84339d4cb7200edf5e2bc234ab3e07b0bdd074d5 Mon Sep 17 00:00:00 2001 From: sean-lau Date: Tue, 11 May 2021 15:28:01 +0800 Subject: [PATCH] Add package for OpenStack R and Q support --- python-bcrypt.spec | 101 +++++++++++++++++++++++++++------------------ 1 file changed, 60 insertions(+), 41 deletions(-) diff --git a/python-bcrypt.spec b/python-bcrypt.spec index c41cfd3..05d43cb 100644 --- a/python-bcrypt.spec +++ b/python-bcrypt.spec @@ -1,62 +1,81 @@ -Name: python-bcrypt -Summary: Good password hashing for your software and your servers -Version: 3.1.4 -Release: 9 -License: ASL 2.0 and Public Domain and BSD -URL: http://pypi.python.org/pypi/bcrypt -Source0: https://files.pythonhosted.org/packages/source/b/bcrypt/bcrypt-%{version}.tar.gz +%global _empty_manifest_terminate_build 0 +Name: python-bcrypt +Version: 3.1.4 +Release: 1 +Summary: Modern password hashing for your software and your servers +License: Apache-2.0 +URL: https://github.com/pyca/bcrypt/ +Source0: https://files.pythonhosted.org/packages/f3/ec/bb6b384b5134fd881b91b6aa3a88ccddaad0103857760711a5ab8c799358/bcrypt-3.1.4.tar.gz Patch6000: backport-Don-t-emit-warnings-here-there-s-no-point-137.patch -BuildRequires: gcc -BuildRequires: python3-devel python3-setuptools python3-cffi python3-six python3-pytest - %description Good password hashing for your software and your servers. This library should be compatible with py-bcrypt and it will run on Python 2.7, 3.4+, and PyPy 2.6+. -%package -n python3-bcrypt -Summary: Good password hashing for your software and your servers -Requires: python3-six python3-cffi -Conflicts: python3-py-bcritp -Provides: python3-py-bcrypt = 0.4-11 -Obsoletes: python3-py-bcrypt < 0.4-11 -%{?python_provide:%python_provide python3-bcrypt} +%package -n python2-bcrypt +Summary: Modern password hashing for your software and your servers +Provides: python2-bcrypt +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-cffi +BuildRequires: gcc +BuildRequires: gdb +BuildRequires: python2-pytest +%description -n python2-bcrypt +Good password hashing for your software and your servers. +This library should be compatible with py-bcrypt and it will run on Python 2.7, 3.4+, and PyPy 2.6+. -%description -n python3-bcrypt +%package help +Summary: Development documents and examples for bcrypt +Provides: python2-bcrypt-doc +%description help Good password hashing for your software and your servers. -This library should be compatible with py-bcrypt and it will run on Python 3.4+ and PyPy 2.6+. +This library should be compatible with py-bcrypt and it will run on Python 2.7, 3.4+, and PyPy 2.6+. %prep -%autosetup -n bcrypt-%{version} -p1 +%autosetup -n bcrypt-3.1.4 -p1 %build -%py3_build +%py2_build %install -%py3_install - -#find %{buildroot}%{python3_sitearch} -name '*.so' -exec chmod 755 {} ';' +%py2_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . %check -%{__python3} setup.py test +%{__python2} setup.py test -%files -n python3-bcrypt -%doc README.rst -%license LICENSE -%{python3_sitearch}/bcrypt/ -%{python3_sitearch}/bcrypt-%{version}* +%files -n python2-bcrypt -f filelist.lst +%dir %{python2_sitearch}/* +%files help -f doclist.lst +%{_docdir}/* %changelog -* Sat Feb 27 2021 extinctfire - 3.1.4-9 -- Type:bugfix -- ID:NA -- SUG:NA -- DESC:Don't emit warning in test_kdf, there's no point whoops here - -* Wed Oct 21 2020 jinzhimin - 3.1.4-8 -- remove python2-bcrypt subpackage - -* Wed Nov 13 2019 Lijin Yang - 3.1.4-7 -- init package +* Tue May 11 2021 OpenStack_SIG +- Package Spec generated -- Gitee