Accepting request 782219 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/782219 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-mysqlclient?expand=0&rev=9
This commit is contained in:
commit
d96f5c7980
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>test</package>
|
||||
</multibuild>
|
@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 5 13:33:30 UTC 2020 - Kristyna Streitova <kstreitova@suse.com>
|
||||
|
||||
- fix test package by adding BuildRequires: %{python_module mysqlclient
|
||||
>= %{version}}
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 21 10:04:38 UTC 2020 - Kristyna Streitova <kstreitova@suse.com>
|
||||
|
||||
- switch to multibuild to run tests and avoid a buildcycle with
|
||||
mariadb
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 11 16:02:55 UTC 2020 - pgajdos@suse.com
|
||||
|
||||
|
@ -18,21 +18,25 @@
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define oldpython python
|
||||
Name: python-mysqlclient
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%define psuffix -test
|
||||
%bcond_without test
|
||||
%else
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
Name: python-mysqlclient%{psuffix}
|
||||
Version: 1.4.6
|
||||
Release: 0
|
||||
Summary: Python interface to MySQL
|
||||
License: GPL-2.0-or-later
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/PyMySQL/mysqlclient-python
|
||||
Source: https://files.pythonhosted.org/packages/source/m/mysqlclient/mysqlclient-%{version}.tar.gz
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module mock}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libmysqlclient-devel
|
||||
BuildRequires: mariadb-rpm-macros
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python3-Sphinx
|
||||
BuildRequires: python3-attrs
|
||||
@ -42,6 +46,12 @@ Provides: python-mysql = %{version}
|
||||
Obsoletes: python-mysql < %{version}
|
||||
Provides: python-MySQL-python = %{version}
|
||||
Obsoletes: python-MySQL-python < %{version}
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module mock}
|
||||
BuildRequires: %{python_module mysqlclient >= %{version}}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: mariadb-rpm-macros
|
||||
%endif
|
||||
%ifpython2
|
||||
Provides: %{oldpython}-mysql = %{version}
|
||||
Obsoletes: %{oldpython}-mysql < %{version}
|
||||
@ -59,11 +69,14 @@ This package adds Python 3 support and bug fixes to MySQLdb1.
|
||||
%setup -q -n mysqlclient-%{version}
|
||||
|
||||
%build
|
||||
%if !%{with test}
|
||||
%python_build
|
||||
|
||||
python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
|
||||
%endif
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
exit_code=0
|
||||
cconf=abuild-myclient.cnf
|
||||
#
|
||||
@ -85,14 +98,19 @@ export TESTDB="$PWD/$cconf"
|
||||
#
|
||||
%mysql_testserver_stop
|
||||
exit $exit_code
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if !%{with test}
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
%endif
|
||||
|
||||
%if !%{with test}
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc HISTORY.rst MANIFEST.in README.md build/sphinx/html
|
||||
%{python_sitearch}/*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user