From bbdab8fee4b981bbb3aff4202db393e3821806d5 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Nov 19 2013 14:46:19 +0000 Subject: 0.4, Python3. --- diff --git a/.gitignore b/.gitignore index bb4e7ed..13f4009 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ py-bcrypt-0.2.tar.gz /py-bcrypt-0.3.tar.gz +/py-bcrypt-0.4.tar.gz diff --git a/py-bcrypt.spec b/py-bcrypt.spec index d5a8e86..3177f2d 100644 --- a/py-bcrypt.spec +++ b/py-bcrypt.spec @@ -1,15 +1,22 @@ #$Id$ -%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) + +# I replaced the first line of this section to comply with the example in https://fedoraproject.org/wiki/Packaging:Python#Macros +# However that same page says that it is no longer necessary, so perhaps can be removed? +%if 0%{?rhel} && 0%{?rhel} <= 5 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif +%if 0%{?fedora} > 12 || 0%{?rhel} > 6 +%global with_python3 1 +%endif + Summary: Python bindings for OpenBSD's Blowfish password hashing code Name: py-bcrypt -Version: 0.3 -Release: 2%{?dist} +Version: 0.4 +Release: 1%{?dist} License: BSD with advertising Group: Development/Libraries URL: http://code.google.com/p/py-bcrypt/ @@ -17,6 +24,11 @@ Source: http://py-bcrypt.googlecode.com/files/py-bcrypt-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: python2-devel +%if 0%{?with_python3} +BuildRequires: python3-devel +%endif + +%global __provides_exclude_from ^(%{python2_sitearch}/.*\\.so|%{_datadir}/py-bcrypt/.*)$ %description python-bcrypt is a Python wrapper of OpenBSD's Blowfish password hashing @@ -29,28 +41,67 @@ password cracking and frustrate fast hardware implementation. The computation cost of the algorithm is parametised, so it can be increased as computers get faster. The intent is to make a compromise of a password database less likely to result in an attacker gaining knowledge of the +plain-text passwords (e.g. using John the Ripper). + +%if 0%{?with_python3} +%package -n python3-py-bcrypt +Summary: Python 3 bindings for OpenBSD's Blowfish password hashing code +Group: Development/Libraries + +%description -n python3-py-bcrypt +python-bcrypt is a Python wrapper of OpenBSD's Blowfish password hashing +code, as described in "A Future-Adaptable Password Scheme" by Niels +Provos and David Mazières. + +This system hashes passwords using a version of Bruce Schneier's Blowfish +block cipher with modifications designed to raise the cost of off-line +password cracking and frustrate fast hardware implementation. The +computation cost of the algorithm is parametised, so it can be increased +as computers get faster. The intent is to make a compromise of a password +database less likely to result in an attacker gaining knowledge of the plaintext passwords (e.g. using John the Ripper). +This package allows for use of py-bcrypt with Python 3. +%endif # with_python3 + + %prep %setup -q -n %{name}-%{version} %build -%{__python} setup.py build +%{__python2} setup.py build +%if 0%{?with_python3} +%{__python3} setup.py build +%endif %install rm -rf %{buildroot} -%{__python} setup.py install -O1 --skip-build --root="%{buildroot}" --prefix="%{_prefix}" +%{__python2} setup.py install -O1 --skip-build --root="%{buildroot}" --prefix="%{_prefix}" +%if 0%{?with_python3} +%{__python3} setup.py install -O1 --skip-build --root="%{buildroot}" --prefix="%{_prefix}" +%endif %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) -%doc LICENSE MANIFEST.in README TODO -%{python_sitearch}/py_bcrypt-%{version}-py2.* -%{python_sitearch}/bcrypt +%doc LICENSE README TODO +%{python2_sitearch}/py_bcrypt-%{version}-py2.* +%{python2_sitearch}/bcrypt + +%if 0%{?with_python3} +%files -n python3-py-bcrypt +%defattr(-,root,root,-) +%doc LICENSE README TODO +%{python3_sitearch}/py_bcrypt-%{version}-py3.* +%{python3_sitearch}/bcrypt +%endif %changelog +* Tue Nov 19 2013 Jon Ciesla - 0.4-1 +- Latest upstream, added support for Python 3 and two new functions: bcrypt.checkpw() and bcrypt.kdf() + * Sun Aug 04 2013 Fedora Release Engineering - 0.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild diff --git a/sources b/sources index 470beae..d4529a7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ee85276d9ef7bce4086e3b12b182356f py-bcrypt-0.3.tar.gz +dd8b367d6b716a2ea2e72392525f4e36 py-bcrypt-0.4.tar.gz