|
|
757b8ba |
%global srcname sqlalchemy-migrate
|
|
|
66719fe |
%{!?python2_shortver: %global python2_shortver %(%{__python2} -c 'import sys; print(str(sys.version_info.major) + "." + str(sys.version_info.minor))')}
|
|
|
66719fe |
|
|
|
13f6fd2 |
%if 0%{?fedora}
|
|
|
66719fe |
%global with_python3 1
|
|
|
66719fe |
%{!?python3_shortver: %global python3_shortver %(%{__python3} -c 'import sys; print(str(sys.version_info.major) + "." + str(sys.version_info.minor))')}
|
|
|
66719fe |
%endif
|
|
|
6322798 |
|
|
|
6322798 |
Name: python-migrate
|
|
|
66719fe |
Version: 0.10.0
|
|
|
4358eaf |
Release: 2%{?dist}
|
|
|
6322798 |
Summary: Schema migration tools for SQLAlchemy
|
|
|
6322798 |
|
|
|
6322798 |
License: MIT
|
|
|
66719fe |
URL: https://github.com/openstack/%{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 |
BuildArch: noarch
|
|
|
d1ce8b8 |
BuildRequires: python2-devel
|
|
|
66719fe |
BuildRequires: python-sqlalchemy >= 0.7.8
|
|
|
d1ce8b8 |
BuildRequires: python-setuptools
|
|
|
001c0cd |
BuildRequires: python-nose
|
|
|
136962d |
BuildRequires: python-sphinx
|
|
|
757b8ba |
BuildRequires: python-decorator
|
|
|
66719fe |
BuildRequires: python-tempita >= 0.4
|
|
|
66719fe |
BuildRequires: python-pbr >= 1.3.0
|
|
|
66719fe |
BuildRequires: python-six >= 1.9.0
|
|
|
bdcda48 |
BuildRequires: python-sqlparse
|
|
|
526a10b |
|
|
|
bfd9e8b |
# for testsuite
|
|
|
bfd9e8b |
BuildRequires: python-scripttest
|
|
|
89a3d82 |
BuildRequires: python-testtools
|
|
|
bfd9e8b |
|
|
|
66719fe |
Requires: python-sqlalchemy >= 0.7.8
|
|
|
34c4971 |
Requires: python-setuptools
|
|
|
757b8ba |
Requires: python-decorator
|
|
|
66719fe |
Requires: python-tempita >= 0.4
|
|
|
66719fe |
Requires: python-six >= 1.9.0
|
|
|
bdcda48 |
Requires: python-sqlparse
|
|
|
6322798 |
|
|
|
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 |
|
|
|
66719fe |
%if 0%{?with_python3}
|
|
|
66719fe |
%package -n python3-migrate
|
|
|
66719fe |
Summary: Schema migration tools for SQLAlchemy
|
|
|
66719fe |
|
|
|
66719fe |
BuildRequires: python3-devel
|
|
|
66719fe |
BuildRequires: python3-sqlalchemy >= 0.7.8
|
|
|
66719fe |
BuildRequires: python3-setuptools
|
|
|
66719fe |
BuildRequires: python3-nose
|
|
|
66719fe |
BuildRequires: python3-sphinx
|
|
|
66719fe |
BuildRequires: python3-decorator
|
|
|
66719fe |
BuildRequires: python3-tempita >= 0.4
|
|
|
66719fe |
BuildRequires: python3-pbr >= 1.3.0
|
|
|
66719fe |
BuildRequires: python3-six >= 1.9.0
|
|
|
66719fe |
BuildRequires: python3-sqlparse
|
|
|
66719fe |
|
|
|
66719fe |
%description -n python3-migrate
|
|
|
66719fe |
Schema migration tools for SQLAlchemy designed to support an agile approach
|
|
|
66719fe |
to database design and make it easier to keep development and production
|
|
|
66719fe |
databases in sync as schema changes are required. It allows you to manage
|
|
|
66719fe |
database change sets and database repository versioning.
|
|
|
66719fe |
%endif
|
|
|
66719fe |
|
|
|
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
|
|
|
66719fe |
%py2_build
|
|
|
66719fe |
%if 0%{?with_python3}
|
|
|
66719fe |
%py3_build
|
|
|
66719fe |
%endif
|
|
|
6322798 |
|
|
|
6322798 |
%install
|
|
|
66719fe |
%if 0%{?with_python3}
|
|
|
66719fe |
%py3_install
|
|
|
66719fe |
for bin in sqlalchemy-migrate{,-repository}; do
|
|
|
66719fe |
mv %{buildroot}/%{_bindir}/$bin %{buildroot}/%{_bindir}/python3-$bin
|
|
|
66719fe |
done
|
|
|
66719fe |
%endif
|
|
|
66719fe |
%py2_install
|
|
|
66719fe |
|
|
|
66719fe |
# rename binaries, make compat symlinks
|
|
|
66719fe |
pushd %{buildroot}%{_bindir}
|
|
|
66719fe |
for bin in sqlalchemy-migrate{,-repository}; do
|
|
|
66719fe |
ln -s $bin $bin-2
|
|
|
66719fe |
ln -s $bin $bin-%{python2_shortver}
|
|
|
66719fe |
done
|
|
|
66719fe |
|
|
|
66719fe |
%if 0%{?with_python3}
|
|
|
66719fe |
for bin in sqlalchemy-migrate{,-repository}; do
|
|
|
66719fe |
ln -s python3-$bin $bin-3
|
|
|
66719fe |
ln -s python3-$bin $bin-%{python3_shortver}
|
|
|
66719fe |
done
|
|
|
66719fe |
%endif
|
|
|
66719fe |
popd
|
|
|
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/
|
|
|
66719fe |
%{_bindir}/sqlalchemy-migrate
|
|
|
66719fe |
%{_bindir}/sqlalchemy-migrate-repository
|
|
|
66719fe |
%{_bindir}/sqlalchemy-migrate-2*
|
|
|
66719fe |
%{_bindir}/sqlalchemy-migrate-repository-2*
|
|
|
b2d0dd9 |
%{python2_sitelib}/*
|
|
|
66719fe |
|
|
|
66719fe |
%if 0%{?with_python3}
|
|
|
66719fe |
%files -n python3-migrate
|
|
|
66719fe |
%doc README.rst doc/
|
|
|
66719fe |
%{_bindir}/python3-sqlalchemy-migrate
|
|
|
66719fe |
%{_bindir}/python3-sqlalchemy-migrate-repository
|
|
|
66719fe |
%{_bindir}/sqlalchemy-migrate-3*
|
|
|
66719fe |
%{_bindir}/sqlalchemy-migrate-repository-3*
|
|
|
66719fe |
%{python3_sitelib}/*
|
|
|
66719fe |
%endif
|
|
|
6322798 |
|
|
|
6322798 |
%changelog
|
|
|
4358eaf |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.10.0-2
|
|
|
4358eaf |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
4358eaf |
|
|
|
66719fe |
* Fri Dec 18 2015 Haïkel Guémar <hguemar@fedoraproject.org> - 0.10.0-1
|
|
|
66719fe |
- Upstream 0.10.0
|
|
|
66719fe |
- Add python3 subpackage
|
|
|
66719fe |
|
|
|
ac1aca5 |
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-2
|
|
|
ac1aca5 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
ac1aca5 |
|
|
|
7d3427d |
* Wed Apr 01 2015 Pádraig Brady <pbrady@redhat.com> - 0.9.6.1
|
|
|
7d3427d |
- Latest upstream
|
|
|
7d3427d |
|
|
Alan Pevec |
bdf2fb0 |
* Tue Mar 31 2015 Pádraig Brady <pbrady@redhat.com> - 0.9.5-1
|
|
Alan Pevec |
bdf2fb0 |
- Latest upstream
|
|
Alan Pevec |
bdf2fb0 |
|
|
|
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.
|