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