/[packages]/updates/8/python-django/current/SPECS/python-django.spec
ViewVC logotype

Contents of /updates/8/python-django/current/SPECS/python-django.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1224549 - (show annotations) (download)
Wed May 2 09:49:30 2018 UTC (5 years, 11 months ago) by kekepower
Original Path: cauldron/python-django/current/SPECS/python-django.spec
File size: 5121 byte(s)
- Update to version 1.11.13

1 %define module django
2 %define tarname Django
3
4 Summary: A high-level Python Web framework
5 Name: python-%{module}
6 Version: 1.11.13
7 Release: %mkrel 1
8 Source0: https://files.pythonhosted.org/packages/source/D/%{tarname}/%{tarname}-%{version}.tar.gz
9 License: BSD
10 Group: Development/Python
11 Url: http://www.djangoproject.com
12 BuildArch: noarch
13 BuildRequires: python2dist(setuptools)
14 BuildRequires: python2dist(sphinx)
15 BuildRequires: python-sphinx_rtd_theme
16 BuildRequires: pkgconfig(python2)
17 BuildRequires: pkgconfig(python3)
18 BuildRequires: python3dist(setuptools)
19 BuildRequires: python3-sphinx_rtd_theme
20 Requires: %{name}-bash-completion = %{version}-%{release}
21
22 %description
23 Django is a high-level Python Web framework that encourages rapid development
24 and clean, pragmatic design.
25
26 Developed and used over the past two years by a fast-moving online-news
27 operation, Django was designed from scratch to handle two challenges: the
28 intensive deadlines of a newsroom and the stringent requirements of experienced
29 Web developers. It has convenient niceties for developing content-management
30 systems, but it's an excellent tool for building any Web site.
31
32 Django focuses on automating as much as possible and adhering to the
33 DRY principle.
34
35 %package -n python2-%{module}
36 Summary: A high-level Python 2 Web framework
37 Group: Development/Python
38 Requires: %{name}-bash-completion = %{version}-%{release}
39 %{?python_provide:%python_provide python2-%{module}}
40 Obsoletes: python-django < 1.11.11-1
41 Provides: python-django = %{version}-%{release}
42
43 %description -n python2-%{module}
44
45 Django is a high-level Python Web framework that encourages rapid development
46 and clean, pragmatic design.
47
48 Developed and used over the past two years by a fast-moving online-news
49 operation, Django was designed from scratch to handle two challenges: the
50 intensive deadlines of a newsroom and the stringent requirements of experienced
51 Web developers. It has convenient niceties for developing content-management
52 systems, but it's an excellent tool for building any Web site.
53
54 Django focuses on automating as much as possible and adhering to the
55 DRY principle.
56
57 %package bash-completion
58 Group: Development/Python
59 Summary: bash completion files for Django
60
61
62 %description bash-completion
63 This package contains the bash completion files form Django high-level
64 Python Web framework.
65
66 %package -n python3-%{module}
67 Summary: A high-level Python 3 Web framework
68 Group: Development/Python
69 %{?python_provide:%python_provide python3-%{module}}
70 Requires: %{name}-bash-completion = %{version}-%{release}
71
72 %description -n python3-%{module}
73
74 Django is a high-level Python Web framework that encourages rapid development
75 and clean, pragmatic design.
76
77 Developed and used over the past two years by a fast-moving online-news
78 operation, Django was designed from scratch to handle two challenges: the
79 intensive deadlines of a newsroom and the stringent requirements of experienced
80 Web developers. It has convenient niceties for developing content-management
81 systems, but it's an excellent tool for building any Web site.
82
83 Django focuses on automating as much as possible and adhering to the
84 DRY principle.
85
86 %package doc
87 Summary: Documentation for django
88 Group: Development/Python
89 Provides: python3-%{module}-doc = %{version}-%{release}
90
91 %description doc
92 This package contains documentation for Django,
93 a high-level Python Web framework.
94
95 %prep
96 %setup -q -n %{tarname}-%{version}
97
98 # empty files
99 for f in \
100 django/contrib/staticfiles/models.py \
101 django/contrib/humanize/models.py \
102 ; do
103 echo "# just a comment" > $f
104 done
105 cp -a . %{py3dir}
106
107 %build
108 %py2_build
109
110 pushd %{py3dir}
111 %py3_build
112 popd
113
114 %install
115 # must do install of python 3 subpackage first, so that we don't
116 # overwrite django-admin script with the python 3 version
117 pushd %{py3dir}
118 %py3_install
119 mv %{buildroot}%{_bindir}/django-admin.py %{buildroot}%{_bindir}/python3-django-admin
120 popd
121
122 %py2_install
123
124 # build documentation
125 (cd docs && mkdir djangohtml && mkdir -p _build/{doctrees,html} && make html)
126
127
128 # install man pages
129 mkdir -p %{buildroot}%{_mandir}/man1/
130 cp -p docs/man/* %{buildroot}%{_mandir}/man1/
131 cp -a %{buildroot}%{_mandir}/man1/django-admin.1 %{buildroot}%{_mandir}/man1/python3-django-admin.1
132
133 # install bash completion script
134 mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/
135 install -m 0644 -p extras/django_bash_completion \
136 %{buildroot}%{_sysconfdir}/bash_completion.d/
137
138 # Fix items in %%{_bindir}
139 mv %{buildroot}%{_bindir}/django-admin.py %{buildroot}%{_bindir}/django-admin
140
141
142 %files -n python2-%{module}
143 %doc AUTHORS LICENSE README.rst
144 %{_mandir}/man1/*
145 # except the python3 prefix
146 %exclude %{_mandir}/man1/python3-*
147 %{_bindir}/django-admin
148 %{python2_sitelib}/%{module}
149 %{python2_sitelib}/%{tarname}-*.egg-info
150
151 %files -n python3-%{module}
152 %doc AUTHORS LICENSE README.rst
153 %{_mandir}/man1/python3-*
154 %{_bindir}/python3-django-admin
155 %{python3_sitelib}/%{module}
156 %{python3_sitelib}/%{tarname}-*.egg-info
157
158 %files doc
159 %doc docs/_build/html
160
161 %files bash-completion
162 %dir %{_sysconfdir}/bash_completion.d/
163 %config(noreplace) %{_sysconfdir}/bash_completion.d/django_bash_completion
164

  ViewVC Help
Powered by ViewVC 1.1.30