]> git.pld-linux.org Git - packages/python-django.git/blame - python-django.spec
remove obsolete comment
[packages/python-django.git] / python-django.spec
CommitLineData
d2a760e3
JK
1# Conditional build:
2%bcond_without python2 # CPython 2.x module
3%bcond_without python3 # CPython 3.x module
4
85ac776c 5%define module django
c053fa9c 6Summary: The web framework for perfectionists with deadlines
0fb0c5e5 7Summary(pl.UTF-8): Szkielet WWW dla perfekcjonistów z ograniczeniami czasowymi
85ac776c 8Name: python-%{module}
e9a6c497 9Version: 1.8.7
f49525f0 10Release: 4
c053fa9c 11License: BSD
70ed983d 12Group: Libraries/Python
39cf8c36 13Source0: http://www.djangoproject.com/m/releases/1.8/Django-%{version}.tar.gz
e9a6c497 14# Source0-md5: 44c01355b5efa01938a89b8bd798b1ed
c053fa9c 15URL: http://www.djangoproject.com/
d2a760e3 16%if %{with python2}
39cf8c36 17BuildRequires: python-devel >= 1:2.7
5087193f 18BuildRequires: python-setuptools
d2a760e3
JK
19%endif
20%if %{with python3}
24d19ba3 21BuildRequires: python3-devel >= 1:3.3
cda38c21 22BuildRequires: python3-setuptools
d2a760e3 23%endif
af0bb85a 24BuildRequires: rpm-pythonprov
e9a6c497 25BuildRequires: rpmbuild(macros) >= 1.710
36477d4b 26BuildRequires: sphinx-pdg
af0bb85a 27%pyrequires_eq python
a0fa853e 28Requires: python-modules
acf565b6 29Suggests: python-devel-tools
c738773c
SP
30Suggests: python-MySQLdb
31Suggests: python-PyGreSQL
c053fa9c
AM
32BuildArch: noarch
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36Django is a high-level Python Web framework that encourages rapid
37development and clean, pragmatic design.
38
dff19739
JR
39%description -l pl.UTF-8
40Django to wysokopoziomowy szkielet dla serwisów WWW w Pythonie
41wspierający szybkie tworzenie i czysty, pragmatyczny projekt.
f14ec3a7 42
d2a760e3
JK
43%package -n python3-%{module}
44Summary: The web framework for perfectionists with deadlines
45Summary(pl.UTF-8): Szkielet WWW dla perfekcjonistów z ograniczeniami czasowymi
46Group: Libraries/Python
47%pyrequires_eq python3
a0fa853e 48Requires: python3-modules
acf565b6 49Suggests: python3-devel-tools
39cf8c36 50Suggests: python3-MySQLdb
d2a760e3
JK
51Suggests: python3-psycopg2
52
53%description -n python3-%{module}
54Django is a high-level Python Web framework that encourages rapid
55development and clean, pragmatic design.
56
57%description -n python3-%{module} -l pl.UTF-8
58Django to wysokopoziomowy szkielet dla serwisów WWW w Pythonie
59wspierający szybkie tworzenie i czysty, pragmatyczny projekt.
60
36477d4b 61%package doc
62Summary: Documentation on Django
63Summary(de.UTF-8): Dokumentation zu Django
64Summary(es.UTF-8): Documentación para Django
65Summary(fr.UTF-8): Documentation sur Django
66Summary(pl.UTF-8): Dokumentacja do Django
67Group: Documentation
68
69%description doc
70Documentation on Django.
71
72%description doc -l pl.UTF-8
73Dokumentacja do Django.
74
c053fa9c 75%prep
d4aa0cb9 76%setup -q -n Django-%{version}
05e71f33 77
c053fa9c 78%build
e9a6c497
JK
79%if %{with python2}
80%py_build
81%endif
36477d4b 82%{__make} -C docs html
e9a6c497
JK
83%if %{with python3}
84%py3_build
85%endif
36477d4b 86
c053fa9c
AM
87%install
88rm -rf $RPM_BUILD_ROOT
36477d4b 89install -d $RPM_BUILD_ROOT%{_docdir}
d2a760e3
JK
90
91%if %{with python2}
e9a6c497 92%py_install
d2a760e3
JK
93cp $RPM_BUILD_ROOT%{_bindir}/{django-admin.py,py2-django-admin}
94%endif
95
96%if %{with python3}
e9a6c497 97%py3_install
d2a760e3
JK
98cp $RPM_BUILD_ROOT%{_bindir}/{django-admin.py,py3-django-admin}
99%if %{with python2}
100# default to python2 if built
101cp $RPM_BUILD_ROOT%{_bindir}/{py2-django-admin,django-admin.py}
102%endif
103%endif
c053fa9c 104
adda894a 105find $RPM_BUILD_ROOT -type f -name '*.py[co]' | xargs rm
3ef44b33
AM
106find $RPM_BUILD_ROOT -type f -exec sed -i -e "s#$RPM_BUILD_ROOT##g" "{}" ";"
107
d2a760e3 108%if %{with python2}
c053fa9c
AM
109%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
110%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
d2a760e3 111
adda894a 112find $RPM_BUILD_ROOT%{py_sitescriptdir} -type f -path '*_template*' -a -name '*.py[oc]' | xargs rm
d2a760e3
JK
113%endif
114
115%if %{with python3}
116%py3_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
117%py3_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
118%endif
c053fa9c 119
36477d4b 120ln -sf python-django-doc-%{version} $RPM_BUILD_ROOT%{_docdir}/python-django-doc
121rm -rf docs/_build/html/_sources
122
c053fa9c
AM
123%clean
124rm -rf $RPM_BUILD_ROOT
125
d2a760e3 126%if %{with python2}
c053fa9c
AM
127%files
128%defattr(644,root,root,755)
d2a760e3 129%doc README.rst
adda894a 130%attr(755,root,root) %{_bindir}/django-admin.py
d2a760e3 131%attr(755,root,root) %{_bindir}/py2-django-admin
c053fa9c 132%{py_sitescriptdir}/%{module}*
85ac776c 133%{py_sitescriptdir}/Django-*.egg-info
d3df6894 134%endif
36477d4b 135
d2a760e3
JK
136%if %{with python3}
137%files -n python3-%{module}
138%defattr(644,root,root,755)
139%doc README.rst
140%if %{without python2}
141%attr(755,root,root) %{_bindir}/django-admin.py
142%endif
143%attr(755,root,root) %{_bindir}/py3-django-admin
144%{py3_sitescriptdir}/%{module}*
145%{py3_sitescriptdir}/Django-*.egg-info
146%endif
147
36477d4b 148%files doc
149%defattr(644,root,root,755)
150%doc docs/_build/html
151%{_docdir}/python-django-doc
This page took 0.057125 seconds and 4 git commands to generate.