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

  ViewVC Help
Powered by ViewVC 1.1.30