Blob Blame History Raw
%global srcname bitstring
%global sum Simple construction, analysis and modification of binary data

Name:           python-%{srcname}
Version:        3.1.5
Release:        7%{?dist}
Summary:        %{sum}

License:        MIT
URL:            https://github.com/scott-griffiths/%{srcname}
Source0:        https://github.com/scott-griffiths/%{srcname}/archive/%{srcname}-%{version}.tar.gz#/%{srcname}-%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  dos2unix

%description
bitstring is a pure Python module designed to help make the creation and
analysis of binary data as simple and natural as possible.

Bitstrings can be constructed from integers (big and little endian), hex,
octal, binary, strings or files. They can be sliced, joined, reversed,
inserted into, overwritten, etc. with simple functions or slice notation.
They can also be read from, searched and replaced, and navigated in, similar
to a file or stream.

%package -n python3-%{srcname}
Summary:        %{sum}
BuildRequires:  python3-devel
BuildRequires:  python3-nose
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
bitstring is a pure Python module designed to help make the creation and
analysis of binary data as simple and natural as possible.

Bitstrings can be constructed from integers (big and little endian), hex,
octal, binary, strings or files. They can be sliced, joined, reversed,
inserted into, overwritten, etc. with simple functions or slice notation.
They can also be read from, searched and replaced, and navigated in, similar
to a file or stream.

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

dos2unix README.rst release_notes.txt
sed -i '1{\@^#!/usr/bin/env python@d}' %{srcname}.py

%build
%py3_build

%install
%py3_install

%check
nosetests-%{python3_version} -w test

%files -n python3-%{srcname}
%doc README.rst release_notes.txt
%license LICENSE
%{python3_sitelib}/%{srcname}.py
%{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info
%{python3_sitelib}/__pycache__/%{srcname}*.{pyc,pyo}

%changelog
* Wed Oct 17 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.1.5-7
- Subpackage python2-bitstring 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.1.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

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

* Sun Feb 11 2018 Iryna Shcherbina <ishcherb@redhat.com> - 3.1.5-4
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

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

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

* Sun May 21 2017 Scott K Logan <logans@cottsay.net> - 3.1.5-1
- Update to 3.1.5
- Include LICENSE file

* Tue Apr 26 2016 Scott K Logan <logans@cottsay.net> - 3.1.4-1
- Initial package