diff --git a/bitstring-bitstring-3.1.7.tar.gz b/bitstring-bitstring-3.1.7.tar.gz deleted file mode 100644 index 93fd7a24fee565c572ceddb4c5cb80db7acaad6e..0000000000000000000000000000000000000000 Binary files a/bitstring-bitstring-3.1.7.tar.gz and /dev/null differ diff --git a/bitstring-bitstring-3.1.9.tar.gz b/bitstring-bitstring-3.1.9.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f1fec7e554de86ce2d196b2147a18ee3373b2c8a Binary files /dev/null and b/bitstring-bitstring-3.1.9.tar.gz differ diff --git a/python-bitstring.spec b/python-bitstring.spec index 3054aae46ec1fbeb48a9dc9252c1d629e2459d0e..06e512202d0025ea024739060d9052ab8b76e885 100644 --- a/python-bitstring.spec +++ b/python-bitstring.spec @@ -1,13 +1,14 @@ +%{?!_without_python2:%global with_python2 0%{?_with_python2:1} || !(0%{?fedora} >= 30 || 0%{?rhel} >= 8)} +%{?!_without_python3:%global with_python3 0%{?_with_python3:1} || !0%{?rhel} || 0%{?rhel} >= 7} %global srcname bitstring Name: python-%{srcname} -Version: 3.1.7 +Version: 3.1.9 Release: 1 Summary: Simple construction, analysis and modification of binary data - License: MIT URL: https://github.com/scott-griffiths/%{srcname} -Source0: %{srcname}-%{srcname}-%{version}.tar.gz +Source0: https://github.com/scott-griffiths/%{srcname}/archive/%{srcname}-%{version}/%{srcname}-%{srcname}-%{version}.tar.gz BuildArch: noarch @@ -24,10 +25,29 @@ They can also be read from, searched and replaced, and navigated in, similar to a file or stream. +%if 0%{?with_python2} +%package -n python2-%{srcname} +Summary: %{summary} +BuildRequires: python2-devel +BuildRequires: python2-pytest +%{?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. +%endif + +%if 0%{?with_python3} %package -n python%{python3_pkgversion}-%{srcname} Summary: %{summary} BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: python%{python3_pkgversion}-nose +BuildRequires: python%{python3_pkgversion}-pytest %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} %description -n python%{python3_pkgversion}-%{srcname} @@ -39,7 +59,7 @@ 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. - +%endif %prep %autosetup -n %{srcname}-%{srcname}-%{version} @@ -47,27 +67,57 @@ to a file or stream. dos2unix README.rst release_notes.txt sed -i '1{s|^#!/usr/bin/env python||}' %{srcname}.py - %build -%py3_build +%if 0%{?with_python2} +%py2_build +%endif +%if 0%{?with_python3} +%py3_build +%endif %install -%py3_install +%if 0%{?with_python2} +%py2_install +%endif +%if 0%{?with_python3} +%py3_install +%endif %check -%{__python3} -m nose -w test - +pushd test +%if 0%{?with_python2} +%{__python2} -m pytest +%endif + +%if 0%{?with_python3} +%{__python3} -m pytest +%endif +popd + +%if 0%{?with_python2} +%files -n python2-%{srcname} +%license LICENSE +%doc README.rst release_notes.txt +%{python2_sitelib}/%{srcname}.py +%{python2_sitelib}/%{srcname}.py[co] +%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info +%endif +%if 0%{?with_python3} %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE %doc README.rst release_notes.txt %{python3_sitelib}/%{srcname}.py %{python3_sitelib}/__pycache__/%{srcname}.cpython-%{python3_version_nodots}*.pyc %{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info +%endif %changelog -* Wed Jun 30 2021 Lianguo Wang - 3.1.7 +* Tue Nov 15 2022 hkgy - 3.1.9-1 +- Upgrade to v3.1.9 + +* Wed Jun 30 2021 Lianguo Wang - 3.1.7-1 - Add src.