13e70c
%if 0%{?rhel} > 7
13e70c
# Disable python2 build by default
13e70c
%bcond_with python2
13e70c
%else
13e70c
%bcond_without python2
13e70c
%endif
13e70c
13e70c
Name: pyusb
13e70c
Version: 1.0.0
9461c8
Release: 9.1%{?dist}
13e70c
Summary: Python bindings for libusb
13e70c
License: BSD
13e70c
URL: http://pyusb.sourceforge.net/
13e70c
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.zip
13e70c
BuildRequires: libusb-devel
13e70c
BuildArch: noarch
13e70c
13e70c
%global _description\
13e70c
PyUSB provides easy USB access to python. The module contains classes and\
13e70c
methods to support most USB operations.
13e70c
13e70c
%description %_description
13e70c
13e70c
%if %{with python2}
13e70c
%package -n python2-pyusb
13e70c
Summary: %summary
13e70c
%{?python_provide:%python_provide python2-pyusb}
13e70c
BuildRequires: python2-devel
13e70c
# Remove before F30
13e70c
Provides:      pyusb = %{version}-%{release}
13e70c
Obsoletes:     pyusb < %{version}-%{release}
13e70c
13e70c
%description -n python2-pyusb %_description
13e70c
%endif # with python2
13e70c
13e70c
%package -n python3-pyusb
13e70c
Summary:       %summary
13e70c
%{?python_provide:%python_provide python3-pyusb}
13e70c
BuildRequires: python3-devel
13e70c
13e70c
%description -n python3-pyusb
13e70c
PyUSB provides easy USB access to python. The module contains classes and 
13e70c
methods to support most USB operations.
13e70c
13e70c
%prep
13e70c
%autosetup
13e70c
sed -i -e 's/\r//g' README.rst
13e70c
13e70c
%build
13e70c
%if %{with python2}
13e70c
%py2_build
13e70c
%endif # with python2
13e70c
%py3_build
13e70c
13e70c
%install
13e70c
%if %{with python2}
13e70c
%py2_install
13e70c
%endif # with python2
13e70c
%py3_install
13e70c
13e70c
%if %{with python2}
13e70c
%files -n python2-pyusb
13e70c
%license LICENSE
13e70c
%doc README.rst
13e70c
%{python2_sitelib}/*
13e70c
%endif # with python2
13e70c
13e70c
%files -n python3-pyusb
13e70c
%license LICENSE
13e70c
%doc README.rst
13e70c
%{python3_sitelib}/*
13e70c
13e70c
%changelog
9461c8
* Thu Jun 16 2022 Florence Blanc-Renaud <frenaud@redhat.com> - 1.0.0-9.1
9461c8
- Rebuilt to fix the NVR issue (#2094880)
9461c8
13e70c
* Tue Jun 19 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.0.0-9
13e70c
- Conditionalize the python2 subpackage
13e70c
13e70c
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-8
13e70c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
13e70c
13e70c
* Tue Sep 05 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.0.0-7
13e70c
- Cleanup packaging and fix archful provide in noarch package
13e70c
13e70c
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.0-6
13e70c
- Python 2 binary package renamed to python2-pyusb
13e70c
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
13e70c
13e70c
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-5
13e70c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
13e70c
13e70c
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-4
13e70c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
13e70c
13e70c
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-3
13e70c
- Rebuild for Python 3.6
13e70c
13e70c
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
13e70c
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
13e70c
13e70c
* Tue Jun 14 2016 Jon Ciesla <limburgher@gmail.com> - 1.0.0-1
13e70c
- Latest upstream, BZ 1192561.
13e70c
13e70c
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-0.14.b2
13e70c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
13e70c
13e70c
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-0.13.b2
13e70c
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
13e70c
13e70c
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-0.12.b2
13e70c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
13e70c
13e70c
* Fri Feb 13 2015 Jon Ciesla <limburgher@gmail.com> - 1.0.0-0.11.b2
13e70c
- Latest upstream, BZ 1192561.
13e70c
13e70c
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-0.10.b1
13e70c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
13e70c
13e70c
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 1.0.0-0.9.b1
13e70c
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
13e70c
13e70c
* Mon Nov 11 2013 Jon Ciesla <limburgher@gmail.com> - 1.0.0-0.8.b1
13e70c
- Latest upstream.
13e70c
- Add python3 support, spec cleanup, BZ 1022851.
13e70c
- Fixed changelog.
13e70c
13e70c
* Fri Sep 13 2013 Jon Ciesla <limburgher@gmail.com> - 1.0.0-0.7.a3
13e70c
- Latest upstream.
13e70c
13e70c
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-0.6.a2
13e70c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
13e70c
13e70c
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-0.5.a2
13e70c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
13e70c
13e70c
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-0.4.a2
13e70c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
13e70c
13e70c
* Mon Jan 23 2012 Tim Waugh <twaugh@redhat.com> - 1.0.0-0.3.a2
13e70c
- 1.0.0-a2.
13e70c
13e70c
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-0.2.a1
13e70c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
13e70c
13e70c
* Thu Jun 30 2011 Tim Waugh <twaugh@redhat.com> - 1.0.0-0.1.a1
13e70c
- 1.0.0-a1 (bug #586950).
13e70c
13e70c
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-7
13e70c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
13e70c
13e70c
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.4.1-6
13e70c
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
13e70c
13e70c
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-5
13e70c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
13e70c
13e70c
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-4
13e70c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
13e70c
13e70c
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.4.1-3
13e70c
- Rebuild for Python 2.6
13e70c
13e70c
* Mon Jun 16 2008 Jeremy Katz <katzj@redhat.com> - 0.4.1-2
13e70c
- Fix end-of-line in README
13e70c
13e70c
* Mon Jun 16 2008 Jeremy Katz <katzj@redhat.com> - 0.4.1-1
13e70c
- Initial packaging
13e70c