15
0

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
This commit is contained in:
Denisart Benjamin
2015-04-27 19:12:04 +00:00
committed by Git OBS Bridge
parent 5b067eb02b
commit ee963be1ee
4 changed files with 70 additions and 9 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:550f10b2266f689778eced2fed899bfd05755737478454b97fb99385f2e780e5
size 604836

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f998184b8cd6d522249e88bb0e7f6ccd80cdd73df50189e85c7c35740b17e7d4
size 616232

View File

@@ -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 doesnt 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

View File

@@ -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