forked from pool/python-py2pack
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
This commit is contained in:
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user