17
0

Accepting request 489144 from home:TheBlackCat:branches:devel:languages:python

- Update to 1.1.9
- Implement single-spec version.

OBS-URL: https://build.opensuse.org/request/show/489144
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=84
This commit is contained in:
Todd R
2017-04-18 16:10:52 +00:00
committed by Git OBS Bridge
parent cc861aecd9
commit 4d59b93d9d
4 changed files with 62 additions and 23 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-SQLAlchemy
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# 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
@@ -16,8 +16,11 @@
#
%bcond_without tests
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-SQLAlchemy
Version: 1.0.15
Version: 1.1.9
Release: 0
Url: http://www.sqlalchemy.org
Summary: Database Abstraction Library
@@ -25,18 +28,18 @@ License: MIT
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/S/SQLAlchemy/SQLAlchemy-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
# Test requirements:
BuildRequires: %{python_module nose >= 0.11}
BuildRequires: %{python_module pytest}
BuildRequires: python-mock
BuildRequires: python-nose >= 0.11
BuildRequires: python-pytest
#BuildRequires: python-pysqlite
Provides: python-sqlalchemy = %{version}
Obsoletes: python-sqlalchemy < %{version}
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif
%python_subpackages
%description
SQLAlchemy is an Object Relational Mappper (ORM) that provides a flexible,
@@ -47,15 +50,15 @@ as you choose, determining relationships based on foreign keys or letting you
define the join conditions explicitly, to bridge the gap between database and
domain.
%package doc
%package -n %{name}-doc
Summary: Documentation for python-SQLAlchemy
Group: Documentation/Other
Requires: %{name} = %{version}
%if 0%{?suse_version} && 0%{?suse_version} > 1110
Provides: python-SQLAlchemy-doc = %{version}
Provides: python2-SQLAlchemy-doc = %{version}
Provides: python3-SQLAlchemy-doc = %{version}
BuildArch: noarch
%endif
%description doc
%description -n %{name}-doc
This package contains HTML documentation, including tutorials and API
reference for python-SQLAlchemy.
@@ -65,22 +68,27 @@ rm -rf doc/build # Remove unnecessary scripts for building documentation
sed -i 's/\r$//' examples/dynamic_dict/dynamic_dict.py
%build
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build
export CFLAGS="%{optflags} -fno-strict-aliasing"
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%if %{with tests}
%check
py.test
%python_expand py.test-%{$python_bin_suffix}
%endif
%files
%files %{python_files}
%defattr(-,root,root,-)
%doc CHANGES LICENSE README.rst README.dialects.rst README.unittests.rst
%{python_sitearch}/sqlalchemy/
%{python_sitearch}/SQLAlchemy-%{version}-py%{py_ver}.egg-info
%files doc
%files -n %{name}-doc
%defattr(-,root,root)
%doc doc examples
%doc doc/
%doc examples/
%changelog