forked from pool/python-alembic
update to latest version OBS-URL: https://build.opensuse.org/request/show/535614 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-alembic?expand=0&rev=57
115 lines
3.9 KiB
RPMSpec
115 lines
3.9 KiB
RPMSpec
#
|
|
# spec file for package python-alembic
|
|
#
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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 http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
Name: python-alembic
|
|
Version: 0.9.6
|
|
Release: 0
|
|
Url: http://bitbucket.org/zzzeek/alembic
|
|
Summary: A database migration tool for SQLAlchemy
|
|
License: MIT
|
|
Group: Development/Languages/Python
|
|
Source: https://pypi.io/packages/source/a/alembic/alembic-%{version}.tar.gz
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: %{python_module devel}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
# Test requirements:
|
|
BuildRequires: %{python_module Mako}
|
|
BuildRequires: %{python_module SQLAlchemy >= 0.7.6}
|
|
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}
|
|
Requires: python-Mako
|
|
Requires: python-SQLAlchemy >= 0.7.6
|
|
Requires: python-python-dateutil
|
|
Requires: python-python-editor >= 0.3
|
|
Requires(post): /usr/sbin/update-alternatives
|
|
Requires(postun): /usr/sbin/update-alternatives
|
|
BuildArch: noarch
|
|
|
|
%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.
|
|
|
|
%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
|
|
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.
|
|
|
|
This package contains the documentation.
|
|
|
|
%prep
|
|
%setup -q -n alembic-%{version}
|
|
mv docs html && rm -rf html/build
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%python_clone -a %{buildroot}%{_bindir}/alembic
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
%python_exec setup.py test
|
|
|
|
%post
|
|
%python_install_alternative alembic
|
|
|
|
%postun
|
|
%python_uninstall_alternative alembic
|
|
|
|
%files %{python_files}
|
|
%defattr(-,root,root,-)
|
|
%doc CHANGES LICENSE README.rst
|
|
%python_alternative %{_bindir}/alembic
|
|
%{python_sitelib}/*
|
|
|
|
%files -n python-alembic-doc
|
|
%doc LICENSE html
|
|
|
|
%changelog
|