[packages/python-jaraco.packaging] - use jaraco/__init__.py files packaged in python-jaraco.spec
qboosh
qboosh at pld-linux.org
Sun Jul 22 16:13:38 CEST 2018
commit d5c345cb464ec91c0bf43c52a0683edeb0ed2acf
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Jul 22 16:15:31 2018 +0200
- use jaraco/__init__.py files packaged in python-jaraco.spec
python-jaraco.packaging.spec | 74 +++++++++++++++++++++++++++++---------------
1 file changed, 49 insertions(+), 25 deletions(-)
---
diff --git a/python-jaraco.packaging.spec b/python-jaraco.packaging.spec
index aefd607..30d8ae4 100644
--- a/python-jaraco.packaging.spec
+++ b/python-jaraco.packaging.spec
@@ -1,47 +1,72 @@
+#
# Conditional build:
-%bcond_without tests # do not perform "make test"
+%bcond_without doc # Sphinx documentation
+%bcond_without tests # unit tests
%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
-%define module jaraco
%define egg_name jaraco.packaging
%define pypi_name jaraco.packaging
-Summary: Tools for packaging
-Summary(pl.UTF-8): -
+Summary: Tools to supplement packaging Python releases
+Summary(pl.UTF-8): Narzędzia wspierające pakietowanie wydań modułów Pythona
Name: python-%{pypi_name}
Version: 5.1.1
Release: 1
License: MIT
Group: Libraries/Python
-Source0: https://pypi.debian.net/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
+#Source0Download: https://pypi.org/simple/jaraco-packaging/
+Source0: https://files.pythonhosted.org/packages/source/j/jaraco.packaging/%{pypi_name}-%{version}.tar.gz
# Source0-md5: 490cb330f6654fcb46aa27c123f2ef84
-URL: https://pypi.org/project/jaraco.packaging
+URL: https://pypi.org/project/jaraco.packaging/
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
%if %{with python2}
-BuildRequires: python-modules
+BuildRequires: python-modules >= 1:2.7
BuildRequires: python-setuptools
+BuildRequires: python-setuptools_scm >= 1.15
+%if %{with tests}
+BuildRequires: python-pytest >= 3.5
+BuildRequires: python-pytest-flake8
+BuildRequires: python-six >= 1.4
+%endif
%endif
%if %{with python3}
BuildRequires: python3-modules
BuildRequires: python3-setuptools
+BuildRequires: python3-setuptools_scm >= 1.15
+%if %{with tests}
+BuildRequires: python3-pytest >= 3.5
+BuildRequires: python3-pytest-flake8
+BuildRequires: python3-six >= 1.4
+%endif
%endif
-Requires: python-modules
+%if %{with doc}
+BuildRequires: python3-rst.linker >= 1.9
+BuildRequires: sphinx-pdg-3
+%endif
+Requires: python-jaraco
+Requires: python-modules >= 1:2.7
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-A distutils command for reporting the dependency tree as resolved by
-setuptools. Use after installing a package.
+A few tools to supplement packaging Python releases.
+
+%description -l pl.UTF-8
+Kilka narzędzi wspierających pakietowanie wydań modułów Pythona.
%package -n python3-%{pypi_name}
-Summary: Tools for packaging
+Summary: Tools to supplement packaging Python releases
+Summary(pl.UTF-8): Narzędzia wspierające pakietowanie wydań modułów Pythona
Group: Libraries/Python
+Requires: python3-jaraco
Requires: python3-modules
%description -n python3-%{pypi_name}
-A distutils command for reporting the dependency tree as resolved by
-setuptools. Use after installing a package.
+A few tools to supplement packaging Python releases.
+
+%description -n python3-%{pypi_name} -l pl.UTF-8
+Kilka narzędzi wspierających pakietowanie wydań modułów Pythona.
%prep
%setup -q -n %{pypi_name}-%{version}
@@ -55,25 +80,24 @@ setuptools. Use after installing a package.
%py3_build %{?with_tests:test}
%endif
+%if %{with doc}
+# no Makefile
+cd docs
+PYTHONPATH=$(pwd)/.. \
+sphinx-build-3 -b html . _build/html
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
%if %{with python2}
%py_install
-install build-2/lib/jaraco/__init__.py $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}
-
-# when files are installed in other way that standard 'setup.py
-# they need to be (re-)compiled
-# change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}
%py_postclean
%endif
%if %{with python3}
%py3_install
-install build-2/lib/jaraco/__init__.py $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}
%endif
%clean
@@ -82,8 +106,8 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python2}
%files
%defattr(644,root,root,755)
-%doc CHANGES.rst README.rst
-%{py_sitescriptdir}/%{module}
+%doc CHANGES.rst LICENSE README.rst
+%{py_sitescriptdir}/jaraco/packaging
%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
%{py_sitescriptdir}/%{egg_name}-%{version}-py*-nspkg.pth
%endif
@@ -91,10 +115,10 @@ rm -rf $RPM_BUILD_ROOT
%if %{with python3}
%files -n python3-%{pypi_name}
%defattr(644,root,root,755)
-%doc CHANGES.rst README.rst
+%doc CHANGES.rst LICENSE README.rst
%attr(755,root,root) %{_bindir}/dependency-tree
%attr(755,root,root) %{_bindir}/upload-package
-%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/jaraco/packaging
%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
%{py3_sitescriptdir}/%{egg_name}-%{version}-py*-nspkg.pth
%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-jaraco.packaging.git/commitdiff/d5c345cb464ec91c0bf43c52a0683edeb0ed2acf
More information about the pld-cvs-commit
mailing list