]> git.pld-linux.org Git - packages/python-django_extensions.git/blob - python-django_extensions.spec
rebuild with python 3.10
[packages/python-django_extensions.git] / python-django_extensions.spec
1 # TODO: Fix tests
2 #
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
10 Summary:        Django Custom Management Command Extensions
11 Summary(pl.UTF-8):      Rozszerzenie komend zarządzających Django
12 Name:           python-%{module}
13 Version:        1.9.0
14 Release:        8
15 License:        MIT
16 Group:          Libraries/Python
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
20 URL:            https://github.com/django-extensions/django-extensions
21 BuildRequires:  rpm-pythonprov
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
37 BuildArch:      noarch
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
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}.
71
72 %prep
73 %setup -q -n django-extensions-%{version}
74
75 %build
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
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92
93 %if %{with python2}
94 %py_install
95 %py_postclean
96 %endif
97
98 %if %{with python3}
99 %py3_install
100 %endif
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %if %{with python2}
106 %files
107 %defattr(644,root,root,755)
108 %doc README.rst
109 %{py_sitescriptdir}/%{module}
110 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
111 %endif
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
This page took 0.081347 seconds and 3 git commands to generate.