Juan Hernandez has uploaded a new change for review.

Change subject: sdk: Add Python 3 sub package
......................................................................

sdk: Add Python 3 sub package

This patch modifies the RPM .spec so that it generates a new
"ovirt-engine-sdk-python3" sub package that supports Python 3.

Change-Id: I23db5ac5364ff115f5b86f7cf03d015082044f5f
Related: https://bugzilla.redhat.com/1096137
Signed-off-by: Juan Hernandez <juan.hernan...@redhat.com>
---
M ovirt-engine-sdk-python.spec.in
1 file changed, 37 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-sdk refs/changes/53/41353/1

diff --git a/ovirt-engine-sdk-python.spec.in b/ovirt-engine-sdk-python.spec.in
index 2c892e1..477dd84 100644
--- a/ovirt-engine-sdk-python.spec.in
+++ b/ovirt-engine-sdk-python.spec.in
@@ -7,8 +7,10 @@
 URL:            http://ovirt.org
 Source0:        
http://ovirt.org/releases/stable/src/ovirt-engine-sdk-python-%{version}.tar.gz
 
-BuildRequires: python2-devel
+BuildRequires: python-devel
 BuildRequires: python-setuptools
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
 BuildArch: noarch
 
 Requires: python
@@ -22,6 +24,16 @@
 This package contains The oVirt-Engine Software Development Kit.
 With this package, custom software can be built for oVirt-Engine.
 
+%package -n ovirt-engine-sdk-python3
+Summary: oVirt Engine Software Development Kit (Python)
+Requires: python3
+Requires: python3-lxml
+Requires: python3-pycurl >= 7.19.0
+
+%description -n ovirt-engine-sdk-python3
+This package contains The oVirt-Engine Software Development Kit.
+With this package, custom software can be built for oVirt-Engine.
+
 %prep
 %setup -q -n %{name}
 
@@ -29,11 +41,28 @@
 # executable script:
 sed -i 1d src/ovirtsdk/xml/params.py
 
+# Copy the sources to the Python 3 build directory:
+cp -a . %{py3dir}
+
 %build
+
+# Build for Python 2:
 %{__python} setup.py build
 
+# Build for Python 3:
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+
 %install
+
+# Install for Python 2:
 %{__python} setup.py install -O1 --skip-build --root %{buildroot}
+
+# Install for Python 3:
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+popd
 
 %files
 %{python_sitelib}/ovirtsdk
@@ -42,6 +71,13 @@
 %doc LICENSE.txt
 %doc README.md
 
+%files -n ovirt-engine-sdk-python3
+%{python3_sitelib}/ovirtsdk
+%{python3_sitelib}/ovirt_engine_sdk_python-*-info
+%doc AUTHORS.md
+%doc LICENSE.txt
+%doc README.md
+
 %changelog
 * Tue Oct 28 2014 Juan Hernandez <juan.hernan...@redhat.com> - 3.6.0.0-0
 - Add empty export method to decorator base #1024696.


-- 
To view, visit https://gerrit.ovirt.org/41353
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23db5ac5364ff115f5b86f7cf03d015082044f5f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine-sdk
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernan...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to