]> git.pld-linux.org Git - packages/python-pycdio.git/commitdiff
- added update patch (fix build with libcdio 1.0.0: remove obsolete constant) auto/th/python-pycdio-0.20-5
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 10 Dec 2017 20:15:13 +0000 (21:15 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 10 Dec 2017 20:15:13 +0000 (21:15 +0100)
- added python3 package
- release 5

python-pycdio-update.patch [new file with mode: 0644]
python-pycdio.spec

diff --git a/python-pycdio-update.patch b/python-pycdio-update.patch
new file mode 100644 (file)
index 0000000..ac5e48f
--- /dev/null
@@ -0,0 +1,10 @@
+--- pycdio-0.20/swig/device_const.swg.orig     2013-02-20 12:32:41.000000000 +0100
++++ pycdio-0.20/swig/device_const.swg  2017-12-10 20:53:27.839959959 +0100
+@@ -83,7 +83,6 @@
+ /* driver_id_t enums. */
+ %constant long int DRIVER_UNKNOWN = DRIVER_UNKNOWN;
+ %constant long int DRIVER_AIX     = DRIVER_AIX;
+-%constant long int DRIVER_BSDI    = DRIVER_BSDI;
+ %constant long int DRIVER_FREEBSD = DRIVER_FREEBSD;
+ %constant long int DRIVER_LINUX   = DRIVER_LINUX;
+ %constant long int DRIVER_SOLARIS = DRIVER_SOLARIS;
index 777626c29a72d61c1fb2e3f9f0196eb11fa581bb..4bdeac7f5b5d5f4421d74495778ce9e78d101cd1 100644 (file)
@@ -1,28 +1,48 @@
-Summary:       Python bindings for libcdio
-Summary(pl.UTF-8):     Wiązania Pythona do libcdio
+#
+# Conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+Summary:       Python 2 bindings for libcdio
+Summary(pl.UTF-8):     Wiązania Pythona 2 do libcdio
 Name:          python-pycdio
 Version:       0.20
-Release:       4
+Release:       5
 License:       GPL v2+
 Group:         Libraries/Python
 Source0:       http://ftp.gnu.org/gnu/libcdio/pycdio-%{version}.tar.gz
 # Source0-md5: 3f075574f661f49f4ede89aff9ff0cda
+Patch0:                %{name}-update.patch
 URL:           http://www.gnu.org/software/libcdio/
 BuildRequires: libcdio-devel >= 0.84
 BuildRequires: pkgconfig
-BuildRequires: python-devel >= 1:2.3.5
+%{?with_python2:BuildRequires: python-devel >= 1:2.3.5}
+%{?with_python3:BuildRequires: python3-devel >= 1:3.2}
 BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.710
-BuildRequires: swig-python
-%pyrequires_eq python-libs
+BuildRequires: rpmbuild(macros) >= 1.714
+BuildRequires: swig-python >= 3
 Requires:      libcdio >= 0.84
+Requires:      python-libs >= 1:2.3.5
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-Python bindings for libcdio.
+Python bindings for libcdio.
 
 %description -l pl.UTF-8
-Wiązania Pythona do libcdio.
+Wiązania Pythona 2 do libcdio.
+
+%package -n python3-pycdio
+Summary:       Python 3 bindings for libcdio
+Summary(pl.UTF-8):     Wiązania Pythona 3 do libcdio
+Group:         Libraries/Python
+Requires:      libcdio >= 0.84
+Requires:      python3-libs >= 1:3.2
+
+%description -n python3-pycdio
+Python 3 bindings for libcdio.
+
+%description -n python3-pycdio -l pl.UTF-8
+Wiązania Pythona 3 do libcdio.
 
 %package examples
 Summary:       Example programs using Python libcdio bindings
@@ -38,26 +58,40 @@ Przykładowe programy w Pythonie używające libcdio.
 
 %prep
 %setup -q -n pycdio-%{version}
+%patch0 -p1
 
 %build
+%if %{with python2}
 %py_build
+%endif
+
+%if %{with python3}
+%py3_build
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %py_install
 
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 install example/{*.py,README} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
-%py_postclean
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc README.txt
+%doc ChangeLog README.txt THANKS
 %attr(755,root,root) %{py_sitedir}/_pycdio.so
 %attr(755,root,root) %{py_sitedir}/_pyiso9660.so
 %{py_sitedir}/cdio.py[co]
@@ -65,6 +99,24 @@ rm -rf $RPM_BUILD_ROOT
 %{py_sitedir}/pycdio.py[co]
 %{py_sitedir}/pyiso9660.py[co]
 %{py_sitedir}/pycdio-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-pycdio
+%defattr(644,root,root,755)
+%doc ChangeLog README.txt THANKS
+%attr(755,root,root) %{py3_sitedir}/_pycdio.cpython-*.so
+%attr(755,root,root) %{py3_sitedir}/_pyiso9660.cpython-*.so
+%{py3_sitedir}/cdio.py
+%{py3_sitedir}/iso9660.py
+%{py3_sitedir}/pycdio.py
+%{py3_sitedir}/pyiso9660.py
+%{py3_sitedir}/__pycache__/cdio.cpython-*.py[co]
+%{py3_sitedir}/__pycache__/iso9660.cpython-*.py[co]
+%{py3_sitedir}/__pycache__/pycdio.cpython-*.py[co]
+%{py3_sitedir}/__pycache__/pyiso9660.cpython-*.py[co]
+%{py3_sitedir}/pycdio-%{version}-py*.egg-info
+%endif
 
 %files examples
 %defattr(644,root,root,755)
This page took 0.111714 seconds and 4 git commands to generate.