From 8dab8d00a0fbccf3ad72ba73a299c88eb7e55a6db63e185200af9b4a3e9f5043 Mon Sep 17 00:00:00 2001 From: Todd R Date: Wed, 3 May 2017 14:54:26 +0000 Subject: [PATCH] Accepting request 491672 from home:TheBlackCat:branches:devel:languages:python - Fix source URL. - Implement single-spec version. OBS-URL: https://build.opensuse.org/request/show/491672 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py2pack?expand=0&rev=63 --- python-py2pack.changes | 6 ++++ python-py2pack.spec | 69 +++++++++++++++++++----------------------- 2 files changed, 37 insertions(+), 38 deletions(-) diff --git a/python-py2pack.changes b/python-py2pack.changes index 5994ecc..758d955 100644 --- a/python-py2pack.changes +++ b/python-py2pack.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 27 15:53:20 UTC 2017 - toddrme2178@gmail.com + +- Fix source URL. +- Implement single-spec version. + ------------------------------------------------------------------- Tue Mar 7 11:38:35 UTC 2017 - p.seiler@linuxmail.org diff --git a/python-py2pack.spec b/python-py2pack.spec index 02f8751..3a19c88 100644 --- a/python-py2pack.spec +++ b/python-py2pack.spec @@ -16,6 +16,7 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-py2pack Version: 0.8.0 Release: 0 @@ -23,23 +24,25 @@ Url: http://github.com/saschpe/py2pack Summary: Generate distribution packages from Python packages on PyPI License: Apache-2.0 Group: Development/Languages/Python -Source: https://pypi.io/packages/source/p/py2pack/py2pack-%{version}.tar.gz +Source: https://files.pythonhosted.org/packages/source/p/py2pack/py2pack-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-Jinja2 -BuildRequires: python-Sphinx -BuildRequires: python-devel -BuildRequires: python-metaextract -BuildRequires: python-pbr -BuildRequires: python-six -BuildRequires: python-sphinxcontrib-programoutput +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module Jinja2} +BuildRequires: %{python_module Sphinx} +BuildRequires: %{python_module metaextract} +BuildRequires: %{python_module pbr} +BuildRequires: %{python_module six} +BuildRequires: %{python_module sphinxcontrib-programoutput} Requires: python-Jinja2 Requires: python-metaextract Requires: python-pbr Requires: python-setuptools Requires: python-six -Requires(post): update-alternatives -Requires(postun): update-alternatives BuildArch: noarch +%python_subpackages %description This script allows to generate RPM spec or DEB dsc files from Python modules. @@ -47,44 +50,34 @@ It allows to list Python modules or search for them on the Python Package Index (PyPI). Conveniently, it can fetch tarballs and changelogs making it an universal tool to package Python modules. +%package -n %{name}-doc +Summary: Documentation for %{name} +Provides: %{python_module py2pack-doc = %{version}} + +%description -n %{name}-doc +Documentation and help files for %{name}. + %prep %setup -q -n py2pack-%{version} %build -python setup.py build -python setup.py build_sphinx +%python_build +python3 setup.py build_sphinx # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install -# Prepare for update-alternatives usage -mkdir -p %{buildroot}%{_sysconfdir}/alternatives -mv %{buildroot}%{_bindir}/py2pack %{buildroot}%{_bindir}/py2pack-%{py_ver} -ln -s -f %{_sysconfdir}/alternatives/py2pack %{buildroot}%{_bindir}/py2pack - -# create dummy targets -touch %{buildroot}%{_sysconfdir}/alternatives/py2pack -touch %{buildroot}%{_sysconfdir}/alternatives/py2pack.1.gz - -%post -%_sbindir/update-alternatives \ - --install %{_bindir}/py2pack py2pack %{_bindir}/py2pack-%{py_ver} 30 - -%postun -if [ $1 -eq 0 ] ; then - %_sbindir/update-alternatives --remove py2pack %{_bindir}/py2pack-%{py_ver} -fi - -%files +%files %{python_files} %defattr(-,root,root,-) -%doc AUTHORS LICENSE README.rst doc/build/html -%{_bindir}/py2pack -%{_bindir}/py2pack-%{py_ver} -%ghost %{_sysconfdir}/alternatives/py2pack -%ghost %{_sysconfdir}/alternatives/py2pack.1.gz +%python3_only %{_bindir}/py2pack %{python_sitelib}/py2pack-%{version}-py*.egg-info -%{python_sitelib}/py2pack +%{python_sitelib}/py2pack/ + +%files -n %{name}-doc +%defattr(-,root,root,-) +%doc AUTHORS LICENSE +%doc doc/build/html/ %changelog