%global srcname bitstring %global sum Simple construction, analysis and modification of binary data Name: python-%{srcname} Version: 3.1.5 Release: 1%{?dist} Summary: %{sum} Group: Development/Libraries 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 python2-%{srcname} Summary: %{sum} BuildRequires: python2-devel BuildRequires: python-nose %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{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. %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 %py2_build %py3_build %install %py2_install %py3_install %check nosetests-%{python2_version} -w test nosetests-%{python3_version} -w test %files -n python2-%{srcname} %doc README.rst release_notes.txt %license LICENSE %{python2_sitelib}/%{srcname}.{py,pyc,pyo} %{python2_sitelib}/%{srcname}-%{version}-py?.?.egg-info %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 * Sun May 21 2017 Scott K Logan - 3.1.5-1 - Update to 3.1.5 - Include LICENSE file * Tue Apr 26 2016 Scott K Logan - 3.1.4-1 - Initial package