/[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 887094 - (show annotations) (download)
Wed Oct 7 20:17:22 2015 UTC (8 years, 6 months ago) by daviddavid
Original Path: cauldron/python-django/current/SPECS/python-django.spec
File size: 4132 byte(s)
- rebuild for python 3.5
- use new python macros

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

  ViewVC Help
Powered by ViewVC 1.1.30