#2 New upstream release, Python 3 support
Merged 5 years ago by anishpatil. Opened 5 years ago by dcallagh.
rpms/ dcallagh/pyutil py3  into  master

file modified
+1
@@ -3,3 +3,4 @@ 

  /pyutil-1.8.4.tar.gz

  /pyutil-1.9.1.tar.gz

  /pyutil-1.9.7.tar.gz

+ /pyutil-3.1.0.tar.gz

file added
+14
@@ -0,0 +1,14 @@ 

+ diff -ur pyutil-3.1.0/setup.py pyutil-3.1.0.patched/setup.py

+ --- pyutil-3.1.0/setup.py       2018-01-15 07:30:47.000000000 +1000

+ +++ pyutil-3.1.0.patched/setup.py       2018-08-26 20:30:23.524306209 +1000

+ @@ -59,7 +59,9 @@

+        license=u'GNU GPL', # see README.rst for details -- there are also alternative licences

+        packages=find_packages(),

+        include_package_data=True,

+ -      data_files=data_files,

+ +      package_data={

+ +          'pyutil': ['data/wordlist.txt'],

+ +      },

+        install_requires=[],

+        extras_require={

+            u'jsonutil': [u'simplejson >= 2.1.0',],

file added
+3341
The added file is too large to be shown here, see it at: py3.patch
file modified
+63 -20
@@ -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

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- 5a20ccae479d967d3fa11b905d0e10f6  pyutil-1.9.7.tar.gz

+ SHA512 (pyutil-3.1.0.tar.gz) = 68b8eb69b4325c926ec915669c4a513b7055fb2d182517892bc5ad0fa47e9e8a4ae0cec4a7668acdab9e289bc17679a5c98b7ff26ee0b8a125c5a7096ff368a0