forked from pool/python-alembic
* Fixed :class:`.Rewriter` so that more than two instances
could be chained together correctly, also allowing multiple
``process_revision_directives`` callables to be chained.
* Fixed issue where the method
:meth:`.EnvironmentContext.get_x_argument` using the
:paramref:`.EnvironmentContext.get_x_argument.as_dictionary`
parameter would fail if an argument key were passed on the
command line as a name alone, that is, without an equal sign
``=`` or a value. Behavior is repaired where this condition is
detected and will return a blank string for the given key,
consistent with the behavior where the ``=`` sign is
present and no value.
* Fixed issue where the "unique" flag of an ``Index`` would not
be maintained when generating downgrade migrations.
* Fixed bug in versioning model where a downgrade across a
revision with two down revisions with one down revision
depending on the other, would produce an erroneous state in
the alembic_version table, making upgrades impossible
without manually repairing the table.
* Updated pep-484 typing to pass mypy "strict" mode, however
including per-module qualifications for specific typing
elements not yet complete.
* This allows us to catch specific typing issues that have been
ongoing such as import symbols not properly exported.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-alembic?expand=0&rev=158
95 lines
3.1 KiB
RPMSpec
95 lines
3.1 KiB
RPMSpec
#
|
|
# spec file for package python-alembic
|
|
#
|
|
# Copyright (c) 2023 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?sle15_python_module_pythons}
|
|
Name: python-alembic
|
|
Version: 1.13.1
|
|
Release: 0
|
|
Summary: A database migration tool for SQLAlchemy
|
|
License: MIT
|
|
URL: https://github.com/sqlalchemy/alembic
|
|
Source0: https://files.pythonhosted.org/packages/source/a/alembic/alembic-%{version}.tar.gz
|
|
BuildRequires: %{python_module Mako}
|
|
BuildRequires: %{python_module SQLAlchemy >= 2.0.0}
|
|
BuildRequires: %{python_module backports.zoneinfo if %python-base < 3.9}
|
|
BuildRequires: %{python_module importlib-metadata if %python-base < 3.9}
|
|
BuildRequires: %{python_module importlib-resources if %python-base < 3.9}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module pytest-xdist}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module pytzdata}
|
|
BuildRequires: %{python_module typing-extensions >= 4}
|
|
BuildRequires: %{python_module wheel}
|
|
BuildRequires: %{pythons}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-Mako
|
|
Requires: python-SQLAlchemy >= 2.0.0
|
|
Requires: python-typing-extensions >= 4
|
|
Requires(post): update-alternatives
|
|
Requires(postun):update-alternatives
|
|
BuildArch: noarch
|
|
%if 0%{?python_version_nodots} < 39
|
|
Requires: python-importlib-metadata
|
|
Requires: python-importlib-resources
|
|
%endif
|
|
%python_subpackages
|
|
|
|
%description
|
|
Alembic is a new database migrations tool, written by the author
|
|
of SQLAlchemy <http://www.sqlalchemy.org>. A migrations tool
|
|
offers the following functionality:
|
|
|
|
* Can emit ALTER statements to a database in order to change
|
|
the structure of tables and other constructs
|
|
* Provides a system whereby "migration scripts" may be constructed;
|
|
each script indicates a particular series of steps that can "upgrade" a
|
|
target database to a new version, and optionally a series of steps that can
|
|
"downgrade" similarly, doing the same steps in reverse.
|
|
* Allows the scripts to execute in some sequential manner.
|
|
|
|
%prep
|
|
%setup -q -n alembic-%{version}
|
|
%autopatch -p1
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
%python_clone -a %{buildroot}%{_bindir}/alembic
|
|
|
|
%check
|
|
%pytest -n auto
|
|
|
|
%post
|
|
%python_install_alternative alembic
|
|
|
|
%postun
|
|
%python_uninstall_alternative alembic
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc CHANGES README.rst
|
|
%python_alternative %{_bindir}/alembic
|
|
%{python_sitelib}/alembic
|
|
%{python_sitelib}/alembic-%{version}*-info
|
|
|
|
%changelog
|