61d3a5
%global modname alembic
61d3a5
61d3a5
Name:             python-alembic
617132
Version:          1.7.1
617132
Release:          3%{?dist}
61d3a5
Summary:          Database migration tool for SQLAlchemy
61d3a5
61d3a5
License:          MIT
61d3a5
URL:              https://pypi.io/project/alembic
61d3a5
Source0:          %pypi_source alembic
61d3a5
617132
# Alembic fails with Python 3.10.0b2 due to DeprecationWarnings treated as an error.
617132
# Downstream report: https://bugzilla.redhat.com/show_bug.cgi?id=1958159
617132
Patch1:           0001-filter-out-DeprecationWarnings.patch
617132
61d3a5
BuildArch:        noarch
61d3a5
617132
BuildRequires: openstack-macros
61d3a5
BuildRequires:    help2man
61d3a5
61d3a5
BuildRequires:    python3-devel
61d3a5
BuildRequires:    python3-sqlalchemy >= 1.1
61d3a5
BuildRequires:    python3-mako
61d3a5
BuildRequires:    python3-nose
61d3a5
BuildRequires:    python3-setuptools
61d3a5
BuildRequires:    python3-mock
61d3a5
BuildRequires:    python3-dateutil
61d3a5
BuildRequires:    python3-editor
61d3a5
BuildRequires:    python3-pytest
617132
%if 0%{?rhel} == 8
617132
BuildRequires:    python3-importlib-resources
617132
%endif
61d3a5
61d3a5
61d3a5
%global _description\
61d3a5
Alembic is a new database migrations tool, written by the author of\
61d3a5
SQLAlchemy.  A migrations tool offers the following functionality:\
61d3a5
\
61d3a5
* Can emit ALTER statements to a database in order to change the structure\
61d3a5
  of tables and other constructs.\
61d3a5
* Provides a system whereby "migration scripts" may be constructed; each script\
61d3a5
  indicates a particular series of steps that can "upgrade" a target database\
61d3a5
  to a new version, and optionally a series of steps that can "downgrade"\
61d3a5
  similarly, doing the same steps in reverse.\
