2012-03-07 08:37:49 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-alembic
|
|
|
|
|
#
|
2023-01-05 19:13:45 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2012-03-07 08:37:49 +00:00
|
|
|
#
|
|
|
|
|
# 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.
|
2012-06-06 12:15:20 +00:00
|
|
|
|
2018-10-17 16:17:01 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-03-07 08:37:49 +00:00
|
|
|
#
|
|
|
|
|
|
2012-06-06 12:15:20 +00:00
|
|
|
|
2023-06-13 11:35:27 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2012-03-07 08:37:49 +00:00
|
|
|
Name: python-alembic
|
2023-08-13 19:32:51 +00:00
|
|
|
Version: 1.11.2
|
2012-03-07 08:37:49 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: A database migration tool for SQLAlchemy
|
|
|
|
|
License: MIT
|
2018-12-02 09:13:22 +00:00
|
|
|
URL: https://github.com/sqlalchemy/alembic
|
2018-07-05 21:37:01 +00:00
|
|
|
Source0: https://files.pythonhosted.org/packages/source/a/alembic/alembic-%{version}.tar.gz
|
2017-08-28 12:40:30 +00:00
|
|
|
BuildRequires: %{python_module Mako}
|
- update to 1.10.4:
* Added support for autogenerate comparison of indexes on
PostgreSQL which include SQL sort option, such as
``ASC`` or ``NULLS FIRST``.
* Fixed various typing issues observed with pyright, including
issues involving the combination of :class:`.Function` and
:meth:`.MigrationContext.begin_transaction`.
* Fixed error raised by alembic when running autogenerate after
removing a function based index.
* Fixed regression where Alembic would not run with older
SQLAlchemy 1.3 versions prior to 1.3.24 due to a
missing symbol. Workarounds have been applied for older
1.3 versions.
* Fixed issue regarding PostgreSQL :class:`.ExcludeConstraint`,
where constraint elements which made use of :func:`.literal_column`
could not be rendered for autogenerate. Additionally, using SQLAlchemy
2.0.5 or greater, :func:`.text()` constructs are also supported within
PostgreSQL :class:`.ExcludeConstraint` objects for autogenerate render.
* Fixed issue in index detection where autogenerate change
detection would consider indexes with the same columns but with
different order as equal, while in general they are not equivalent
in how a database will use them.
* Recursive traversal of revision files in a particular
revision directory is now supported, by indicating
``recursive_version_locations = true`` in alembic.ini.
* Fixed issue where indexes on SQLite which include SQL
expressions would not compare correctly, generating false
positives under autogenerate. These indexes are now skipped,
generating a warning, in the same way that
expression-based indexes on PostgreSQL are skipped and
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-alembic?expand=0&rev=142
2023-05-05 22:20:37 +00:00
|
|
|
BuildRequires: %{python_module SQLAlchemy >= 2.0.0}
|
2021-11-07 19:02:27 +00:00
|
|
|
BuildRequires: %{python_module importlib-metadata if %python-base < 3.9}
|
2021-12-06 17:52:49 +00:00
|
|
|
BuildRequires: %{python_module importlib-resources if %python-base < 3.9}
|
2021-11-07 19:02:27 +00:00
|
|
|
BuildRequires: %{python_module pytest-xdist}
|
2021-12-06 17:52:49 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2017-08-28 12:40:30 +00:00
|
|
|
BuildRequires: %{python_module python-dateutil}
|
2018-07-05 21:34:54 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
- update to 1.10.4:
* Added support for autogenerate comparison of indexes on
PostgreSQL which include SQL sort option, such as
``ASC`` or ``NULLS FIRST``.
* Fixed various typing issues observed with pyright, including
issues involving the combination of :class:`.Function` and
:meth:`.MigrationContext.begin_transaction`.
* Fixed error raised by alembic when running autogenerate after
removing a function based index.
* Fixed regression where Alembic would not run with older
SQLAlchemy 1.3 versions prior to 1.3.24 due to a
missing symbol. Workarounds have been applied for older
1.3 versions.
* Fixed issue regarding PostgreSQL :class:`.ExcludeConstraint`,
where constraint elements which made use of :func:`.literal_column`
could not be rendered for autogenerate. Additionally, using SQLAlchemy
2.0.5 or greater, :func:`.text()` constructs are also supported within
PostgreSQL :class:`.ExcludeConstraint` objects for autogenerate render.
* Fixed issue in index detection where autogenerate change
detection would consider indexes with the same columns but with
different order as equal, while in general they are not equivalent
in how a database will use them.
* Recursive traversal of revision files in a particular
revision directory is now supported, by indicating
``recursive_version_locations = true`` in alembic.ini.
* Fixed issue where indexes on SQLite which include SQL
expressions would not compare correctly, generating false
positives under autogenerate. These indexes are now skipped,
generating a warning, in the same way that
expression-based indexes on PostgreSQL are skipped and
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-alembic?expand=0&rev=142
2023-05-05 22:20:37 +00:00
|
|
|
BuildRequires: %{python_module typing-extensions >= 4}
|
2019-11-14 12:41:21 +00:00
|
|
|
BuildRequires: %{pythons}
|
2018-07-05 21:34:54 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2012-03-07 08:37:49 +00:00
|
|
|
Requires: python-Mako
|
- update to 1.10.4:
* Added support for autogenerate comparison of indexes on
PostgreSQL which include SQL sort option, such as
``ASC`` or ``NULLS FIRST``.
* Fixed various typing issues observed with pyright, including
issues involving the combination of :class:`.Function` and
:meth:`.MigrationContext.begin_transaction`.
* Fixed error raised by alembic when running autogenerate after
removing a function based index.
* Fixed regression where Alembic would not run with older
SQLAlchemy 1.3 versions prior to 1.3.24 due to a
missing symbol. Workarounds have been applied for older
1.3 versions.
* Fixed issue regarding PostgreSQL :class:`.ExcludeConstraint`,
where constraint elements which made use of :func:`.literal_column`
could not be rendered for autogenerate. Additionally, using SQLAlchemy
2.0.5 or greater, :func:`.text()` constructs are also supported within
PostgreSQL :class:`.ExcludeConstraint` objects for autogenerate render.
* Fixed issue in index detection where autogenerate change
detection would consider indexes with the same columns but with
different order as equal, while in general they are not equivalent
in how a database will use them.
* Recursive traversal of revision files in a particular
revision directory is now supported, by indicating
``recursive_version_locations = true`` in alembic.ini.
* Fixed issue where indexes on SQLite which include SQL
expressions would not compare correctly, generating false
positives under autogenerate. These indexes are now skipped,
generating a warning, in the same way that
expression-based indexes on PostgreSQL are skipped and
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-alembic?expand=0&rev=142
2023-05-05 22:20:37 +00:00
|
|
|
Requires: python-SQLAlchemy >= 2.0.0
|
2017-08-28 12:40:30 +00:00
|
|
|
Requires: python-python-dateutil
|
- update to 1.10.4:
* Added support for autogenerate comparison of indexes on
PostgreSQL which include SQL sort option, such as
``ASC`` or ``NULLS FIRST``.
* Fixed various typing issues observed with pyright, including
issues involving the combination of :class:`.Function` and
:meth:`.MigrationContext.begin_transaction`.
* Fixed error raised by alembic when running autogenerate after
removing a function based index.
* Fixed regression where Alembic would not run with older
SQLAlchemy 1.3 versions prior to 1.3.24 due to a
missing symbol. Workarounds have been applied for older
1.3 versions.
* Fixed issue regarding PostgreSQL :class:`.ExcludeConstraint`,
where constraint elements which made use of :func:`.literal_column`
could not be rendered for autogenerate. Additionally, using SQLAlchemy
2.0.5 or greater, :func:`.text()` constructs are also supported within
PostgreSQL :class:`.ExcludeConstraint` objects for autogenerate render.
* Fixed issue in index detection where autogenerate change
detection would consider indexes with the same columns but with
different order as equal, while in general they are not equivalent
in how a database will use them.
* Recursive traversal of revision files in a particular
revision directory is now supported, by indicating
``recursive_version_locations = true`` in alembic.ini.
* Fixed issue where indexes on SQLite which include SQL
expressions would not compare correctly, generating false
positives under autogenerate. These indexes are now skipped,
generating a warning, in the same way that
expression-based indexes on PostgreSQL are skipped and
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-alembic?expand=0&rev=142
2023-05-05 22:20:37 +00:00
|
|
|
Requires: python-typing-extensions >= 4
|
2022-06-05 16:44:07 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
|
Requires(postun):update-alternatives
|
|
|
|
|
BuildArch: noarch
|
2021-11-07 19:02:27 +00:00
|
|
|
%if 0%{?python_version_nodots} < 39
|
|
|
|
|
Requires: python-importlib-metadata
|
2021-12-06 17:52:49 +00:00
|
|
|
Requires: python-importlib-resources
|
2021-11-07 19:02:27 +00:00
|
|
|
%endif
|
2017-08-28 12:40:30 +00:00
|
|
|
%python_subpackages
|
2012-03-07 08:37:49 +00:00
|
|
|
|
|
|
|
|
%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:
|
|
|
|
|
|
2017-08-28 12:40:30 +00:00
|
|
|
* 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.
|
|
|
|
|
|
2012-03-07 08:37:49 +00:00
|
|
|
%prep
|
|
|
|
|
%setup -q -n alembic-%{version}
|
2020-10-10 10:20:46 +00:00
|
|
|
%autopatch -p1
|
2012-03-07 08:37:49 +00:00
|
|
|
|
|
|
|
|
%build
|
2017-08-28 12:40:30 +00:00
|
|
|
%python_build
|
2012-03-07 08:37:49 +00:00
|
|
|
|
|
|
|
|
%install
|
2017-08-28 12:40:30 +00:00
|
|
|
%python_install
|
2017-10-26 10:45:19 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2019-03-06 11:32:19 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/alembic
|
2012-03-07 08:37:49 +00:00
|
|
|
|
|
|
|
|
%check
|
2021-11-07 19:02:27 +00:00
|
|
|
%pytest -n auto
|
2015-04-27 19:12:04 +00:00
|
|
|
|
|
|
|
|
%post
|
2017-08-28 12:40:30 +00:00
|
|
|
%python_install_alternative alembic
|
2015-04-27 19:12:04 +00:00
|
|
|
|
|
|
|
|
%postun
|
2017-08-28 12:40:30 +00:00
|
|
|
%python_uninstall_alternative alembic
|
2012-03-07 08:37:49 +00:00
|
|
|
|
2017-08-28 12:40:30 +00:00
|
|
|
%files %{python_files}
|
2018-07-05 21:34:54 +00:00
|
|
|
%license LICENSE
|
|
|
|
|
%doc CHANGES README.rst
|
2017-08-28 12:40:30 +00:00
|
|
|
%python_alternative %{_bindir}/alembic
|
2021-11-07 19:02:27 +00:00
|
|
|
%{python_sitelib}/alembic
|
|
|
|
|
%{python_sitelib}/alembic-%{version}*-info
|
2012-03-07 08:37:49 +00:00
|
|
|
|
|
|
|
|
%changelog
|