2012-03-07 08:37:49 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-alembic
|
|
|
|
|
#
|
2018-01-17 19:20:11 +00:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
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
|
|
|
|
2017-08-28 12:40:30 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2012-03-07 08:37:49 +00:00
|
|
|
Name: python-alembic
|
2018-11-02 08:14:55 +00:00
|
|
|
Version: 1.0.2
|
2012-03-07 08:37:49 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: A database migration tool for SQLAlchemy
|
|
|
|
|
License: MIT
|
|
|
|
|
Group: Development/Languages/Python
|
2018-07-05 21:34:54 +00:00
|
|
|
URL: http://bitbucket.org/zzzeek/alembic
|
2018-07-05 21:37:01 +00:00
|
|
|
Source0: https://files.pythonhosted.org/packages/source/a/alembic/alembic-%{version}.tar.gz
|
|
|
|
|
Source1: python-alembic-rpmlintrc
|
2013-04-23 08:27:17 +00:00
|
|
|
# Test requirements:
|
2017-08-28 12:40:30 +00:00
|
|
|
BuildRequires: %{python_module Mako}
|
2018-07-14 08:59:31 +00:00
|
|
|
BuildRequires: %{python_module SQLAlchemy >= 0.9.0}
|
2017-08-28 12:40:30 +00:00
|
|
|
BuildRequires: %{python_module mock}
|
|
|
|
|
BuildRequires: %{python_module nose >= 0.11}
|
|
|
|
|
BuildRequires: %{python_module pytest-cov}
|
|
|
|
|
BuildRequires: %{python_module python-dateutil}
|
|
|
|
|
BuildRequires: %{python_module python-editor >= 0.3}
|
2018-07-05 21:34:54 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2012-03-07 08:37:49 +00:00
|
|
|
Requires: python-Mako
|
2018-07-14 08:59:31 +00:00
|
|
|
Requires: python-SQLAlchemy >= 0.9.0
|
2017-08-28 12:40:30 +00:00
|
|
|
Requires: python-python-dateutil
|
2015-08-25 07:28:20 +00:00
|
|
|
Requires: python-python-editor >= 0.3
|
2018-11-14 14:00:23 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
|
Requires(postun): update-alternatives
|
2012-03-07 08:37:49 +00:00
|
|
|
BuildArch: noarch
|
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.
|
|
|
|
|
|
|
|
|
|
%package -n python-alembic-doc
|
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
|
Group: Documentation/Other
|
|
|
|
|
Provides: %{python_module alembic-doc = %{version}}
|
|
|
|
|
|
|
|
|
|
%description -n python-alembic-doc
|
|
|
|
|
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
|
2012-03-07 08:37:49 +00:00
|
|
|
the structure of tables and other constructs
|
2017-08-28 12:40:30 +00:00
|
|
|
* Provides a system whereby "migration scripts" may be constructed;
|
2012-03-07 08:37:49 +00:00
|
|
|
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.
|
|
|
|
|
|
2017-08-28 12:40:30 +00:00
|
|
|
This package contains the documentation.
|
|
|
|
|
|
2012-03-07 08:37:49 +00:00
|
|
|
%prep
|
|
|
|
|
%setup -q -n alembic-%{version}
|
|
|
|
|
mv docs html && rm -rf html/build
|
2018-07-05 21:34:54 +00:00
|
|
|
sed -i -e '1d' alembic/testing/runner.py
|
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
|
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/alembic
|
2017-10-26 10:45:19 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2012-03-07 08:37:49 +00:00
|
|
|
|
|
|
|
|
%check
|
2018-11-14 14:00:23 +00:00
|
|
|
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_version}
|
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
|
2018-07-05 21:34:54 +00:00
|
|
|
%{python_sitelib}/alembic*
|
2012-03-07 08:37:49 +00:00
|
|
|
|
2017-08-28 12:40:30 +00:00
|
|
|
%files -n python-alembic-doc
|
2018-07-05 21:34:54 +00:00
|
|
|
%license LICENSE
|
|
|
|
|
%doc html
|
2017-08-28 12:40:30 +00:00
|
|
|
|
2012-03-07 08:37:49 +00:00
|
|
|
%changelog
|