mcepl pushed to python-cryptography-vectors (f20). "Add python3 subpackage"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Apr 14 15:53:48 UTC 2015


>From 186750b4f995e76976de476a0f7024a0b87c0313 Mon Sep 17 00:00:00 2001
From: Nathaniel McCallum <npmccallum at redhat.com>
Date: Wed, 4 Mar 2015 12:44:53 -0500
Subject: Add python3 subpackage


diff --git a/python-cryptography-vectors.spec b/python-cryptography-vectors.spec
index 4a003ca..b0207e0 100644
--- a/python-cryptography-vectors.spec
+++ b/python-cryptography-vectors.spec
@@ -1,7 +1,10 @@
+%if 0%{?fedora} > 12
+%global with_python3 1
+%endif
+
 %if 0%{?rhel} && 0%{?rhel} <= 6
 %{!?__python2:        %global __python2 /usr/bin/python2}
 %{!?python2_sitelib:  %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
-%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %endif
 
 %global modname cryptography-vectors
@@ -9,7 +12,7 @@
 
 Name:               python-%{modname}
 Version:            0.7.2
-Release:            1%{?dist}
+Release:            2%{?dist}
 Summary:            Test vectors for the cryptography package
 
 Group:              Development/Libraries
@@ -19,6 +22,9 @@ Source0:            https://pypi.python.org/packages/source/c/%{modname}/cryptog
 
 BuildArch:          noarch
 BuildRequires:      python2-devel python-setuptools
+%if 0%{?with_python3}
+BuildRequires:      python3-devel python3-setuptools
+%endif
 
 %description
 Test vectors for the cryptography package.
@@ -27,6 +33,19 @@ The only purpose of this package is to be a building requirement for
 python-cryptography, otherwise it has no use. Don’t install it unless
 you really know what you are doing.
 
+%if 0%{?with_python3}
+%package -n  python3-%{modname}
+Group:          Development/Libraries
+Summary:        Test vectors for the cryptography package
+
+%description -n python3-%{modname}
+Test vectors for the cryptography package.
+
+The only purpose of this package is to be a building requirement for
+python-cryptography, otherwise it has no use. Don’t install it unless
+you really know what you are doing.
+%endif
+
 %prep
 %setup -q -n %{pymodname}-%{version}
 
@@ -36,24 +55,39 @@ rm -rf %{modname}.egg-info
 
 %build
 CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build
-
+%if 0%{?with_python3}
+CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
+%endif
 
 %install
-
 %{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
+%if 0%{?with_python3}
+%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
+%endif
 
 %check
 %{__python2} setup.py test
-
+%if 0%{?with_python3}
+%{__python3} setup.py test
+%endif
 
 %files
 %doc LICENSE
 %{python2_sitelib}/%{pymodname}/
 %{python2_sitelib}/%{pymodname}-%{version}*
 
+%if 0%{?with_python3}
+%files -n python3-%{modname}
+%doc LICENSE
+%{python3_sitelib}/%{pymodname}/
+%{python3_sitelib}/%{pymodname}-%{version}*
+%endif
 
 
 %changelog
+* Wed Mar 04 2015 Nathaniel McCallum <npmccallum at redhat.com> - 0.7.2-2
+- Add python3 subpackage
+
 * Wed Mar 04 2015 Nathaniel McCallum <npmccallum at redhat.com> - 0.7.2-1
 - New upstream release
 - Now licensed under Apache 2.0 or BSD
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/python-cryptography-vectors.git/commit/?h=f20&id=186750b4f995e76976de476a0f7024a0b87c0313


More information about the scm-commits mailing list