[python-rsa] Fix build for F20
Yohan Graterol
yograterol at fedoraproject.org
Tue Aug 6 02:21:38 UTC 2013
commit b43c0a069f127415c8a2774af005e07bf3e0fab3
Author: Yohan Graterol <yohangraterol92 at gmail.com>
Date: Mon Aug 5 21:51:24 2013 -0430
Fix build for F20
python-rsa.spec | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 56 insertions(+), 3 deletions(-)
---
diff --git a/python-rsa.spec b/python-rsa.spec
index d757512..66c0f49 100644
--- a/python-rsa.spec
+++ b/python-rsa.spec
@@ -2,7 +2,7 @@
Name: python-rsa
Version: 3.1.1
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Pure-Python RSA implementation
License: ASL 2.0
@@ -14,28 +14,81 @@ BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-pyasn1
BuildRequires: python-unittest2
+%if 0%{?with_python3}
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pyasn1
+BuildRequires: python3-nose
+%endif # if with_python3
%description
Pure-Python RSA implementation
+%if 0%{?with_python3}
+%package -n python3-rsa
+Summary: Pure-Python RSA implementation
+Group: Development/Library
+
+%description -n python3-rsa
+Pure-Python RSA implementation
+%endif # with_python3
+
%prep
%setup -q -n %{pkgname}-%{version}
rm -rf %{pkgname}-*.egg-info
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
+%endif # with_python3
+
+find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
+
%build
%{__python} setup.py build
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with_python3
%install
-%{__python} setup.py install -O1 --skip-build --root {BUILDROOT}
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root %{buildroot}
+popd
+%endif # with_python3
+
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
%check
%{__python} run_tests.py
-
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py test
+popd
+%endif # with_python3
+
%files
%doc LICENSE
+%{_bindir}/pyrsa*
+%{python_sitelib}/rsa
+%{python_sitelib}/rsa-*.egg-info
+
+%if 0%{?with_python3}
+%files -n python3-rsa
+%defattr(-,root,root,-)
+%doc LICENSE
+%{python3_sitelib}/rsa
+%{python3_sitelib}/rsa-*.egg-info
+%endif # with_python3
%changelog
+* Mon Aug 05 2013 Yohan Graterol <yohangraterol92 at gmail.com> - 3.1.1-4
+- Add support to Python3
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
More information about the scm-commits
mailing list