%global modname sqlacodegen Name: python-%{modname} Version: 1.1.6 Release: 1%{?dist} Summary: Automatic model code generator for SQLAlchemy # License is not included in PyPi # https://bitbucket.org/agronholm/sqlacodegen/pull-requests/3 License: MIT URL: https://bitbucket.org/agronholm/sqlacodegen Source0: https://pypi.python.org/packages/source/s/%{modname}/%{modname}-%{version}.tar.gz BuildArch: noarch %description This is a tool that reads the structure of an existing database and generates the appropriate SQLAlchemy model code, using the declarative style if possible. This tool was written as a replacement for sqlautocode, which was suffering from several issues (including, but not limited to, incompatibility with Python 3 and the latest SQLAlchemy version). Features * Supports SQLAlchemy 0.6.x - 1.0.x * Produces declarative code that almost looks like it was hand written * Produces PEP 8 compliant code * Accurately determines relationships, including many-to-many, one-to-one * Automatically detects joined table inheritance * Excellent test coverage %package -n python2-%{modname} Summary: Automatic model code generator for SQLAlchemy %{?python_provide:%python_provide python2-%{modname}} BuildRequires: python2-devel BuildRequires: python2-setuptools # Test BuildRequires: python2-pytest BuildRequires: python-pytest-pep8 BuildRequires: python-sqlalchemy BuildRequires: python-inflect Requires: python-sqlalchemy Requires: python-inflect %description -n python2-%{modname} This is a tool that reads the structure of an existing database and generates the appropriate SQLAlchemy model code, using the declarative style if possible. This tool was written as a replacement for sqlautocode, which was suffering from several issues (including, but not limited to, incompatibility with Python 3 and the latest SQLAlchemy version). Features * Supports SQLAlchemy 0.6.x - 1.0.x * Produces declarative code that almost looks like it was hand written * Produces PEP 8 compliant code * Accurately determines relationships, including many-to-many, one-to-one * Automatically detects joined table inheritance * Excellent test coverage Python 2 version. %package -n python3-%{modname} Summary: Automatic model code generator for SQLAlchemy %{?python_provide:%python_provide python3-%{modname}} BuildRequires: python3-devel BuildRequires: python3-setuptools # Test BuildRequires: python3-pytest BuildRequires: python3-pytest-pep8 BuildRequires: python3-sqlalchemy BuildRequires: python3-inflect Requires: python3-sqlalchemy Requires: python3-inflect %description -n python3-%{modname} This is a tool that reads the structure of an existing database and generates the appropriate SQLAlchemy model code, using the declarative style if possible. This tool was written as a replacement for sqlautocode, which was suffering from several issues (including, but not limited to, incompatibility with Python 3 and the latest SQLAlchemy version). Features * Supports SQLAlchemy 0.6.x - 1.0.x * Produces declarative code that almost looks like it was hand written * Produces PEP 8 compliant code * Accurately determines relationships, including many-to-many, one-to-one * Automatically detects joined table inheritance * Excellent test coverage Python 3 version. %prep %autosetup -n %{modname}-%{version} rm -rf %{modname}.egg-info %build %py2_build %py3_build %install %py2_install %py3_install %check %{__python2} setup.py test %{__python3} setup.py test %files -n python2-%{modname} %doc README.rst %{python2_sitelib}/%{modname}* %files -n python3-%{modname} %doc README.rst %{_bindir}/%{modname} %{python3_sitelib}/%{modname}* %changelog * Thu Jan 28 2016 Igor Gnatenko - 1.1.6-1 - Initial package