[python-yapsy] Updating python-yapsy for correct implementation of subpackaging for python3
Pete Travis
immanetize at fedoraproject.org
Fri Oct 4 23:59:31 UTC 2013
commit 1e7415959caad4894d76e559a498a37fc065c1c2
Author: Pete Travis <immanetize at fedoraproject.org>
Date: Fri Oct 4 17:59:16 2013 -0600
Updating python-yapsy for correct implementation of subpackaging for python3
do-python2-magic.patch | 8 ------
do-python3-magic.patch | 8 ------
python-yapsy.spec | 56 +++++++++++++++++++++++++++++------------------
3 files changed, 34 insertions(+), 38 deletions(-)
---
diff --git a/python-yapsy.spec b/python-yapsy.spec
index 0eac214..e9f3ba2 100644
--- a/python-yapsy.spec
+++ b/python-yapsy.spec
@@ -1,8 +1,9 @@
+%global with_python3 1
%global projectname Yapsy
%global productname yapsy
Name: python-yapsy
Version: 1.10.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A simple plugin system for Python applications
Group: Development/Libraries
@@ -14,16 +15,6 @@ BuildRequires: python-setuptools
BuildRequires: python-sphinx
Requires: python
-Patch0: do-python2-magic.patch
-Patch1: do-python3-magic.patch
-
-%if 0%{?with_python3}
-%global srcdir src3
-%else
-%global srcdir src2
-%endif
-
-#Patch setup.py to avoid python version checking logic and allow proper subpackaging?
%description
Yapsy’s main purpose is to offer a way to easily design a plugin system in
Python. Yapsy only depends on Python’s standard library.
@@ -39,44 +30,65 @@ Documentation for yapsy, a simple plugin system for Python applications.
%package -n python3-yapsy
Summary: A simple plugin system for Python3 applications.
Group: Development/Libraries
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
%description -n python3-yapsy
Yapsy’s main purpose is to offer a way to easily design a plugin system in Python3, and motivated by the fact that many other Python plugin system are either too complicated for a basic use or depend on a lot of libraries. Yapsy only depends on Python’s standard library.
%package -n python3-yapsy-doc
-Summary: Documentation for python2-yapsy, a plugin system for Python3 applications.
+Summary: Documentation for python3-yapsy, a plugin system for Python3 applications.
Group: Development/Libraries
BuildArch: noarch
+BuildRequires: python3-sphinx
%description -n python3-yapsy-doc
Documentation for yapsy, a simple plugin system for python3 applications.
%endif
%prep
-%if 0%{?with_python2}
-%patch0 -p1
-%endif
-
-%if 0%{?with_python3}
-%patch1 -p1
-%endif
%setup -qn %{projectname}-%{version}-pythons2n3
%build
%{__python2} setup.py build
-%{__python2} setup.py build_sphinx -s %{srcdir}/package/doc/
+%{__python2} setup.py build_sphinx -s src2/package/doc/
+mv build build-py2
+%if 0%{?with_python3}
+%{__python3} setup.py build
+%{__python3} setup.py build_sphinx -s src3/package/doc/
+mv build build-py3
+%endif
%install
+mv build-py2 build
%{__python2} setup.py install --skip-build --root %{buildroot}
-
+mv build build-py2
+%if 0%{?with_python3}
+mv build-py3 build
+%{__python3} setup.py install --skip-build --root %{buildroot}
+mv build build-py3
+%endif
%files
%{python_sitelib}/%{projectname}-%{version}_pythons2n3-py2.7.egg-info
%{python_sitelib}/%{productname}
%files -n python-yapsy-doc
-%doc %{srcdir}/package/{README.txt,LICENSE.txt,CHANGELOG.txt} build/sphinx/html/*.html build/sphinx/html/{_sources,_static}
+%doc src2/package/{README.txt,LICENSE.txt,CHANGELOG.txt} build-py2/sphinx/html/*.html build-py2/sphinx/html/{_sources,_static}
+
+%files -n python3-yapsy
+%{python3_sitelib}/%{projectname}-%{version}_pythons2n3-py3.3.egg-info
+%{python3_sitelib}/%{productname}
+
+%files -n python3-yapsy-doc
+%doc src3/package/{README.txt,LICENSE.txt,CHANGELOG.txt} build-py3/sphinx/html/*.html build-py3/sphinx/html/{_sources,_static}
%changelog
+* Fri Oct 04 2013 Pete Travis <immanetize at fedoraproject.org> 1.10.2-3
+- Turning on python3 boolean so python3 subpackage actually builds
+- Correct build and install sections to properly create python3 subpackage
+- Remove ill-conceived patches
+- Add python3-yapsy-doc subpackage, as upstream procides py3 sources for docs
+
* Tue Aug 20 2013 Pete Travis <immanetize at fedoraproject.org> 1.10.2-2
- Updating spec file; cleaned up files section and BuildRequires,add noarch -doc subpackage
More information about the scm-commits
mailing list