[packages/python-django_extensions] Version 1.6.7. Based on python-template.

matkor matkor at pld-linux.org
Fri May 27 13:20:27 CEST 2016


commit 2664bd5572f4518c85bbf1516d09cb75206a2ca7
Author: Mateusz Korniak <matkor at pld-linux.org>
Date:   Fri May 27 13:20:19 2016 +0200

    Version 1.6.7. Based on python-template.

 python-django_extensions.spec | 126 ++++++++++++++++++++++++++++++++++--------
 1 file changed, 104 insertions(+), 22 deletions(-)
---
diff --git a/python-django_extensions.spec b/python-django_extensions.spec
index 2cbf019..aae5f33 100644
--- a/python-django_extensions.spec
+++ b/python-django_extensions.spec
@@ -1,44 +1,126 @@
-%define		module		django-extensions
+# TODO: Fix tests
+# Conditional build:
+%bcond_without	doc	# don't build doc
+%bcond_with	tests	# do not perform "make test"
+%bcond_without	python2 # CPython 2.x module
+%bcond_without	python3 # CPython 3.x module
+
+%define 	module	django_extensions
 Summary:	Django Custom Management Command Extensions
-Name:		python-django_extensions
-Version:	0.7.1
-Release:	2
-License:	BSD
-Group:		Development/Languages/Python
-Source0:	http://pypi.python.org/packages/source/d/%{module}/%{module}-%{version}.tar.gz
-# Source0-md5:	c82b38a1f82fb4724565ad1bb61652d0
-URL:		http://django-command-extensions.googlecode.com/
-BuildRequires:	python-devel
+Summary(pl.UTF-8):	Rozszerzenie komend zarządzających Django
+Name:		python-%{module}
+Version:	1.6.7
+Release:	1
+License:	MIT
+Group:		Libraries/Python
+Source0:	https://pypi.python.org/packages/7f/da/1245fe47d1a2ca8d2d03b3cdbc886e64c94a8c2d3b6f99e3464d507a7c29/django-extensions-%{version}.tar.gz
+# Source0-md5:	62dd2a173ad29f319b84f1b89571c060
+URL:		https://github.com/django-extensions/django-extensions
 BuildRequires:	rpm-pythonprov
-# if py_postclean is used
-BuildRequires:	rpmbuild(macros) >= 1.710
-#%pyrequires_eq	python-libs
-%pyrequires_eq	python-modules
-Requires:	python-django >= 1.0
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with python2}
+BuildRequires:	python-modules
+BuildRequires:	python-shortuuid
+BuildRequires:	python-six >= 1.2
+BuildRequires:	python-tox
+%endif
+%if %{with python3}
+BuildRequires:	python3-modules
+BuildRequires:	python3-shortuuid
+BuildRequires:	python3-six >= 1.2
+BuildRequires:	python3-tox
+%endif
+Requires:	python-django
+Requires:	python-modules
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-Django Custom Management Command Extensions
+Django Extensions is a collection of custom extensions for the Django
+Framework.
+
+%description -l pl.UTF-8
+Zbiór rozszerzeń dla Django.
+
+%package -n python3-%{module}
+Summary:	Django Custom Management Command Extensions
+Summary(pl.UTF-8):	Rozszerzenie komend zarządzających Django
+Group:		Libraries/Python
+Requires:	python3-django
+Requires:	python3-modules
+
+%description -n python3-%{module}
+Django Extensions is a collection of custom extensions for the Django
+Framework.
+
+%description -n python3-%{module} -l pl.UTF-8
+Zbiór rozszerzeń dla Django.
+
+%package apidocs
+Summary:	%{module} API documentation
+Summary(pl.UTF-8):	Dokumentacja API %{module}
+Group:		Documentation
+
+%description apidocs
+API documentation for %{module}.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API %{module}.
 
 %prep
-%setup -q -n %{module}-%{version}
+%setup -q -n django-extensions-%{version}
 
 %build
-%py_build
+%if %{with python2}
+%py_build %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%endif
+
+%if %{with doc}
+cd docs
+%{__make} -j1 html
+rm -rf _build/html/_sources
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
 %py_install
 
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}
 %py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
-%{py_sitescriptdir}/django_extensions
-%{py_sitescriptdir}/django_extensions-*.egg-info
+%doc README.rst
+%{py_sitescriptdir}/%{module}
+%if "%{py_ver}" > "2.4"
+%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%endif
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc README.rst
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/*
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-django_extensions.git/commitdiff/2664bd5572f4518c85bbf1516d09cb75206a2ca7



More information about the pld-cvs-commit mailing list