Blob Blame Raw
# Setup _pkgdocdir if not defined already.
%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}

%global pypi_name bitstruct
%global global_desc \
This module performs conversions between Python values and C bit \
field structs represented as Python byte strings.  It is intended to \
have a similar interface as the python struct module, but working on \
bits instead of primitive data types (char, int, …).


Name:           python-%{pypi_name}
Version:        7.1.0
Release:        5%{?dist}
Summary:        Interpret strings as packed binary data

License:        MIT
URL:            https://pypi.python.org/pypi/%{pypi_name}
Source0:        https://files.pythonhosted.org/packages/source/b/%{pypi_name}/%{pypi_name}-%{version}.tar.gz

BuildArch:      noarch

%description
%{global_desc}


%package        doc
Summary:        Documentation-files for %{name}

BuildRequires:  python3-sphinx
BuildRequires:  python3-sphinx_rtd_theme

%description    doc
This package contains the documentation-files
for %{name}.


%package        -n python3-%{pypi_name}
Summary:        %{summary}

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools

%{?python_provide:%python_provide python3-%{pypi_name}}

%description    -n python3-%{pypi_name}
%{global_desc}


%prep
%autosetup -n %{pypi_name}-%{version}


%build
%py3_build
%make_build -C docs html
%{_bindir}/find docs/_build -name '.*' -print0 | %{_bindir}/xargs -0 %{__rm} -frv


%install
%py3_install
%{__mkdir} -p %{buildroot}/%{_pkgdocdir}
%{__cp} -a docs/_build/html PKG-INFO README.rst %{buildroot}/%{_pkgdocdir}


%check
%{__python3} setup.py test


%files doc
%license LICENSE
%doc %{_pkgdocdir}


%files -n python3-%{pypi_name}
%license LICENSE
%doc %dir %{_pkgdocdir}
%doc %{_pkgdocdir}/PKG-INFO
%doc %{_pkgdocdir}/README.rst
%{python3_sitelib}/%{pypi_name}.py
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
%{python3_sitelib}/__pycache__/%{pypi_name}.cpython-%{python3_version_nodots}*.pyc


%changelog
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 7.1.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 7.1.0-4
- Rebuilt for Python 3.8.0rc1 (#1748018)

* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 7.1.0-3
- Rebuilt for Python 3.8

* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Mon Jun 03 2019 Björn Esser <besser82@fedoraproject.org> - 7.1.0-1
- New upstream release (rhbz#1574056)
- Explicitly BR: python3-sphinx_rtd_theme (rhbz#1716451)
- Do not remove inventory files generated by sphinx

* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Tue Jan 15 2019 Miro Hrončok <mhroncok@redhat.com> - 3.7.0-5
- Subpackage python2-bitstruct has been removed
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.7.0-3
- Rebuilt for Python 3.7

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Sat Jan 06 2018 Björn Esser <besser82@fedoraproject.org> - 3.7.0-1
- New upstream release (rhbz#11504327)

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Fri May 12 2017 Björn Esser <besser82@fedoraproject.org> - 3.4.0-1
- New upstream release (rhbz#1450026)

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 3.3.1-2
- Rebuild for Python 3.6

* Mon Oct 24 2016 Björn Esser <fedora@besser82.io> - 3.3.1-1
- Initial import (rhbz 1387836)

* Sat Oct 22 2016 Björn Esser <fedora@besser82.io> - 3.3.1-0.1
- Initial package (rhbz 1387836)