[python-pycurl/private-kdudka-python3: 5/6] add python3 subpackage (#1014583)

Kamil Dudka kdudka at fedoraproject.org
Fri Nov 22 16:02:09 UTC 2013


commit d055fd3966b1bd5a210302823a90f308bb5116cd
Author: Kamil Dudka <kdudka at redhat.com>
Date:   Thu Aug 8 14:09:15 2013 +0200

    add python3 subpackage (#1014583)

 python-pycurl.spec |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)
---
diff --git a/python-pycurl.spec b/python-pycurl.spec
index 5f87846..683b3c3 100644
--- a/python-pycurl.spec
+++ b/python-pycurl.spec
@@ -2,7 +2,7 @@
 
 Name:           python-pycurl
 Version:        7.19.0.2
-Release:        1%{?dist}
+Release:        1.1%{?dist}
 Summary:        A Python interface to libcurl
 
 Group:          Development/Languages
@@ -13,6 +13,7 @@ Patch0:         pycurl-7.19.0.2-pyton3.patch
 
 Requires:       keyutils-libs
 BuildRequires:  python-devel
+BuildRequires:  python3-devel
 BuildRequires:  curl-devel >= 7.19.0
 BuildRequires:  openssl-devel
 BuildRequires:  python-bottle
@@ -38,6 +39,15 @@ objects identified by a URL from a Python program, similar to the
 urllib Python module. PycURL is mature, very fast, and supports a lot
 of features.
 
+%package -n python3-pycurl
+Summary:        A Python interface to libcurl for Python 3
+
+%description -n python3-pycurl
+PycURL is a Python interface to libcurl. PycURL can be used to fetch
+objects identified by a URL from a Python program, similar to the
+urllib Python module. PycURL is mature, very fast, and supports a lot
+of features.
+
 %prep
 %setup0 -q -n pycurl-%{version}
 %patch0 -p1
@@ -48,8 +58,15 @@ rm -f tests/certinfo_test.py
 # temporarily disable intermittently failing test-case
 rm -f tests/multi_socket_select_test.py
 
+# copy the whole directory for the python3 build
+cp -a . %{py3dir}
+
 %build
-CFLAGS="$RPM_OPT_FLAGS -DHAVE_CURL_OPENSSL" %{__python} setup.py build
+export CFLAGS="$RPM_OPT_FLAGS -DHAVE_CURL_OPENSSL"
+%{__python} setup.py build
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
 
 %check
 export PYTHONPATH=$RPM_BUILD_ROOT%{python_sitearch}
@@ -57,13 +74,23 @@ make test PYTHON=%{__python}
 
 %install
 %{__python} setup.py install -O1 --skip-build --root %{buildroot}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+popd
 rm -rf %{buildroot}%{_datadir}/doc/pycurl
 
 %files
 %doc COPYING COPYING2 ChangeLog README.rst TODO examples doc tests
 %{python_sitearch}/*
 
+%files -n python3-pycurl
+%doc COPYING COPYING2 ChangeLog README.rst TODO examples doc tests
+%{python3_sitearch}/*
+
 %changelog
+* Fri Nov 22 2013 Kamil Dudka <kdudka at redhat.com> - 7.19.0.2-1.1
+- add python3 subpackage (#1014583)
+
 * Tue Oct 08 2013 Kamil Dudka <kdudka at redhat.com> - 7.19.0.2-1
 - update to 7.19.0.2
 


More information about the scm-commits mailing list