From ee963be1ee2495434b8d7d94f66deda7cfcef44021eda26cd251afb1f9080fb0 Mon Sep 17 00:00:00 2001 From: Denisart Benjamin Date: Mon, 27 Apr 2015 19:12:04 +0000 Subject: [PATCH] Accepting request 303943 from home:benoit_monin:branches:devel:languages:python - update to 0.7.5.post2 - set minimum version for SQLAlchemy to 0.7.6 - use update-alternatives for alembic binary - always run the tests when building the package OBS-URL: https://build.opensuse.org/request/show/303943 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-alembic?expand=0&rev=36 --- alembic-0.7.4.tar.gz | 3 --- alembic-0.7.5.post2.tar.gz | 3 +++ python-alembic.changes | 46 ++++++++++++++++++++++++++++++++++++++ python-alembic.spec | 27 +++++++++++++++++----- 4 files changed, 70 insertions(+), 9 deletions(-) delete mode 100644 alembic-0.7.4.tar.gz create mode 100644 alembic-0.7.5.post2.tar.gz diff --git a/alembic-0.7.4.tar.gz b/alembic-0.7.4.tar.gz deleted file mode 100644 index 726e71e..0000000 --- a/alembic-0.7.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:550f10b2266f689778eced2fed899bfd05755737478454b97fb99385f2e780e5 -size 604836 diff --git a/alembic-0.7.5.post2.tar.gz b/alembic-0.7.5.post2.tar.gz new file mode 100644 index 0000000..6cbcd19 --- /dev/null +++ b/alembic-0.7.5.post2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f998184b8cd6d522249e88bb0e7f6ccd80cdd73df50189e85c7c35740b17e7d4 +size 616232 diff --git a/python-alembic.changes b/python-alembic.changes index 63baa2b..2a7b883 100644 --- a/python-alembic.changes +++ b/python-alembic.changes @@ -1,3 +1,49 @@ +------------------------------------------------------------------- +Sat Apr 25 15:53:02 UTC 2015 - benoit.monin@gmx.fr + +- update to 0.7.5.post2: + * Added a new feature Config.attributes, to help with the use + case of sharing state such as engines and connections on the + outside with a series of Alembic API calls; also added a new + cookbook section to describe this simple but pretty important + use case. + * The format of the default env.py script has been refined a bit; + it now uses context managers not only for the scope of the + transaction, but also for connectivity from the starting + engine. The engine is also now called a “connectable” in + support of the use case of an external connection being passed + in. + * Added support for “alembic stamp” to work when given “heads” as + an argument, when multiple heads are present. + * The --autogenerate option is not valid when used in conjunction + with “offline” mode, e.g. --sql. This now raises a + CommandError, rather than failing more deeply later on. Pull + request courtesy Johannes Erdfelt. + * Fixed bug where the mssql DROP COLUMN directive failed to + include modifiers such as “schema” when emitting the DDL. + * Postgresql “functional” indexes are necessarily skipped from + the autogenerate process, as the SQLAlchemy backend currently + does not support reflection of these structures. A warning is + emitted both from the SQLAlchemy backend as well as from the + Alembic backend for Postgresql when such an index is detected. + * Fixed bug where MySQL backend would report dropped unique + indexes and/or constraints as both at the same time. This is + because MySQL doesn’t actually have a “unique constraint” + construct that reports differently than a “unique index”, so it + is present in both lists. The net effect though is that the + MySQL backend will report a dropped unique index/constraint as + an index in cases where the object was first created as a + unique constraint, if no other information is available to make + the decision. This differs from other backends like Postgresql + which can report on unique constraints and unique indexes + separately. + * Fixed bug where using a partial revision identifier as the + “starting revision” in --sql mode in a downgrade operation + would fail to resolve properly. +- set minimum version for SQLAlchemy to 0.7.6 +- use update-alternatives for alembic binary +- always run the tests when building the package + ------------------------------------------------------------------- Thu Feb 5 15:04:20 UTC 2015 - tbechtold@suse.com diff --git a/python-alembic.spec b/python-alembic.spec index cb24463..ff54de3 100644 --- a/python-alembic.spec +++ b/python-alembic.spec @@ -17,7 +17,7 @@ Name: python-alembic -Version: 0.7.4 +Version: 0.7.5.post2 Release: 0 Url: http://bitbucket.org/zzzeek/alembic Summary: A database migration tool for SQLAlchemy @@ -29,13 +29,15 @@ BuildRequires: python-devel BuildRequires: python-setuptools # Test requirements: BuildRequires: python-Mako -BuildRequires: python-SQLAlchemy >= 0.7.5 +BuildRequires: python-SQLAlchemy >= 0.7.6 BuildRequires: python-argparse BuildRequires: python-mock BuildRequires: python-nose >= 0.11 Requires: python-Mako -Requires: python-SQLAlchemy >= 0.7.5 +Requires: python-SQLAlchemy >= 0.7.6 Requires: python-argparse +Requires(post): update-alternatives +Requires(postun): update-alternatives %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %else @@ -64,17 +66,30 @@ python setup.py build %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} +# update-alternatives +mv %{buildroot}%{_bindir}/alembic %{buildroot}%{_bindir}/alembic-%{py_ver} +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +touch %{buildroot}%{_sysconfdir}/alternatives/alembic +ln -sf %{_sysconfdir}/alternatives/alembic %{buildroot}%{_bindir}/alembic -#NOTE(saschpe): Check back -%if 0%{?suse_version} >= 1130 %check python setup.py test -%endif + +%post +update-alternatives \ + --install %{_bindir}/alembic alembic %{_bindir}/alembic-%{py_ver} 20 + +%postun +if [ $1 -eq 0 ] ; then + update-alternatives --remove alembic %{_bindir}/alembic-%{py_ver} +fi %files %defattr(-,root,root,-) %doc CHANGES LICENSE README.rst html +%ghost %{_sysconfdir}/alternatives/alembic %{_bindir}/alembic +%{_bindir}/alembic-%{py_ver} %{python_sitelib}/* %changelog