%define module django %define tarname Django %define name python-%{module} %define version 1.5.4 %define release %mkrel 2 Summary: A high-level Python Web framework Name: %{name} Version: %{version} Release: %{release} Source0: https://pypi.python.org/packages/source/D/%{tarname}/%{tarname}-%{version}.tar.gz License: BSD Group: Development/Python Url: http://www.djangoproject.com BuildArch: noarch BuildRequires: python-setuptools BuildRequires: python-sphinx BuildRequires: python-devel BuildRequires: python3-devel BuildRequires: python3-setuptools %description Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Developed and used over the past two years by a fast-moving online-news operation, Django was designed from scratch to handle two challenges: the intensive deadlines of a newsroom and the stringent requirements of experienced Web developers. It has convenient niceties for developing content-management systems, but it's an excellent tool for building any Web site. Django focuses on automating as much as possible and adhering to the DRY principle. %package -n python3-%{module} Summary: A high-level Python Web framework Group: Development/Python %description -n python3-%{module} Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Developed and used over the past two years by a fast-moving online-news operation, Django was designed from scratch to handle two challenges: the intensive deadlines of a newsroom and the stringent requirements of experienced Web developers. It has convenient niceties for developing content-management systems, but it's an excellent tool for building any Web site. Django focuses on automating as much as possible and adhering to the DRY principle. %package doc Summary: Documentation for django Group: Development/Python Provides: python3-%{module}-doc = %{version}-%{release} %description doc This package contains documentation for Django, a high-level Python Web framework. %prep %setup -q -n %{tarname}-%{version} sed -i 's/^\(ez_setup.use_setuptools\)/#\1/' setup.py cp -a . %{py3dir} %build %{__python} setup.py build make -C docs/ html pushd %{py3dir} %{__python3} setup.py build popd %install # must do install of python 3 subpackage first, so that we don't # overwrite django-admin script with the python 3 version pushd %{py3dir} %{__python3} setup.py install --skip-build --root %{buildroot} mv %{buildroot}%{_bindir}/django-admin.py %{buildroot}%{_bindir}/python3-django-admin.py popd %{__python} setup.py install --skip-build --root %{buildroot} %files %doc README* %{_bindir}/django-admin.py %{python_sitelib}/%{module} %{python_sitelib}/%{tarname}-*.egg-info %files -n python3-%{module} %doc README* %{_bindir}/python3-django-admin.py %{python3_sitelib}/%{module} %{python3_sitelib}/%{tarname}-*.egg-info %files doc %doc README* docs/_build/html