Add patch to update setup.py to use setuptools and declare install dependencies

This commit is contained in:
Neal Gompa 2016-12-11 07:16:28 -05:00
parent 3ae33d0618
commit 945066c2fd
2 changed files with 57 additions and 1 deletions

View File

@ -0,0 +1,48 @@
diff --git a/PKG-INFO b/PKG-INFO
index 31c4ad2..bebcb80 100644
--- PKG-INFO
+++ PKG-INFO
@@ -18,7 +18,10 @@ Classifier: License :: OSI Approved :: MIT License
Classifier: License :: OSI Approved :: Python Software Foundation License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2.4
-Classifier: Programming Language :: Python :: 2.5
+Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff --git a/setup.py b/setup.py
index 736cfa1..e2f8de0 100644
--- setup.py
+++ setup.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-from distutils.core import setup
+from setuptools import setup
VERSION = '0.4'
@@ -24,12 +24,16 @@ use.''',
'License :: OSI Approved :: Python Software Foundation License',
'Operating System :: OS Independent',
'Programming Language :: Python',
- 'Programming Language :: Python :: 2.4',
- 'Programming Language :: Python :: 2.5',
+ 'Programming Language :: Python :: 2'
'Programming Language :: Python :: 2.6',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.3',
+ 'Programming Language :: Python :: 3.4'
'Topic :: Software Development :: Libraries :: Python Modules',
],
packages = ['iniparse'],
+ install_requires=['six'],
data_files = [
('share/doc/iniparse-%s' % VERSION, ['README', 'LICENSE-PSF',
'LICENSE', 'Changelog',

View File

@ -5,7 +5,7 @@
Name: python-%{modname} Name: python-%{modname}
Version: 0.4 Version: 0.4
Release: 22%{?dist} Release: 23%{?dist}
Summary: Python Module for Accessing and Modifying Configuration Data in INI files Summary: Python Module for Accessing and Modifying Configuration Data in INI files
License: MIT and Python License: MIT and Python
URL: http://code.google.com/p/iniparse/ URL: http://code.google.com/p/iniparse/
@ -15,6 +15,8 @@ Patch0: fix-issue-28.patch
# is Python3-only. The patch below uses python-six to create a version that works # is Python3-only. The patch below uses python-six to create a version that works
# with both Python major versions and is more error-prone. # with both Python major versions and is more error-prone.
Patch1: %{name}-python3-compat.patch Patch1: %{name}-python3-compat.patch
# Fixup the module to have proper setup.py information
Patch2: %{name}-setup-fixes.patch
BuildArch: noarch BuildArch: noarch
@ -31,6 +33,7 @@ use.
Summary: Python 2 Module for Accessing and Modifying Configuration Data in INI files Summary: Python 2 Module for Accessing and Modifying Configuration Data in INI files
%{?python_provide:%python_provide python2-%{modname}} %{?python_provide:%python_provide python2-%{modname}}
BuildRequires: python2-devel BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-six BuildRequires: python2-six
BuildRequires: python-test BuildRequires: python-test
Requires: python2-six Requires: python2-six
@ -44,6 +47,7 @@ Summary: %{summary}
%{?system_python_abi} %{?system_python_abi}
%{?python_provide:%python_provide python3-%{modname}} %{?python_provide:%python_provide python3-%{modname}}
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-six BuildRequires: python3-six
BuildRequires: python3-test BuildRequires: python3-test
Requires: python3-six Requires: python3-six
@ -56,6 +60,7 @@ Python 3 version.
%setup -q -n %{modname}-%{version} %setup -q -n %{modname}-%{version}
%patch0 -p1 %patch0 -p1
%patch1 -p0 %patch1 -p0
%patch2 -p0
chmod -c -x html/index.html chmod -c -x html/index.html
%build %build
@ -86,6 +91,9 @@ rm -vfr %{buildroot}%{_docdir}/*
%{python3_sitelib}/%{modname}-%{version}-*.egg-info %{python3_sitelib}/%{modname}-%{version}-*.egg-info
%changelog %changelog
* Sun Dec 11 2016 Neal Gompa <ngompa13@gmail.com> - 0.4-23
- Add patch to update setup.py to use setuptools and declare install dependencies
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.4-22 * Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.4-22
- Rebuild for Python 3.6 - Rebuild for Python 3.6