]>
Commit | Line | Data |
---|---|---|
2664bd55 | 1 | # TODO: Fix tests |
e7435b7c | 2 | # |
2664bd55 MK |
3 | # Conditional build: |
4 | %bcond_without doc # don't build doc | |
5 | %bcond_with tests # do not perform "make test" | |
6 | %bcond_without python2 # CPython 2.x module | |
7 | %bcond_without python3 # CPython 3.x module | |
8 | ||
9 | %define module django_extensions | |
ebb04a10 | 10 | Summary: Django Custom Management Command Extensions |
2664bd55 MK |
11 | Summary(pl.UTF-8): Rozszerzenie komend zarządzających Django |
12 | Name: python-%{module} | |
43b488bb | 13 | Version: 1.9.0 |
ae22921a | 14 | Release: 7 |
2664bd55 MK |
15 | License: MIT |
16 | Group: Libraries/Python | |
43b488bb MK |
17 | #Source0: https://pypi.python.org/packages/7f/da/1245fe47d1a2ca8d2d03b3cdbc886e64c94a8c2d3b6f99e3464d507a7c29/django-extensions-%{version}.tar.gz |
18 | Source0: https://github.com/django-extensions/django-extensions/archive/%{version}.tar.gz | |
19 | # Source0-md5: bbb01383b6f199dfd1a6a64a3cc415e3 | |
2664bd55 | 20 | URL: https://github.com/django-extensions/django-extensions |
ebb04a10 | 21 | BuildRequires: rpm-pythonprov |
2664bd55 MK |
22 | BuildRequires: rpmbuild(macros) >= 1.714 |
23 | %if %{with python2} | |
24 | BuildRequires: python-modules | |
25 | BuildRequires: python-shortuuid | |
26 | BuildRequires: python-six >= 1.2 | |
27 | BuildRequires: python-tox | |
28 | %endif | |
29 | %if %{with python3} | |
30 | BuildRequires: python3-modules | |
31 | BuildRequires: python3-shortuuid | |
32 | BuildRequires: python3-six >= 1.2 | |
33 | BuildRequires: python3-tox | |
34 | %endif | |
35 | Requires: python-django | |
36 | Requires: python-modules | |
ebb04a10 JR |
37 | BuildArch: noarch |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
39 | ||
40 | %description | |
2664bd55 MK |
41 | Django Extensions is a collection of custom extensions for the Django |
42 | Framework. | |
43 | ||
44 | %description -l pl.UTF-8 | |
45 | Zbiór rozszerzeń dla Django. | |
46 | ||
47 | %package -n python3-%{module} | |
48 | Summary: Django Custom Management Command Extensions | |
49 | Summary(pl.UTF-8): Rozszerzenie komend zarządzających Django | |
50 | Group: Libraries/Python | |
51 | Requires: python3-django | |
52 | Requires: python3-modules | |
53 | ||
54 | %description -n python3-%{module} | |
55 | Django Extensions is a collection of custom extensions for the Django | |
56 | Framework. | |
57 | ||
58 | %description -n python3-%{module} -l pl.UTF-8 | |
59 | Zbiór rozszerzeń dla Django. | |
60 | ||
61 | %package apidocs | |
62 | Summary: %{module} API documentation | |
63 | Summary(pl.UTF-8): Dokumentacja API %{module} | |
64 | Group: Documentation | |
65 | ||
66 | %description apidocs | |
67 | API documentation for %{module}. | |
68 | ||
69 | %description apidocs -l pl.UTF-8 | |
70 | Dokumentacja API %{module}. | |
ebb04a10 JR |
71 | |
72 | %prep | |
2664bd55 | 73 | %setup -q -n django-extensions-%{version} |
ebb04a10 JR |
74 | |
75 | %build | |
2664bd55 MK |
76 | %if %{with python2} |
77 | %py_build %{?with_tests:test} | |
78 | %endif | |
79 | ||
80 | %if %{with python3} | |
81 | %py3_build %{?with_tests:test} | |
82 | %endif | |
83 | ||
84 | %if %{with doc} | |
85 | cd docs | |
86 | %{__make} -j1 html | |
87 | rm -rf _build/html/_sources | |
88 | %endif | |
ebb04a10 JR |
89 | |
90 | %install | |
91 | rm -rf $RPM_BUILD_ROOT | |
2664bd55 MK |
92 | |
93 | %if %{with python2} | |
90be146f | 94 | %py_install |
ebb04a10 | 95 | %py_postclean |
2664bd55 MK |
96 | %endif |
97 | ||
98 | %if %{with python3} | |
99 | %py3_install | |
100 | %endif | |
ebb04a10 JR |
101 | |
102 | %clean | |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | ||
2664bd55 | 105 | %if %{with python2} |
ebb04a10 JR |
106 | %files |
107 | %defattr(644,root,root,755) | |
2664bd55 MK |
108 | %doc README.rst |
109 | %{py_sitescriptdir}/%{module} | |
2664bd55 MK |
110 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info |
111 | %endif | |
2664bd55 MK |
112 | |
113 | %if %{with python3} | |
114 | %files -n python3-%{module} | |
115 | %defattr(644,root,root,755) | |
116 | %doc README.rst | |
117 | %{py3_sitescriptdir}/%{module} | |
118 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
119 | %endif | |
120 | ||
121 | %if %{with doc} | |
122 | %files apidocs | |
123 | %defattr(644,root,root,755) | |
124 | %doc docs/_build/html/* | |
125 | %endif |