2015-03-30 09:01:54 +00:00
#
# spec file for package python-SQLAlchemy-Utils
#
2022-01-03 11:36:18 +00:00
# Copyright (c) 2022 SUSE LLC
2015-03-30 09:01:54 +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.
2018-09-17 09:21:41 +00:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2016-02-11 10:13:47 +00:00
#
2015-03-30 09:01:54 +00:00
2017-08-23 05:06:33 +00:00
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
2020-05-11 05:51:25 +00:00
%define skip_python2 1
2015-03-30 09:01:54 +00:00
Name : python-SQLAlchemy-Utils
2022-01-03 11:36:18 +00:00
Version : 0.38.2
2015-03-30 09:01:54 +00:00
Release : 0
Summary : Various utility functions for SQLAlchemy
2016-02-11 10:13:47 +00:00
License : BSD-3-Clause
2018-05-07 13:46:38 +00:00
URL : https://github.com/kvesteri/sqlalchemy-utils
2017-08-23 05:06:33 +00:00
Source : https://files.pythonhosted.org/packages/source/S/SQLAlchemy-Utils/SQLAlchemy-Utils-%{version} .tar.gz
2019-07-24 10:05:49 +00:00
BuildRequires : %{python_module Babel >= 1.3}
2020-06-09 12:15:18 +00:00
BuildRequires : %{python_module Jinja2 >= 2.3}
BuildRequires : %{python_module Pygments >= 1.2}
2019-07-24 10:05:49 +00:00
BuildRequires : %{python_module SQLAlchemy >= 1.0}
BuildRequires : %{python_module arrow >= 0.3.4}
2021-10-17 00:11:40 +00:00
BuildRequires : %{python_module backports.zoneinfo if %python-base < 3.9}
2019-07-24 10:05:49 +00:00
BuildRequires : %{python_module colour >= 0.0.4}
BuildRequires : %{python_module cryptography >= 0.6}
2020-06-09 12:15:18 +00:00
BuildRequires : %{python_module docutils >= 0.10}
2019-07-24 10:05:49 +00:00
BuildRequires : %{python_module flexmock >= 0.9.7}
BuildRequires : %{python_module furl >= 0.4.1}
BuildRequires : %{python_module intervals >= 0.7.1}
BuildRequires : %{python_module passlib >= 1.6}
2020-06-09 12:15:18 +00:00
BuildRequires : %{python_module pendulum >= 2.0.5}
2019-07-24 10:05:49 +00:00
BuildRequires : %{python_module phonenumbers >= 5.9.2}
2020-06-09 12:15:18 +00:00
BuildRequires : %{python_module psycopg2 >= 2.5.1}
BuildRequires : %{python_module psycopg2cffi >= 2.8.1}
BuildRequires : %{python_module pyodbc}
2019-07-24 10:05:49 +00:00
BuildRequires : %{python_module pytest >= 2.7.1}
2020-06-09 12:15:18 +00:00
BuildRequires : %{python_module python-dateutil >= 2.6}
2019-07-24 10:05:49 +00:00
BuildRequires : %{python_module pytz >= 2014.2}
2017-08-23 05:06:33 +00:00
BuildRequires : %{python_module setuptools}
2019-07-24 10:05:49 +00:00
BuildRequires : %{python_module six}
BuildRequires : fdupes
2017-08-23 05:06:33 +00:00
BuildRequires : python-rpm-macros
2019-07-24 10:05:49 +00:00
Requires : python-SQLAlchemy >= 1.0
2021-10-17 00:11:40 +00:00
%if 0%{?python_version_nodots} < 39
Requires : python-backports.zoneinfo
%endif
2019-07-24 10:05:49 +00:00
Requires : python-six
Recommends: python-Babel >= 1.3
Recommends: python-arrow >= 0.3.4
Recommends: python-colour >= 0.0.4
Recommends: python-cryptography >= 0.6
Recommends: python-dateutil
Recommends: python-furl >= 0.4.1
Recommends: python-intervals >= 0.7.1
Recommends: python-passlib >= 1.6
2020-06-09 12:15:18 +00:00
Recommends: python-pendulum >= 2.0.5
2019-07-24 10:05:49 +00:00
Recommends: python-phonenumbers >= 5.9.2
2015-03-30 09:01:54 +00:00
BuildArch : noarch
2017-08-23 05:06:33 +00:00
%python_subpackages
2015-03-30 09:01:54 +00:00
%description
Various utility functions and custom data types for SQLAlchemy.
%prep
%setup -q -n SQLAlchemy-Utils-%{version}
%build
2017-08-23 05:06:33 +00:00
%python_build
2015-03-30 09:01:54 +00:00
%install
2017-08-23 05:06:33 +00:00
%python_install
2019-07-24 10:05:49 +00:00
%python_expand %fdupes %{buildroot} %{$python_sitelib}
%check
2022-04-20 12:47:57 +00:00
# https://github.com/kvesteri/sqlalchemy-utils/issues/594
sed -i 's:import mock:from unittest import mock:' tests/types/test_password.py
2020-06-09 12:15:18 +00:00
# needs running pgsql / mssql / mysql
rm tests/test_asserts.py
rm tests/test_translation_hybrid.py
rm tests/aggregate/test_o2m_o2m_o2m.py
rm tests/aggregate/test_search_vectors.py
rm tests/aggregate/test_with_ondelete_cascade.py
rm tests/observes/test_column_property.py
rm tests/observes/test_m2m_m2m_m2m.py
rm tests/observes/test_o2m_o2o_o2m.py
rm tests/observes/test_o2m_o2m_o2m.py
rm tests/observes/test_o2o_o2o.py
rm tests/observes/test_o2o_o2o_o2o.py
rm tests/relationships/test_select_correlated_expression.py
rm tests/types/test_composite.py
rm tests/types/test_ltree.py
rm tests/types/test_tsvector.py
2022-03-01 08:30:29 +00:00
rm tests/types/test_uuid.py
2020-11-23 09:22:55 +00:00
%pytest -rs -k 'not (TestDatabasePostgres or TestDatabaseMssql or OnPostgres or OnMysql or TestPostgres or TestMysql or TestSortQueryRelationshipCounts or TestSortQueryWithPolymorphicInheritance or TestMaterializedViews or TestLazyEvaluatedSelectExpressionsForAggregates or TestAggregatesWithManyToManyRelationships or TestAggregateManyToManyAndManyToMany or TestAggregateOneToManyAndOneToMany or TestJSONSQL or TestJSONBSQL or TestSortQueryWithCustomPolymorphic or TestAggregateOneToManyAndManyToMany or test_timezone or test_add_observed_object)'
2015-03-30 09:01:54 +00:00
2017-08-23 05:06:33 +00:00
%files %{python_files}
2018-05-07 13:46:38 +00:00
%license LICENSE
%doc README.rst
2018-09-17 09:21:41 +00:00
%dir %{python_sitelib} /sqlalchemy_utils
%{python_sitelib} /sqlalchemy_utils/*
%{python_sitelib} /SQLAlchemy_Utils-%{version} -py*.egg-info
2015-03-30 09:01:54 +00:00
%changelog