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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30