diff options
Diffstat (limited to 'python/python-django.spec')
| -rw-r--r-- | python/python-django.spec | 74 |
1 files changed, 66 insertions, 8 deletions
diff --git a/python/python-django.spec b/python/python-django.spec index 1d72747..59eb793 100644 --- a/python/python-django.spec +++ b/python/python-django.spec @@ -1,9 +1,14 @@ %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?pyver: %define pyver %(%{__python} -c "import sys ; print sys.version[:3]")} +%global pkgname Django +# one higher than the last Django release, to account for +# dist tags +%global obs_ver 1.3.1-5 + Name: python-django Version: 1.3.1 -Release: 3%{?dist} +Release: 7%{?dist} Summary: A high-level Python Web framework Group: Development/Languages @@ -12,7 +17,16 @@ URL: http://www.djangoproject.com/ Source0: http://media.djangoproject.com/releases/1.3/Django-%{version}.tar.gz # stub simplejson module that imports the system version Source1: simplejson-init.py +# upstream post-1.3.1 patches for building against Sphinx >= 1.1 +# https://code.djangoproject.com/changeset/16223 +Patch0: django-1.3.1-sphinx-table_row_index.patch +Patch1: django-1.3.1-sphinx-param_separator.patch +# upstream post-1.3.1 patch, fixing a test that only works in 2011 +Patch2: django-1.3.1-test-week_view_allow_future.patch + +%if 0%{?rhel} <= 5 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +%endif BuildArch: noarch # Note: No longer required in development version > 0.95 @@ -21,10 +35,14 @@ BuildRequires: python-devel %if 0%{?rhel} > 4 || 0%{?fedora} > 12 BuildRequires: python-sphinx %endif +# for testing +BuildRequires: python-simplejson Requires: python-simplejson -Provides: Django = %{name}-%{version}-%{release} -Obsoletes: Django < %{name}-%{version}-%{release} + +Provides: %{pkgname} = %{version}-%{release} +Provides: django = %{version}-%{release} +Obsoletes: %{pkgname} < %{obs_ver} %description @@ -38,8 +56,10 @@ principle. Summary: Documentation for Django Group: Documentation Requires: %{name} = %{version}-%{release} -Provides: Django-docs = %{version}-%{release} -Obsoletes: Django-docs < %{version}-%{release} + +Provides: django-docs = %{version}-%{release} +Provides: %{pkgname}-docs = %{version}-%{release} +Obsoletes: %{pkgname}-docs < %{obs_ver} %description doc This package contains the documentation for the Django high-level @@ -47,7 +67,17 @@ Python Web framework. %endif %prep -%setup -q -n Django-%{version} +%setup -q -n %{pkgname}-%{version} +%patch0 -p1 -b .sphinx-table_row_index +%patch1 -p1 -b .sphinx-param_separator +%patch2 -p1 -b .test-week_view_allow_future + +# empty files +echo "# just a comment" > django/contrib/markup/models.py +echo "# just a comment" > django/contrib/webdesign/models.py +echo "# just a comment" > django/contrib/staticfiles/models.py +echo "<!-- nothing -->" > django/contrib/flatpages/tests/templates/registration/login.html + # remove bundled simplejson cd django/utils/simplejson/ rm -rf * @@ -84,6 +114,11 @@ rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/ cp -p docs/man/* $RPM_BUILD_ROOT%{_mandir}/man1/ +# install bash completion script +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/ +install -m 0644 -p extras/django_bash_completion \ + $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/ + # Fix items in %%{_bindir} mv $RPM_BUILD_ROOT%{_bindir}/django-admin.py $RPM_BUILD_ROOT%{_bindir}/django-admin @@ -96,6 +131,13 @@ chmod +x \ $RPM_BUILD_ROOT%{python_sitelib}/django/contrib/admin/media/js/compress.py \ $RPM_BUILD_ROOT%{python_sitelib}/django/bin/profiling/gather_profile_stats.py* +# test section +# uncomment, if tests succeed +%check +cd %{_builddir}/%{pkgname}-%{version} +export PYTHONPATH=$(pwd) +cd tests +./runtests.py --settings=test_sqlite %clean rm -rf $RPM_BUILD_ROOT @@ -109,6 +151,8 @@ rm -rf $RPM_BUILD_ROOT %attr(0755,root,root) %{python_sitelib}/django/bin/*-messages.py* %attr(0755,root,root) %{python_sitelib}/django/bin/daily_cleanup.py* %attr(0755,root,root) %{python_sitelib}/django/bin/django-admin.py* +%dir %{_sysconfdir}/bash_completion.d/ +%config(noreplace) %{_sysconfdir}/bash_completion.d/django_bash_completion %{python_sitelib}/django/bin/profiling/* %{python_sitelib}/django/bin/__init__.py* # Include everything but the locale data ... @@ -201,8 +245,22 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Sat Sep 10 2011 Michel Salim <salimma@fedoraproject.org> - 1.3.1-3 -- Rename to python-django +* Sat Mar 10 2012 Michel Salim <salimma@fedoraproject.org> - 1.3.1-7 +- Enable tests +- Now obsoletes (last Django release+1) +- Mark Bash completion script as a configuration file + +* Fri Mar 09 2012 Matthias Runge <mrunge@matthias-runge.de> - 1.3.1-6 +- add additional provides django = %%{version}-%%{release} + +* Wed Mar 07 2012 Matthias Runge <mrunge@matthias-runge.de> - 1.3.1-5 +- rename package to python-django + +* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Oct 12 2011 Michel Salim <salimma@fedoraproject.org> - 1.3.1-3 +- Package bash completion script * Sat Sep 10 2011 Michel Salim <salimma@fedoraproject.org> - 1.3.1-2 - Switch to the 'html' doc builder, for easier navigation without a web server |
