From 6dbec776d057f8c1fc8fe5731723bb2f78c2fab6 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Feb 04 2016 13:35:33 +0000 Subject: Port to python3. --- diff --git a/python-modernize.spec b/python-modernize.spec index 2bb5a5f..8b83b39 100644 --- a/python-modernize.spec +++ b/python-modernize.spec @@ -2,7 +2,7 @@ Name: python-modernize Version: 0.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Modernizes Python code for eventual Python 3 migration License: BSD @@ -10,8 +10,9 @@ URL: https://pypi.python.org/pypi/modernize Source0: https://pypi.python.org/packages/source/m/%{srcname}/%{srcname}-%{version}.tar.gz BuildArch: noarch -BuildRequires: python2-devel -BuildRequires: python-setuptools + +BuildRequires: python3-devel +BuildRequires: python3-setuptools %description This library is a very thin wrapper around lib2to3 to utilize it @@ -22,24 +23,39 @@ It attempts, but does not guarantee, to generate a Python 2/3 compatible codebase. The code that it generates needs python2.6+ and has a runtime dependency on python-six. +%package -n python3-modernize +Summary: Fancy python dictionary types +%{?python_provide:%python_provide python3-modernize} + +%description -n python3-modernize +This library is a very thin wrapper around lib2to3 to utilize it +to make Python 2 code more modern with the intention of eventually +porting it over to Python 3. + +It attempts, but does not guarantee, to generate a Python 2/3 compatible +codebase. The code that it generates needs python2.6+ and has a runtime +dependency on python-six. + %prep %setup -q -n %{srcname}-%{version} - %build -%{__python} setup.py build - +%py3_build %install -%{__python} setup.py install --skip-build --root %{buildroot} +%py3_install - -%files +%files -n python3-modernize %doc README.rst -%{python_sitelib}/* -%{_bindir}/* +%{python3_sitelib}/modernize* +%{python3_sitelib}/libmodernize* +%{python3_sitelib}/__pycache__/modernize* +%{_bindir}/python-modernize %changelog +* Thu Feb 04 2016 Ralph Bean - 0.5-2 +- Switch over to a python3 package with modern python macros. + * Thu Feb 04 2016 Ralph Bean - 0.5-1 - new version @@ -58,7 +74,6 @@ dependency on python-six. * Tue Jul 23 2013 Toshio Kuratomi - 0.2-2 - BuildRequire python-setuptools; needed by setup.py - Remove rpm constructs not needed in EPEL6+ or any current Fedora -- * Mon Jul 22 2013 Toshio Kuratomi - 0.2-1 - Initial Fedora build.