757b8ba
%global srcname sqlalchemy-migrate
6322798
6322798
Name: python-migrate
Alan Pevec ceaa573
Version: 0.9.5
3766fce
Release: 1%{?dist}
6322798
Summary: Schema migration tools for SQLAlchemy
6322798
6322798
Group: Development/Languages
6322798
License: MIT
ea60125
URL: https://github.com/stackforge/%{srcname}
ea60125
Source0: http://pypi.python.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz
34c4971
# Local patch to rename /usr/bin/migrate to sqlalchemy-migrate
731cb66
Patch100: python-migrate-sqlalchemy-migrate.patch
6322798
6322798
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
6322798
6322798
BuildArch: noarch
d1ce8b8
BuildRequires: python2-devel
001c0cd
BuildRequires: python-sqlalchemy
d1ce8b8
BuildRequires: python-setuptools
001c0cd
BuildRequires: python-nose
136962d
BuildRequires: python-sphinx
757b8ba
BuildRequires: python-decorator
d1ce8b8
BuildRequires: python-tempita
a65a4fe
BuildRequires: python-pbr
a8e437d
BuildRequires: python-six
bdcda48
BuildRequires: python-sqlparse
526a10b
bfd9e8b
# for testsuite
bfd9e8b
BuildRequires: python-scripttest
89a3d82
BuildRequires: python-testtools
bfd9e8b
e3d1840
Requires: python-sqlalchemy
34c4971
Requires: python-setuptools
757b8ba
Requires: python-decorator
d1ce8b8
Requires: python-tempita
a8e437d
Requires: python-six
bdcda48
Requires: python-sqlparse
6322798
757b8ba
%if 0%{?rhel} && 0%{?rhel} < 6
526a10b
BuildRequires: python-sqlite2
526a10b
Requires:      python-sqlite2
526a10b
%endif
526a10b
77fd49c
%if 0%{?rhel} && 0%{?rhel} < 7
d1ce8b8
BuildRequires: python-unittest2
d1ce8b8
%endif
526a10b
6322798
%description
6322798
Schema migration tools for SQLAlchemy designed to support an agile approach
6322798
to database design and make it easier to keep development and production
d603153
databases in sync as schema changes are required.  It allows you to manage
d603153
database change sets and database repository versioning.
6322798
6322798
%prep
a4c8ee8
%setup -q -n %{srcname}-%{version}
edccf8a
%patch100 -p1 -b .rename
bfd9e8b
bfd9e8b
# use real unittest in python 2.7 and up
d1ce8b8
%if 0%{?fedora} || 0%{?rhel} > 6
bfd9e8b
sed -i "s/import unittest2/import unittest as unittest2/g" \
bfd9e8b
    migrate/tests/fixture/__init__.py \
bfd9e8b
    migrate/tests/fixture/base.py
