| |
@@ -1,43 +1,78 @@
|
| |
Name: pyutil
|
| |
- Version: 1.9.7
|
| |
- Release: 11%{?dist}
|
| |
+ Version: 3.1.0
|
| |
+ Release: 1%{?dist}
|
| |
Summary: A collection of mature utilities for Python programmers
|
| |
|
| |
Group: Development/Languages
|
| |
License: GPLv2+
|
| |
- URL: http://allmydata.org/trac/pyutil
|
| |
- Source0: http://pypi.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
|
| |
+ URL: https://github.com/tpltnt/pyutil
|
| |
+ Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
|
| |
+
|
| |
+ Patch1: package-data.patch
|
| |
+ # https://github.com/tpltnt/pyutil/pull/3
|
| |
+ Patch2: py3.patch
|
| |
|
| |
BuildArch: noarch
|
| |
+
|
| |
+
|
| |
+ %global _description\
|
| |
+ These are a few data structures, classes and functions which we've needed \
|
| |
+ over many years of Python programming and which seem to be of general use \
|
| |
+ to other Python programmers. Many of the modules that have existed in pyutil \
|
| |
+ over the years have subsequently been obsoleted by new features added to \
|
| |
+ the Python language or its standard library, thus showing that we're not \
|
| |
+ alone in wanting tools like these.
|
| |
+
|
| |
+ %description %_description
|
| |
+
|
| |
+ %package -n python2-%{name}
|
| |
+ Summary: %summary
|
| |
+ %{?python_provide:%python_provide python2-%{name}}
|
| |
+ # renamed pyutil -> python2-pyutil
|
| |
+ Obsoletes: %{name} < 1.9.7-12
|
| |
+ Provides: %{name} = %{version}.%{release}
|
| |
BuildRequires: python2-devel
|
| |
BuildRequires: python2-setuptools
|
| |
BuildRequires: python2-zbase32
|
| |
BuildRequires: python2-twisted
|
| |
BuildRequires: net-tools
|
| |
BuildRequires: python2-simplejson
|
| |
+ BuildRequires: python2-mock
|
| |
Requires: python2-twisted
|
| |
Requires: python2-zbase32
|
| |
Requires: python2-simplejson
|
| |
|
| |
+ %description -n python2-%{name} %_description
|
| |
|
| |
- %description
|
| |
- These are a few data structures, classes and functions which we've needed
|
| |
- over many years of Python programming and which seem to be of general use
|
| |
- to other Python programmers. Many of the modules that have existed in pyutil
|
| |
- over the years have subsequently been obsoleted by new features added to
|
| |
- the Python language or its standard library, thus showing that we're not
|
| |
- alone in wanting tools like these.
|
| |
+ %package -n python3-%{name}
|
| |
+ Summary: %summary
|
| |
+ %{?python_provide:%python_provide python3-%{name}}
|
| |
+ BuildRequires: python3-devel
|
| |
+ BuildRequires: python3-setuptools
|
| |
+ BuildRequires: python3-zbase32
|
| |
+ BuildRequires: python3-twisted
|
| |
+ BuildRequires: net-tools
|
| |
+ BuildRequires: python3-simplejson
|
| |
+ BuildRequires: python3-mock
|
| |
+ Requires: python3-twisted
|
| |
+ Requires: python3-zbase32
|
| |
+ Requires: python3-simplejson
|
| |
+
|
| |
+ %description -n python3-%{name} %_description
|
| |
|
| |
%prep
|
| |
%setup -q
|
| |
find . -name "*~" -delete
|
| |
+ %patch1 -p1
|
| |
+ %patch2 -p1
|
| |
|
| |
%build
|
| |
- python setup.py build
|
| |
-
|
| |
+ %py2_build
|
| |
+ %py3_build
|
| |
|
| |
%install
|
| |
- python setup.py install -O1 --skip-build --root %{buildroot}
|
| |
+ %py2_install
|
| |
+ %py3_install
|
| |
|
| |
# rename the utilities to something less generic
|
| |
mv %{buildroot}%{_bindir}/lines %{buildroot}%{_bindir}/%{name}_lines
|
| |
@@ -52,17 +87,23 @@
|
| |
rm -rf %{buildroot}%{_docdir}/%{name}
|
| |
|
| |
# remove shebang
|
| |
- find %{buildroot}%{python_sitelib}/%{name} -type f -name \*.py -o -name test_template | \
|
| |
+ find %{buildroot}%{python2_sitelib}/%{name} %{buildroot}%{python3_sitelib}/%{name} \
|
| |
+ -type f -name \*.py -o -name test_template | \
|
| |
xargs sed -i '/^#!\/usr\/bin\/env/d'
|
| |
|
| |
%check
|
| |
%{__python2} setup.py test
|
| |
+ %{__python3} setup.py test
|
| |
|
| |
-
|
| |
- %files
|
| |
- %doc README.rst COPYING.GPL COPYING.TGPPL.html CREDITS
|
| |
+ %files -n python2-%{name}
|
| |
+ %doc README.rst COPYING.GPL COPYING.SPL.txt COPYING.TGPPL.rst CREDITS
|
| |
%{python2_sitelib}/%{name}
|
| |
%{python2_sitelib}/%{name}-%{version}-*.egg-info
|
| |
+
|
| |
+ %files -n python3-%{name}
|
| |
+ %doc README.rst COPYING.GPL COPYING.SPL.txt COPYING.TGPPL.rst CREDITS
|
| |
+ %{python3_sitelib}/%{name}
|
| |
+ %{python3_sitelib}/%{name}-%{version}-*.egg-info
|
| |
%{_bindir}/%{name}_lines
|
| |
%{_bindir}/%{name}_randcookie
|
| |
%{_bindir}/%{name}_randfile
|
| |
@@ -72,9 +113,11 @@
|
| |
%{_bindir}/%{name}_verinfo
|
| |
%{_bindir}/%{name}_passphrase
|
| |
|
| |
-
|
| |
-
|
| |
%changelog
|
| |
+ * Sun Aug 26 2018 Dan Callaghan <dcallagh@redhat.com> - 3.1.0-1
|
| |
+ - New upstream release 3.1.0
|
| |
+ - Added Python 3 subpackage
|
| |
+
|
| |
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.7-11
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
| |
|
| |