Blob Blame History Raw
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name:           django-evolution
Version:        0.6.2
Release:        2%{?dist}
Summary:        Schema evolution for Django

Group:          Development/Languages
License:        BSD
URL:            http://code.google.com/p/django-evolution/
Source0:        http://pypi.python.org/packages/source/d/django_evolution/django_evolution-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  python-devel
BuildRequires:  python-setuptools
BuildRequires:  python-nose
BuildRequires:  python-coverage
BuildRequires:  pyflakes
BuildRequires:  python-sqlite
BuildRequires:  Django
Requires:       Django

# Patches
Patch0001: FED01-Disable-ez_setup-when-installing-by-RPM.patch

%description
When you run ./manage.py syncdb, Django will look for any new models that
have been defined, and add a database table to represent those new models.
However, if you make a change to an existing model, ./manage.py syncdb will
not make any changes to the database.

This is where Django Evolution fits in. Django Evolution is an extension to
Django that allows you to track changes in your models over time, and to
update the database to reflect those changes.

%prep
%setup -q -n django_evolution-%{version}
%patch0001 -p1

%build
%{__python} setup.py build

%check
%{__python} tests/runtests.py
%{__python} tests/run-pyflakes.py

%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

#Make tests executable
chmod +x $RPM_BUILD_ROOT/%{python_sitelib}/tests/runtests.py
chmod +x $RPM_BUILD_ROOT/%{python_sitelib}/tests/run-pyflakes.py

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc AUTHORS LICENSE README docs/
%{python_sitelib}/django_evolution/*
%{python_sitelib}/django_evolution-%{version}*.egg-info
%{python_sitelib}/tests/*

%changelog
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Mon Nov 22 2010 Stephen Gallagher <sgallagh@redhat.com> - 0.6.2-1
- Upgrade to django-evolution 0.6.2 to support ReviewBoard 1.5.1

* Wed Nov 10 2010 Stephen Gallagher <sgallagh@redhat.com> - 0.6.1-1
- Upgrade to latest upstream release

* Thu Jul 29 2010 Stephen Gallagher <sgallagh@redhat.com> - 0.5-4
- Rebuilding to fix python 2.7 issues

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.5-3
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Thu Jun 3 2010 Stephen Gallagher <sgallagh@redhat.com> - 0.5-2
- Stable upstream release 0.5.0

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.0-1.1.svnr164
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Mar 02 2009 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> 0.0-0.1.svnr164
- Add Requires: Django

* Wed Feb 18 2009 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> 0.0-0.20080217svnr164
- Initial RPM release