d1ce8b8
%endif
6322798
6322798
%build
4a794ba
%{__python2} setup.py build
6322798
6322798
%install
4a794ba
%{__python2} setup.py install --skip-build --root %{buildroot}
6322798
001c0cd
%check
5613a61
# Need to set PATH for two reasons:
5613a61
# 1) Path isn't being cleared by mock so we have /root/bin/ in the PATH
5613a61
# 2) Need to be able to find the newly installed migrate binaries
5613a61
PATH=/bin:/usr/bin:%{buildroot}%{_bindir}
5613a61
export PATH
5613a61
5613a61
PYTHONPATH=`pwd`
5613a61
export PYTHONPATH
001c0cd
echo 'sqlite:///__tmp__' > test_db.cfg
89a3d82
89a3d82
# Disable temporarily until tests are adjusted to support testtools >= 0.9.36
89a3d82
#nosetests
6322798
6322798
%files
ea60125
%doc README.rst doc/
34c4971
%{_bindir}/*
4a794ba
%{python2_sitelib}/*
6322798
6322798
%changelog
3766fce
* Tue Feb 10 2015 Pádraig Brady <pbrady@redhat.com> - 0.9.4-1
3766fce
- Latest upstream
3766fce
89a3d82
* Wed Nov 19 2014 Pádraig Brady <pbrady@redhat.com> - 0.9.2-2
89a3d82
- build: remove cap on testtools for the moment
89a3d82
e92f2a2
* Thu Sep 18 2014 Pádraig Brady <pbrady@redhat.com> - 0.9.2-1
e92f2a2
- Latest upstream
e92f2a2
a8e437d
* Fri Jun 13 2014 Pádraig Brady <pbrady@redhat.com> - 0.9.1-1
a8e437d
- Latest upstream
a8e437d
536ff3e
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-2
536ff3e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
536ff3e
e93948a
* Sat Mar 08 2014 Pádraig Brady <pbrady@redhat.com> - 0.9-1
e93948a
- Latest upstream
e93948a
4cb187e
* Tue Mar 04 2014 Pádraig Brady <pbrady@redhat.com> - 0.8.5.1
4cb187e
- Latest upstream
4cb187e
ea60125
* Mon Dec 16 2013 Pádraig Brady <pbrady@redhat.com> - 0.8.2-1
ea60125
- Latest upstream
ea60125
3062cca
* Mon Sep 23 2013 Pádraig Brady <pbrady@redhat.com> - 0.7.2-9
3062cca
- improve sqlalchemy 0.8 compatibility
3062cca
f3f3a18
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-8
f3f3a18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
f3f3a18
603ed1d
* Mon Mar 11 2013 Pádraig Brady <P@draigBrady.com> - 0.7.2-7
603ed1d
- Add compatability for sqlalchemy >= 0.8
603ed1d
2673416
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-6
2673416
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
2673416
aefd677
* Thu Dec 20 2012 Pádraig Brady <P@draigBrady.com> - 0.7.2-5
aefd677
- Fix build on RHEL 7
aefd677
61f338d
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-4
61f338d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
61f338d
8016a47
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-3
8016a47
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
8016a47
d1ce8b8
* Wed Nov 16 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.7.2-2
d1ce8b8
- Require python-tempita
d1ce8b8
edccf8a
* Tue Nov 08 2011 Martin Bacovsky <mbacovsk@redhat.com> - 0.7.2-1
edccf8a
- Updated to new version
edccf8a
2edd588
* Sat Jun 25 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.7-1
2edd588
- Update to new version compatible with SQLAlchemy 0.7.x.
2edd588
a16524c
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-4
a16524c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
a16524c
e3d1840
* Thu Jan 13 2011 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6-3
e3d1840
- Fix SQLAlchemy Requires -- need >= 0.5, not 0.6
2edd588
5613a61
* Sun Aug 1 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6-2
5613a61
- Update to unittests to work with newer scripttest API
5613a61
bfd9e8b
* Sat Jul 31 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.6-1
bfd9e8b
- update to new version
bfd9e8b
- testsuite doesn't work right now
bfd9e8b
1fe884f
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.5.4-2
1fe884f
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
1fe884f
757b8ba
* Tue Apr 20 2010 Martin Bacovsky <mbacovsk@redhat.com> - 0.5.4-1
757b8ba
- Update to new bugfix release 
757b8ba
d447119
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.3-3
d447119
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
d447119
526a10b
* Mon Jun 01 2009 Luke Macken <lmacken@redhat.com> 0.5.3-2
526a10b
- Add python-migrate-py2.4-import.patch, which makes the use
526a10b
  of __import__ work on Python 2.4
526a10b
- Add python-sqlite2 to the build requirements on FC6 and below
526a10b
e84bee0
* Thu Apr 16 2009 Toshio Kuratomi <toshio@fedoraproject.org> 0.5.3-1
e84bee0
- Update to new bugfix release.
e84bee0
7805020
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1.2-3
7805020
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
7805020
136962d
* Wed Feb 11 2009 Toshio Kuratomi <toshio@fedoraproject.org> 0.5.1.2-2
136962d
- Add BR on python-sphinx
136962d
a4c8ee8
* Wed Feb 11 2009 Toshio Kuratomi <toshio@fedoraproject.org> 0.5.1.2-1
a4c8ee8
- Update to 0.5.1.2 release with official support for SA-0.5
a4c8ee8
- Remove patches merged upstream
a4c8ee8
001c0cd
* Mon Jan 26 2009 Toshio Kuratomi <toshio@fedoraproject.org> 0.5.1-0.1.20090122.svn479
001c0cd
- Update to snapshot so that it works with sqlalchemy-0.5
001c0cd
- Enable test suite
001c0cd
4478056
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.4.5-4
4478056
- Rebuild for Python 2.6
4478056
34c4971
* Tue Jul 29 2008 Toshio Kuratomi <toshio@fedoraproject.org> 0.4.5-3
34c4971
- Patch to generate a script for the repository migrate script.
34c4971
- Move the script rename into a patch to setup.py.
34c4971
e0589b5
* Thu Jul 17 2008 Toshio Kuratomi <toshio@fedoraproject.org> 0.4.5-2
e0589b5
- Remove patches that are merged upstream.
e0589b5
eb45d14
* Thu Jul 17 2008 Toshio Kuratomi <toshio@fedoraproject.org> 0.4.5-1
eb45d14
- New upstream
eb45d14
964a529
* Thu Jul 17 2008 Toshio Kuratomi <toshio@fedoraproject.org> 0.4.4-4
964a529
- Disable py.test so we don't try to download it during build.
964a529
6322798
* Tue Jul 15 2008 Toshio Kuratomi <toshio@fedoraproject.org> 0.4.4-3
6322798
- Rename binary to sqlalchemy-migrate to avoid potential filename clashes.
6322798
  (Queried upstream but the change is only in Fedora).  Noted that
6322798
  openmosix defintely has a /usr/bin/migrate already.
6322798
89a3d82
* Sun Jul 06 2008 Ricky Zhou <ricky@fedoraproject.org> 0.4.4-2
6322798
- Add BuildRequires on python-setuptools-devel.
6322798
- Add Requires on SQLAlchemy.
6322798
6322798
* Sat Jun 21 2008 Toshio Kuratomi <toshio@fedoraproject.org> 0.4.4-1
6322798
- Initial Fedora Build.