From 4945353b4a3579f29d77aa45ac70e2117ce48790 Mon Sep 17 00:00:00 2001 From: Pete Travis Date: Thu, 19 Feb 2015 21:24:04 -0700 Subject: some changes to ghp-import.spec probably --- SPECS/python-ghp-import.spec | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/SPECS/python-ghp-import.spec b/SPECS/python-ghp-import.spec index 83b9789..33e928d 100644 --- a/SPECS/python-ghp-import.spec +++ b/SPECS/python-ghp-import.spec @@ -1,15 +1,14 @@ %global gitname ghp-import -%global with_python3 1 +%global with_python3 1 Name: python-%{gitname} Version: 0.4.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Copies docs directly to the gh-pages branch of a GitHub repo License: Tumbolia Public License URL: https://github.com/davisp/%{gitname} Source0: https://pypi.python.org/packages/source/g/%{gitname}/%{gitname}-%{version}.tar.gz -Patch0: 0001-open-README.md-in-setup-as-utf8-for-py3.patch - +Patch0: 0001-make-file-open-py2-and-py3-friendly.patch BuildArch: noarch BuildRequires: python-devel Requires: git @@ -31,9 +30,10 @@ in your main branch. %prep %setup -q -n %{gitname}-%{version} -#%patch0 -p1 -b .utf8_import - +%patch0 -p1 %build +export LANG=C +export LC_ALL=C %{__python} setup.py build mv build build2 @@ -44,23 +44,35 @@ mv build build3 %install -export LANG=C -#sed -i -e 's/, encoding="utf-8"//' build/setup.py +mv build2 build %{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +mv %{buildroot}/%{_bindir}/ghp-import %{buildroot}/%{_bindir}/ghp-import.%{python2_version} %if 0%{?with_python3} rm -rf build mv build3 build %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT +mv %{buildroot}/%{_bindir}/ghp-import %{buildroot}/%{_bindir}/ghp-import.%{python3_version} %endif -%files -%doc -# For noarch packages: sitelib -#%{python_sitelib}/* -# For arch-specific packages: sitearch +ln -s %{_bindir}/ghp-import.%{python2_version} %{buildroot}/%{_bindir}/ghp-import +%files +%doc README.md +%license LICENSE +%{_bindir}/ghp-import +%{_bindir}/ghp-import.%{python2_version} +%{python2_sitelib}/ghp_import-%{version}-py%{python2_version}.egg-info +%if 0%{?with_python3} +%files -n python3-ghp-import +%doc README.md +%license LICENSE +%{_bindir}/ghp-import.%{python3_version} +%{python3_sitelib}/ghp_import-%{version}-py%{python3_version}.egg-info +%endif %changelog -* Thu Dec 4 2014 Pete Travis +* Tue Jan 20 2015 Pete Travis 0.4.1-2 +- Fix setup.py so python3 subpackage builds. +* Sun Jan 18 2015 Pete Travis 0.4.1-1 - Initial build. -- cgit