python-django/python-django.spec

115 lines
3.5 KiB
RPMSpec

%define majver %(echo %version | cut -d. -f1-2)
Name: python-django
Version: 1.8.1
Release: 2mamba
Summary: A high-level Python Web framework
Group: System/Libraries/Python
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.djangoproject.com/
Source: https://www.djangoproject.com/m/releases/%{majver}/Django-%{version}.tar.gz
# stub simplejson module that imports the system version
Source1: simplejson-init.py
License: BSD
## AUTOBUILDREQ-BEGIN
BuildRequires: libpython3-devel
## AUTOBUILDREQ-END
BuildRequires: python-Sphinx
BuildRequires: python-Jinja2
Requires: python3 >= %python3_version
Requires: python-simplejson-py3
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Django is a high-level Python Web framework that encourages rapid development and a clean, pragmatic design. It focuses on automating as much as possible and adhering to the DRY (Don't Repeat Yourself) principle.
%package doc
Group: Documentation
Summary: Documentation for %{name}
%description doc
Django is a high-level Python Web framework that encourages rapid development and a clean, pragmatic design. It focuses on automating as much as possible and adhering to the DRY (Don't Repeat Yourself) principle.
This package contains documentation for %{name} high-level Python Web framework.
%prep
%setup -q -n Django-%{version}
#cd django/utils/simplejson/
#rm -rf *
#cp -p %{SOURCE1} __init__.py
%build
%{__python3} setup.py build
(
cd docs
make html
)
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%{__python3} setup.py install \
--skip-build \
--root="%{buildroot}" \
--install-headers=%{_includedir}/python \
--install-lib=%{python3_sitearch}
mkdir -p %{buildroot}%{_mandir}/man1/
cp -p docs/man/* %{buildroot}%{_mandir}/man1/
mv %{buildroot}%{_bindir}/django-admin.py %{buildroot}%{_bindir}/django-admin
find %{buildroot} -name "*.po" | xargs rm -f
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{python3_sitearch}/Django-%{version}-py%{python3_version}.egg-info
%{_bindir}/django-admin
%dir %{python3_sitearch}/django
%{python3_sitearch}/django/*.py*
%{python3_sitearch}/django/apps
%{python3_sitearch}/django/bin
%{python3_sitearch}/django/conf
%{python3_sitearch}/django/contrib
%{python3_sitearch}/django/core
%{python3_sitearch}/django/db
%{python3_sitearch}/django/dispatch
%{python3_sitearch}/django/forms
%{python3_sitearch}/django/http
%{python3_sitearch}/django/middleware
#%{python3_sitearch}/django/shortcuts
%{python3_sitearch}/django/template
%{python3_sitearch}/django/templatetags
%{python3_sitearch}/django/test
%{python3_sitearch}/django/utils
%{python3_sitearch}/django/views
%dir %{python3_sitearch}/django/__pycache__
%{python3_sitearch}/django/__pycache__/*
#%{_mandir}/man1/daily_cleanup.1*
%{_mandir}/man1/django-admin.1*
#%{_mandir}/man1/gather_profile_stats.1*
%doc AUTHORS LICENSE
%files doc
%defattr(-,root,root)
%doc docs/_build/html/*
%changelog
* Sat May 16 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 1.8.1-2mamba
- rebuilt with python3
* Thu May 14 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 1.8.1-1mamba
- update to 1.8.1
* Mon Aug 11 2014 Automatic Build System <autodist@mambasoft.it> 1.6.5-1mamba
- automatic version update by autodist
* Sat Aug 09 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.5.8-1mamba
- update to 1.5.8
* Sun Jan 31 2010 gil <puntogil@libero.it> 1.1.1-1mamba
- package created by autospec