]>
Commit | Line | Data |
---|---|---|
8b2e3bca ER |
1 | # |
2 | # Conditional build: | |
412d21e4 | 3 | %bcond_with tests # do not perform "make test" |
8b2e3bca | 4 | |
412d21e4 | 5 | %define module django-evolution |
8b2e3bca ER |
6 | Summary: Schema evolution for Django |
7 | Name: python-django-evolution | |
ec81c6a7 | 8 | Version: 0.6.8 |
230457c3 | 9 | Release: 4 |
8b2e3bca ER |
10 | License: BSD |
11 | Group: Development/Languages | |
12 | URL: http://code.google.com/p/django-evolution/ | |
13 | Source0: http://pypi.python.org/packages/source/d/django_evolution/django_evolution-%{version}.tar.gz | |
ec81c6a7 | 14 | # Source0-md5: e3393e745810ecffc7bbe647effcf86a |
8b2e3bca ER |
15 | BuildRequires: python-coverage |
16 | BuildRequires: python-devel | |
bad6bff9 | 17 | BuildRequires: python-django >= 1.1.1 |
8b2e3bca ER |
18 | BuildRequires: python-nose |
19 | BuildRequires: python-pyflakes | |
20 | BuildRequires: python-setuptools | |
21 | BuildRequires: python-sqlite | |
b9f76c45 | 22 | BuildRequires: rpmbuild(macros) >= 1.710 |
8b2e3bca | 23 | BuildRequires: sed >= 4.0 |
bad6bff9 | 24 | Requires: python-django >= 1.1.1 |
8b2e3bca ER |
25 | BuildArch: noarch |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | When you run ./manage.py syncdb, Django will look for any new models | |
30 | that have been defined, and add a database table to represent those | |
31 | new models. However, if you make a change to an existing model, | |
32 | ./manage.py syncdb will not make any changes to the database. | |
33 | ||
34 | This is where Django Evolution fits in. Django Evolution is an | |
35 | extension to Django that allows you to track changes in your models | |
36 | over time, and to update the database to reflect those changes. | |
37 | ||
38 | %prep | |
39 | %setup -q -n django_evolution-%{version} | |
40 | %{__sed} -i -e 's/^from ez_setup/#from ez_setup/' setup.py | |
41 | %{__sed} -i -e 's/^use_setuptools()/#use_setuptools()/' setup.py | |
42 | ||
bad6bff9 ER |
43 | %{__rm} -r *.egg-info |
44 | ||
8b2e3bca | 45 | %build |
02be3bad | 46 | %py_build |
8b2e3bca ER |
47 | |
48 | %if %{with tests} | |
49 | %{__python} tests/runtests.py | |
50 | %{__python} tests/run-pyflakes.py | |
51 | %endif | |
52 | ||
53 | %install | |
54 | rm -rf $RPM_BUILD_ROOT | |
02be3bad | 55 | %py_install \ |
8b2e3bca ER |
56 | --root $RPM_BUILD_ROOT |
57 | ||
58 | %py_postclean | |
59 | ||
bad6bff9 ER |
60 | # Delete tests. They aren't useful in an installed system |
61 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/django_evolution/tests | |
62 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/tests | |
8b2e3bca ER |
63 | |
64 | %clean | |
65 | rm -rf $RPM_BUILD_ROOT | |
66 | ||
67 | %files | |
68 | %defattr(644,root,root,755) | |
69 | %doc AUTHORS LICENSE README docs | |
70 | %{py_sitescriptdir}/django_evolution | |
71 | %if "%{py_ver}" > "2.4" | |
72 | %{py_sitescriptdir}/django_evolution-%{version}-*.egg-info | |
73 | %endif |