blob: 5ffc9648ed6e03d3b34d548e87ed677c499ea14f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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
|