61d3a5
* Allows the scripts to execute in some sequential manner.\
61d3a5
\
61d3a5
Documentation and status of Alembic is at http://readthedocs.org/docs/alembic/
61d3a5
61d3a5
%description %_description
61d3a5
61d3a5
61d3a5
%package -n python3-alembic
61d3a5
Summary:          %summary
61d3a5
617132
%if 0%{?rhel} == 8
617132
Requires:         python3-importlib-resources
617132
%endif
61d3a5
%{?python_provide:%python_provide python3-alembic}
61d3a5
61d3a5
61d3a5
%description -n python3-alembic %_description
61d3a5
61d3a5
%prep
61d3a5
%autosetup -p1 -n %{modname}-%{version}
61d3a5
61d3a5
61d3a5
%build
61d3a5
%py3_build
61d3a5
61d3a5
%{__mkdir_p} bin
61d3a5
echo 'python3 -c "import alembic.config; alembic.config.main()" $*' > bin/alembic
61d3a5
chmod 0755 bin/alembic
61d3a5
help2man --version-string %{version} --no-info -s 1 bin/alembic > alembic.1
61d3a5
61d3a5
61d3a5
%install
61d3a5
61d3a5
install -d -m 0755 %{buildroot}%{_mandir}/man1
61d3a5
61d3a5
%py3_install
61d3a5
mv %{buildroot}/%{_bindir}/%{modname} %{buildroot}/%{_bindir}/%{modname}-3
61d3a5
ln -s %{modname}-3 %{buildroot}/%{_bindir}/%{modname}-%{python3_version}
61d3a5
install -m 0644 alembic.1 %{buildroot}%{_mandir}/man1/alembic-3.1
61d3a5
ln -s alembic-3.1 %{buildroot}%{_mandir}/man1/alembic-%{python3_version}.1
61d3a5
61d3a5
ln -s %{modname}-%{python3_version} %{buildroot}/%{_bindir}/%{modname}
61d3a5
ln -s alembic-%{python3_version}.1 %{buildroot}%{_mandir}/man1/alembic.1
61d3a5
61d3a5
61d3a5
%check
61d3a5
py.test-3
61d3a5
61d3a5
61d3a5
%files -n python3-%{modname}
61d3a5
%doc LICENSE README.rst CHANGES docs
61d3a5
%{python3_sitelib}/%{modname}/
61d3a5
%{python3_sitelib}/%{modname}-%{version}-*
61d3a5
%{_bindir}/%{modname}
61d3a5
%{_mandir}/man1/alembic.1*
61d3a5
%{_bindir}/%{modname}-3
61d3a5
%{_bindir}/%{modname}-%{python3_version}
61d3a5
%{_mandir}/man1/alembic-3.1*
61d3a5
%{_mandir}/man1/alembic-%{python3_version}.1*
61d3a5
61d3a5
61d3a5
%changelog
617132
* Fri Sep 17 2021 Neal Gompa <ngompa@fedoraproject.org> - 1.7.1-3
617132
- Drop redundant manually specified dependencies
617132
617132
* Thu Sep 16 2021 Joel Capitao <jcapitao@redhat.com> - 1.7.1-2
617132
- Add the dist tag again
617132
617132
* Mon Sep 13 2021 Joel Capitao <jcapitao@redhat.com> - 1.7.1-1
617132
- Update to 1.7.1. Fixes rhbz#1999176
617132
617132
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.5-2
617132
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
617132
617132
* Sat Jun 12 2021 Kevin Fenzi <kevin@scrye.com> - 1.6.5-1
617132
- Update to 1.6.5. Fixes rhbz#1964163
617132
617132
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.6.3-2
617132
- Rebuilt for Python 3.10
617132
617132
* Sat May 22 2021 Kevin Fenzi <kevin@scrye.com> - 1.6.3-1
617132
- Update to 1.6.3. Fixes rhbz#1957878
617132
61d3a5
* Tue May 04 2021 Kevin Fenzi <kevin@scrye.com> - 1.6.0-1
61d3a5
- Update to 1.6.0. Fixes rhbz#1956482
61d3a5
61d3a5
* Sat Mar 27 2021 Kevin Fenzi <kevin@scrye.com> - 1.5.8-1
61d3a5
- Update to 1.5.8. Fixes rhbz#1935790
61d3a5
61d3a5
* Mon Feb 22 2021 Kevin Fenzi <kevin@scrye.com> - 1.5.5-1
61d3a5
- Update to 1.5.5. Fixes rhbz#1931142
61d3a5
61d3a5
* Fri Feb 12 2021 Kevin Fenzi <kevin@scrye.com> - 1.5.3-1
61d3a5
- Update to 1.5.3. Fixes rhbz#1922496
61d3a5
61d3a5
* Thu Jan 28 2021 Kevin Fenzi <kevin@scrye.com> - 1.5.0-1
61d3a5
- Update to 1.5.0. Fixes rhbz#1917596
61d3a5
61d3a5
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.3-2
61d3a5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
61d3a5
61d3a5
* Thu Nov 19 2020 Joel Capitao <jcapitao@redhat.com> - 1.4.3-1
61d3a5
- Update to 1.4.3 (rhbz#1878203)
61d3a5
61d3a5
* Thu Aug 20 2020 Merlin Mathesius <mmathesi@redhat.com> - 1.4.2-5
61d3a5
- Correct macro usage to fix Rawhide and ELN FTBFS errors
61d3a5
61d3a5
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.2-4
61d3a5
- Second attempt - Rebuilt for
61d3a5
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
61d3a5
61d3a5
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.2-3
61d3a5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
61d3a5
61d3a5
* Sun May 24 2020 Miro Hron훾ok <mhroncok@redhat.com> - 1.4.2-2
61d3a5
- Rebuilt for Python 3.9
61d3a5
61d3a5
* Sun Mar 22 2020 Carl George <carl@george.computer> - 1.4.2-1
61d3a5
- Latest upstream rhbz#1808866
61d3a5
61d3a5
* Wed Feb 19 2020 Randy Barlow <bowlofeggs@fedoraproject.org> - 1.4.0-1
61d3a5
- Update to 1.4.0 (#1784129).
61d3a5
- https://alembic.sqlalchemy.org/en/latest/changelog.html#change-1.4.0
61d3a5
61d3a5
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-2
61d3a5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
61d3a5
61d3a5
* Mon Nov 18 2019 Randy Barlow <bowlofeggs@fedoraproject.org> - 1.3.1-1
61d3a5
- Update to 1.3.1 (#1767518).
61d3a5
- https://alembic.sqlalchemy.org/en/latest/changelog.html#change-1.3.1
61d3a5
61d3a5
* Fri Sep 27 2019 Randy Barlow <bowlofeggs@fedoraproject.org> - 1.2.1-1
61d3a5
- Update to 1.2.1 (#1754016).
61d3a5
- https://alembic.sqlalchemy.org/en/latest/changelog.html#change-1.2.1
61d3a5
61d3a5
* Tue Sep 17 2019 Randy Barlow <bowlofeggs@fedoraproject.org> - 1.1.0-2
61d3a5
- Drop python2-alembic (#1751088).
61d3a5
61d3a5
* Tue Sep 03 2019 Randy Barlow <bowlofeggs@fedoraproject.org> - 1.1.0-1
61d3a5
- Upgrade to 1.1.0 (#1747053).
61d3a5
- https://alembic.sqlalchemy.org/en/latest/changelog.html#change-1.1.0
61d3a5
61d3a5
* Sun Aug 18 2019 Miro Hron훾ok <mhroncok@redhat.com> - 1.0.11-3
61d3a5
- Rebuilt for Python 3.8
61d3a5
61d3a5
* Mon Jul 22 2019 Petr Viktorin <pviktori@redhat.com> - 1.0.11-2
61d3a5
- Make /usr/bin/alembic point to alembic-3 on Fedora 31+
61d3a5
  See https://fedoraproject.org/wiki/Changes/Python_means_Python3
61d3a5
- Avoid absolute symlinks
61d3a5
- Conditionalize the Python 2/Python 3 parts with bcond
61d3a5
61d3a5
* Sun Jun 30 2019 Kevin Fenzi <kevin@scrye.com> - 1.0.11-1
61d3a5
- Update to 1.0.11. Fixes bug #1723981
61d3a5
61d3a5
* Wed Jun 19 2019 Troy Dawson <tdawson@redhat.com> - 1.0.10-1.1
61d3a5
- Make python2 optional
61d3a5
- Do not build python2 on RHEL8
61d3a5
61d3a5
* Wed Jun 05 2019 Randy Barlow <bowlofeggs@fedoraproject.org> - 1.0.10-1
61d3a5
- Update to 1.0.10 (#1700050).
61d3a5
- https://alembic.sqlalchemy.org/en/latest/changelog.html#change-1.0.10
61d3a5
61d3a5
* Thu Mar 28 2019 Randy Barlow <bowlofeggs@fedoraproject.org> - 1.0.8-1
61d3a5
- Update to 1.0.8 (#1685262).
61d3a5
- https://alembic.sqlalchemy.org/en/latest/changelog.html#change-1.0.8
61d3a5
61d3a5
* Tue Feb 05 2019 Alfredo Moralejo <amoralej@redhat.com> - 1.0.7-1
61d3a5
- Update to 1.0.7
61d3a5
61d3a5
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-2
61d3a5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
61d3a5
61d3a5
* Wed Jul 25 2018 Pierre-Yves Chibon <pingou@pingoured.fr> - 1.0.0-1
61d3a5
- Update to 1.0.0
61d3a5
61d3a5
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.7-7
61d3a5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
61d3a5
61d3a5
* Tue Jun 19 2018 Miro Hron훾ok <mhroncok@redhat.com> - 0.9.7-6
61d3a5
- Rebuilt for Python 3.7
61d3a5
61d3a5
* Sun Jun 17 2018 Miro Hron훾ok <mhroncok@redhat.com> - 0.9.7-5
61d3a5
- Rebuilt for Python 3.7
61d3a5
61d3a5
* Wed Feb 21 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.9.7-4
61d3a5
- Update Python 2 dependency declarations to new packaging standards
61d3a5
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
61d3a5
61d3a5
* Thu Feb 08 2018 Randy Barlow <bowlofeggs@fedoraproject.org> - 0.9.7-3
61d3a5
- The python3-alembic package now provides only alembic-3 and alembic-3.y.
61d3a5
- The python2-alembic package now provides alembic, alembic-2, and alembic-2.y.
61d3a5
61d3a5
* Sat Jan 27 2018 Ralph Bean <rbean@redhat.com> - 0.9.7-2
61d3a5
- The python3-alembic package now provides the alembic executable.
61d3a5
61d3a5
* Thu Jan 18 2018 Ralph Bean <rbean@redhat.com> - 0.9.7-1
61d3a5
- new version
61d3a5
- New dependency on python-dateutil.