From e8e16b3690fe7c3d6ff36628d1fa51de909bd76c Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Thu, 9 Dec 2021 15:24:31 -0800 Subject: django-extensions and its crazy dependencies Signed-off-by: Michel Alexandre Salim --- python/python-django-extensions.spec | 88 ++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 python/python-django-extensions.spec (limited to 'python/python-django-extensions.spec') diff --git a/python/python-django-extensions.spec b/python/python-django-extensions.spec new file mode 100644 index 0000000..5ffc964 --- /dev/null +++ b/python/python-django-extensions.spec @@ -0,0 +1,88 @@ +# Build doc by default +%bcond_without doc + +%global srcname django-extensions +%global modname django_extensions + +Name: python-%{srcname} +Version: 3.1.5 +Release: %autorelease +Summary: Extensions for Django +License: GPLv3+ +URL: https://github.com/django-extensions/django-extensions +# PyPI tarball doesn't contain some requirements files +# Source0: %%{pypi_source %%{srcname}} +Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz +#Patch0: %%{srcname}-localdeps.patch + +BuildArch: noarch + +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools + +%if %{with doc} +BuildRequires: python%{python3_pkgversion}-sphinx +%endif + +%global _description %{expand: +Django Extensions is a collection of custom extensions for the Django +Framework.} + +%description %{_description} + + +%package -n python%{python3_pkgversion}-%{srcname} +Summary: %{summary} + +%description -n python%{python3_pkgversion}-%{srcname} %{_description} + + +%package -n python%{python3_pkgversion}-%{srcname}-doc +Summary: Documentation for %{srcname} +Suggests: python%{python3_pkgversion}-%{srcname} = %{version}-%{release} + +%description -n python%{python3_pkgversion}-%{srcname}-doc %{_description} +This package contains the documentation for %{srcname}. + + +%prep +%autosetup -p1 -n %{srcname}-%{version} + + +%generate_buildrequires +%pyproject_buildrequires -t + + +%build +%pyproject_wheel + +%if %{with doc} +(cd docs && make html) +%endif + + +%install +%pyproject_install +%pyproject_save_files %{modname} + + +%check +# tox.ini invokes make invokes pytest +# call directly so we can disable tests that require network +%pytest django_extensions tests \ + -k "not PipCheckerTests" + + +%files -n python%{python3_pkgversion}-%{srcname} -f %{pyproject_files} +%license LICENSE +%doc CHANGELOG.md CONTRIBUTING.md README.rst + +%if %{with doc} +%files -n python%{python3_pkgversion}-%{srcname}-doc +%license LICENSE +%doc docs/_build/html/* +%endif + + +%changelog +%autochangelog -- cgit