Accepting request 782056 from home:kstreitova:branches:devel:languages:python
- fix test package by adding BuildRequires: %{python_module mysqlclient >= %{version}} - switch to multibuild to run tests and avoid a buildcycle with mariadb OBS-URL: https://build.opensuse.org/request/show/782056 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mysqlclient?expand=0&rev=20
This commit is contained in:
parent
b58bc27fbc
commit
300e4791a6
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
|
Tue Feb 11 16:02:55 UTC 2020 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@ -18,21 +18,25 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%define oldpython python
|
%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
|
Version: 1.4.6
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python interface to MySQL
|
Summary: Python interface to MySQL
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
Group: Development/Languages/Python
|
|
||||||
URL: https://github.com/PyMySQL/mysqlclient-python
|
URL: https://github.com/PyMySQL/mysqlclient-python
|
||||||
Source: https://files.pythonhosted.org/packages/source/m/mysqlclient/mysqlclient-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/m/mysqlclient/mysqlclient-%{version}.tar.gz
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module mock}
|
|
||||||
BuildRequires: %{python_module pytest}
|
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: libmysqlclient-devel
|
BuildRequires: libmysqlclient-devel
|
||||||
BuildRequires: mariadb-rpm-macros
|
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: python3-Sphinx
|
BuildRequires: python3-Sphinx
|
||||||
BuildRequires: python3-attrs
|
BuildRequires: python3-attrs
|
||||||
@ -42,6 +46,12 @@ Provides: python-mysql = %{version}
|
|||||||
Obsoletes: python-mysql < %{version}
|
Obsoletes: python-mysql < %{version}
|
||||||
Provides: python-MySQL-python = %{version}
|
Provides: python-MySQL-python = %{version}
|
||||||
Obsoletes: 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
|
%ifpython2
|
||||||
Provides: %{oldpython}-mysql = %{version}
|
Provides: %{oldpython}-mysql = %{version}
|
||||||
Obsoletes: %{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}
|
%setup -q -n mysqlclient-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if !%{with test}
|
||||||
%python_build
|
%python_build
|
||||||
|
|
||||||
python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
|
python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with test}
|
||||||
exit_code=0
|
exit_code=0
|
||||||
cconf=abuild-myclient.cnf
|
cconf=abuild-myclient.cnf
|
||||||
#
|
#
|
||||||
@ -85,14 +98,19 @@ export TESTDB="$PWD/$cconf"
|
|||||||
#
|
#
|
||||||
%mysql_testserver_stop
|
%mysql_testserver_stop
|
||||||
exit $exit_code
|
exit $exit_code
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if !%{with test}
|
||||||
%python_install
|
%python_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if !%{with test}
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc HISTORY.rst MANIFEST.in README.md build/sphinx/html
|
%doc HISTORY.rst MANIFEST.in README.md build/sphinx/html
|
||||||
%{python_sitearch}/*
|
%{python_sitearch}/*
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user