%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %global srcname sqlalchemy-migrate Name: python-migrate0.5 Version: 0.5.3 Release: 7%{?dist} Summary: Schema migration tools for SQLAlchemy Group: Development/Languages License: MIT URL: http://code.google.com/p/%{srcname}/ Source0: http://%{srcname}.googlecode.com/files/%{srcname}-%{version}.tar.gz # Local patch to rename /usr/bin/migrate to sqlalchemy-migrate Patch0: python-migrate-sqlalchemy-migrate.patch Patch1: python-migrate-py2.4-import.patch Patch2: python-migrate0.5-SA0.5.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel BuildRequires: python-sqlalchemy0.5 BuildRequires: python-sqlite2 BuildRequires: python-setuptools-devel BuildRequires: python-nose BuildRequires: python-sphinx Requires: python-sqlalchemy0.5 Requires: python-setuptools %description Schema migration tools for SQLAlchemy designed to support an agile approach to database design and make it easier to keep development and production databases in sync as schema changes are required. It allows you to manage database change sets and database repository versioning. %prep %setup -q -n %{srcname}-%{version} %patch0 -p1 -b .rename %patch1 -p0 -b .import %patch2 -p0 -b .sa05 %build CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py bdist_egg %install %{__rm} -rf %{buildroot} mkdir -p %{buildroot}%{python_sitelib} touch %{buildroot}%{python_sitelib}/easy-install.pth easy_install -m --prefix %{buildroot}%{_usr} dist/*.egg %{__mv} %{buildroot}%{_bindir}/sqlalchemy-migrate{,0.5} %{__mv} %{buildroot}%{_bindir}/sqlalchemy-migrate-repository{,0.5} %{__rm} %{buildroot}%{python_sitelib}/easy-install.pth %clean %{__rm} -rf %{buildroot} %check echo 'sqlite:///__tmp__' > test_db.cfg %{__python} setup.py test %files %defattr(-,root,root,-) %doc README CHANGELOG docs/ %{_bindir}/* %defattr(0644,root,root,0755) %{python_sitelib}/* %changelog * Mon Oct 19 2009 Luke Macken - 0.5.3-7 - Use %%global instead of %%define - Fix a typo in the description - Fix module permissions - Remove easy-install.pth * Tue Oct 13 2009 Luke Macken - 0.5.3-6 - Patch from Toshio to get the test suite running (#507697) * Thu Oct 01 2009 Luke Macken - 0.5.3-5 - Add a patch to use pkg_resources to pull in the approprate SQLAlchemy module * Tue Jul 07 2009 Luke Macken - 0.5.3-4 - Rename the sqlalchemy-migrate and sqlalchemy-migrate-repository scripts, as to not conflict with the python-migrate package. * Wed Jun 17 2009 Luke Macken - 0.5.3-3 - Split out into a separate python-migrate0.5 package. * Mon Jun 01 2009 Luke Macken 0.5.3-2 - Add python-sqlite2 to the build requirements - Add python-migrate-py2.4-import.patch, which makes the use of __import__ work on Python 2.4 * Thu Apr 16 2009 Toshio Kuratomi 0.5.3-1 - Update to new bugfix release. * Thu Feb 26 2009 Fedora Release Engineering - 0.5.1.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Wed Feb 11 2009 Toshio Kuratomi 0.5.1.2-2 - Add BR on python-sphinx * Wed Feb 11 2009 Toshio Kuratomi 0.5.1.2-1 - Update to 0.5.1.2 release with official support for SA-0.5 - Remove patches merged upstream * Mon Jan 26 2009 Toshio Kuratomi 0.5.1-0.1.20090122.svn479 - Update to snapshot so that it works with sqlalchemy-0.5 - Enable test suite * Sat Nov 29 2008 Ignacio Vazquez-Abrams - 0.4.5-4 - Rebuild for Python 2.6 * Tue Jul 29 2008 Toshio Kuratomi 0.4.5-3 - Patch to generate a script for the repository migrate script. - Move the script rename into a patch to setup.py. * Thu Jul 17 2008 Toshio Kuratomi 0.4.5-2 - Remove patches that are merged upstream. * Thu Jul 17 2008 Toshio Kuratomi 0.4.5-1 - New upstream * Thu Jul 17 2008 Toshio Kuratomi 0.4.4-4 - Disable py.test so we don't try to download it during build. * Tue Jul 15 2008 Toshio Kuratomi 0.4.4-3 - Rename binary to sqlalchemy-migrate to avoid potential filename clashes. (Queried upstream but the change is only in Fedora). Noted that openmosix defintely has a /usr/bin/migrate already. * Sat Jul 06 2008 Ricky Zhou 0.4.4-2 - Add BuildRequires on python-setuptools-devel. - Add Requires on SQLAlchemy. * Sat Jun 21 2008 Toshio Kuratomi 0.4.4-1 - Initial Fedora Build.