[packages/python-pyusb] - updated to 1.0.0 - now with libusb 1 or libusb 0 support via ctypes - added python3 package

qboosh qboosh at pld-linux.org
Sat May 21 20:55:28 CEST 2016


commit 279ffc8bb4ca67f29afb6ba114bd678fd2a68f02
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat May 21 20:55:52 2016 +0200

    - updated to 1.0.0
    - now with libusb 1 or libusb 0 support via ctypes
    - added python3 package

 python-pyusb.spec | 72 +++++++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 59 insertions(+), 13 deletions(-)
---
diff --git a/python-pyusb.spec b/python-pyusb.spec
index c3de11b..bb24cb5 100644
--- a/python-pyusb.spec
+++ b/python-pyusb.spec
@@ -1,19 +1,30 @@
+#
+# Conditional build:
+%bcond_without	python2 # CPython 2.x module
+%bcond_without	python3 # CPython 3.x module
+
 %define	module	pyusb
 Summary:	PyUSB provides USB access on the Python language
 Summary(pl.UTF-8):	PyUSB - dostęp do USB z poziomu języka Python
 Name:		python-%{module}
-Version:	0.4.2
-Release:	3
+Version:	1.0.0
+Release:	1
 License:	BSD
 Group:		Development/Languages/Python
 Source0:	http://downloads.sourceforge.net/pyusb/%{module}-%{version}.tar.gz
-# Source0-md5:	5667a00af1ac0d5062103b4512e227f8
+# Source0-md5:	9b173ae33866a2fb4162e0164f01c284
 URL:		http://pyusb.sourceforge.net/
-BuildRequires:	rpmbuild(macros) >= 1.710
-BuildRequires:	libusb-compat-devel
-BuildRequires:	python-devel
 BuildRequires:	rpm-pythonprov
-%pyrequires_eq	python
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with python2}
+BuildRequires:	python-devel >= 1:2.5
+%endif
+%if %{with python3}
+BuildRequires:	python3-devel >= 1:3.2
+%endif
+Requires:	python-libs >= 1:2.5
+Requires:	libusb >= 1.0.0
+BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -22,24 +33,59 @@ PyUSB provides USB access on the Python language.
 %description -l pl.UTF-8
 PyUSB daje dostęp do USB z poziomu języka Python.
 
+%package -n python3-%{module}
+Summary:	PyUSB provides USB access on the Python language
+Summary(pl.UTF-8):	PyUSB - dostęp do USB z poziomu języka Python
+Group:		Development/Languages/Python
+Requires:	python3-libs >= 1:3.2
+Requires:	libusb >= 1.0.0
+
+%description -n python3-%{module}
+PyUSB provides USB access on the Python language.
+
+%description -n python3-%{module} -l pl.UTF-8
+PyUSB daje dostęp do USB z poziomu języka Python.
+
 %prep
 %setup -q -n %{module}-%{version}
 
 %build
+%if %{with python2}
 %py_build
+%endif
+
+%if %{with python3}
+%py3_build
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%py_install \
-	--optimize 2 \
-	--root=$RPM_BUILD_ROOT
+%if %{with python2}
+%py_install
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc README
-%attr(755,root,root) %{py_sitedir}/*.so
-%{py_sitedir}/*.egg*
+%doc ACKNOWLEDGEMENTS ChangeLog LICENSE README.rst docs/*.rst
+%{py_sitescriptdir}/usb
+%{py_sitescriptdir}/pyusb-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc ACKNOWLEDGEMENTS ChangeLog LICENSE README.rst docs/*.rst
+%{py3_sitescriptdir}/usb
+%{py3_sitescriptdir}/pyusb-%{version}-py*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pyusb.git/commitdiff/279ffc8bb4ca67f29afb6ba114bd678fd2a68f02



More information about the pld-cvs-commit mailing list