commit 6c4b12b7d4fcbf0c3d42a0cf605c252e8ac5f11c770e5083a2e5b2e0a9591f7e Author: Ondřej Súkup Date: Sat Jun 30 08:55:38 2018 +0000 Accepting request 619460 from home:awissu - Switch to fork of MySQLdb1 - Update a package description - Build with python3 and python2 (singlespec) - Mark obsolete packages: python-mysql, python-MySQL-python - Spec file cleanup - Fix build on non-SUSE distros by conditionalizing Recommends: tag - Update to version 1.2.4 + No changelog available - Set correct Group : Development/Languages/Python - Use download Url as source - Spec file general clean-up - Add MySQL-python-1.2.4-dont-use-python-distribute.patch; don't try to use unavailable python-distribute - Remove depreciate AutoReqProv, %{py_requires} and # norootforbuild tags - Add unzip requirement to support tarball format - Add python-Sphinx requirement and generate html documentation - Remove --record-rpm=INSTALLED_FILES option and add %{python_sitearch} in %files instead - Package GPL-2.0, HISTORY and Sphinx documentation - fix the previous fix, patch went upstream - update to 1.2.3 - no upstream changelog available - taking out the reconnect patch as the upstream sources contain a very specific comment that this means trouble - removed usage of deprecated sets module (bnc#462974) - update to 1.2.2 - various bugfixes - much better support for mysql5 - python2.5 support (crude, though, let's keep our patch for a while) - switch from distutils to setuptools - added patch supporting reconnect in mysql5 - update to 1.2.1_p2 - support for some new features of mysql 4.1 and 5.0 - fixes for 64bit bugs due to PEP353 - updated to reflect python changes due to #149809 - converted neededforbuild to BuildRequires - update to 1.2.0 - update to 1.1.9 (MySQL 4.1 support) - updated to 1.1.1 - fixed lib64 build - update to 1.1.0 - drop python 2.1 support - build as user - updated to 0.9.3a2: * Add some support for Python 2.3 datetime classes. * Removed some casts in _mysql_init() that caused problems with Python 2.3. The type for tp_free was changed from destructor to freefunc. Removing the casts make both 2.2 and 2.3 happy. * Fixed the bug that prevented member access. * Embedded server support. Can't get it use InnoDB tables yet. However, MyISAM (default) tables seem to work fine. - one source package for both python versions - added few more files to docs - builds on lib64 - updated to 0.9.2 - use record-rpm - use versioned dependency on python - using build root - file list is correct on lib64 arches - up to 0.9.1 to make it build on python-2.2 - Add mysql-shared to neededforbuild. - initial version 0.9.0 OBS-URL: https://build.opensuse.org/request/show/619460 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mysqlclient?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/MySQL-python-Py_ssize.patch b/MySQL-python-Py_ssize.patch new file mode 100644 index 0000000..017d633 --- /dev/null +++ b/MySQL-python-Py_ssize.patch @@ -0,0 +1,41 @@ +diff -ruN mysqlclient-1.3.13.orig/_mysql.c mysqlclient-1.3.13/_mysql.c +--- mysqlclient-1.3.13.orig/_mysql.c 2017-12-21 14:09:51.000000000 +0300 ++++ mysqlclient-1.3.13/_mysql.c 2018-06-28 01:04:11.433787292 +0300 +@@ -225,7 +225,7 @@ + PyObject *kwargs) { + static char *kwlist[] = {"args", "groups", NULL}; + char **cmd_args_c=NULL, **groups_c=NULL, *s; +- int cmd_argc=0, i, groupc; ++ Py_ssize_t cmd_argc=0, i, groupc; + PyObject *cmd_args=NULL, *groups=NULL, *ret=NULL, *item; + + if (_mysql_server_init_done) { +@@ -249,6 +249,10 @@ + PyErr_SetString(PyExc_TypeError, + "args could not be sized"); + goto finish; ++ } else if (cmd_argc > INT_MAX) { ++ PyErr_SetString(PyExc_ValueError, ++ "more than INT_MAX args, this is unsupported"); ++ goto finish; + } + cmd_args_c = (char **) PyMem_Malloc(cmd_argc*sizeof(char *)); + for (i=0; i< cmd_argc; i++) { +@@ -415,7 +419,7 @@ + else if (PySequence_Check(fun)) { + long flags = fields[i].flags; + PyObject *fun2=NULL; +- int j, n2=PySequence_Size(fun); ++ Py_ssize_t j, n2=PySequence_Size(fun); + if (fields[i].charsetnr != 63) { /* maaagic */ + flags &= ~BINARY_FLAG; + } +@@ -1181,7 +1185,7 @@ + PyObject *args) + { + PyObject *o=NULL, *d=NULL, *r=NULL, *item, *quoted; +- int i, n; ++ Py_ssize_t i, n; + if (!PyArg_ParseTuple(args, "OO:escape_sequence", &o, &d)) + goto error; + if (!PyMapping_Check(d)) { diff --git a/mysqlclient-1.3.13.tar.gz b/mysqlclient-1.3.13.tar.gz new file mode 100644 index 0000000..99f53bf --- /dev/null +++ b/mysqlclient-1.3.13.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff8ee1be84215e6c30a746b728c41eb0701a46ca76e343af445b35ce6250644f +size 90368 diff --git a/python-mysqlclient.changes b/python-mysqlclient.changes new file mode 100644 index 0000000..04c4178 --- /dev/null +++ b/python-mysqlclient.changes @@ -0,0 +1,167 @@ +------------------------------------------------------------------- +Wed Jun 27 22:44:56 UTC 2018 - avvissu@yandex.by + +- Switch to fork of MySQLdb1 +- Update a package description +- Build with python3 and python2 (singlespec) +- Mark obsolete packages: python-mysql, python-MySQL-python +- Spec file cleanup + +------------------------------------------------------------------- +Fri Jul 24 20:41:53 UTC 2015 - seife+obs@b1-systems.com + +- Fix build on non-SUSE distros by conditionalizing Recommends: tag + +------------------------------------------------------------------- +Sun Dec 8 15:23:42 UTC 2013 - p.drouand@gmail.com + +- Update to version 1.2.4 + + No changelog available +- Set correct Group : Development/Languages/Python +- Use download Url as source +- Spec file general clean-up +- Add MySQL-python-1.2.4-dont-use-python-distribute.patch; don't try + to use unavailable python-distribute +- Remove depreciate AutoReqProv, %{py_requires} and # norootforbuild tags +- Add unzip requirement to support tarball format +- Add python-Sphinx requirement and generate html documentation +- Remove --record-rpm=INSTALLED_FILES option and add %{python_sitearch} + in %files instead +- Package GPL-2.0, HISTORY and Sphinx documentation + +------------------------------------------------------------------- +Mon Sep 20 11:51:54 UTC 2010 - coolo@novell.com + +- fix the previous fix, patch went upstream + +------------------------------------------------------------------- +Thu Sep 16 08:11:10 UTC 2010 - coolo@novell.com + +- update to 1.2.3 + - no upstream changelog available +- taking out the reconnect patch as the upstream sources contain + a very specific comment that this means trouble + +------------------------------------------------------------------- +Fri Jan 16 14:57:21 CET 2009 - matejcik@suse.cz + +- removed usage of deprecated sets module (bnc#462974) + +------------------------------------------------------------------- +Thu Dec 13 17:30:49 CET 2007 - matejcik@suse.cz + +- update to 1.2.2 + - various bugfixes + - much better support for mysql5 + - python2.5 support (crude, though, let's keep our patch for a while) + - switch from distutils to setuptools +- added patch supporting reconnect in mysql5 + +------------------------------------------------------------------- +Fri Oct 20 15:57:22 CEST 2006 - jmatejek@suse.cz + +- update to 1.2.1_p2 + - support for some new features of mysql 4.1 and 5.0 +- fixes for 64bit bugs due to PEP353 + +------------------------------------------------------------------- +Tue Feb 28 16:46:03 CET 2006 - jmatejek@suse.cz + +- updated to reflect python changes due to #149809 + +------------------------------------------------------------------- +Wed Jan 25 21:40:49 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Wed Feb 9 17:55:05 CET 2005 - mcihar@suse.cz + +- update to 1.2.0 + +------------------------------------------------------------------- +Fri Jan 28 18:08:31 CET 2005 - mcihar@suse.cz + +- update to 1.1.9 (MySQL 4.1 support) + +------------------------------------------------------------------- +Wed Aug 04 15:26:35 CEST 2004 - mcihar@suse.cz + +- updated to 1.1.1 + +------------------------------------------------------------------- +Wed May 19 17:46:23 CEST 2004 - mcihar@suse.cz + +- fixed lib64 build + +------------------------------------------------------------------- +Wed May 19 15:28:22 CEST 2004 - mcihar@suse.cz + +- update to 1.1.0 + +------------------------------------------------------------------- +Tue Mar 02 18:33:06 CET 2004 - mcihar@suse.cz + +- drop python 2.1 support + +------------------------------------------------------------------- +Sun Jan 11 10:28:35 CET 2004 - adrian@suse.de + +- build as user + +------------------------------------------------------------------- +Tue Dec 16 15:23:22 CET 2003 - mcihar@suse.cz + +- updated to 0.9.3a2: + * Add some support for Python 2.3 datetime classes. + * Removed some casts in _mysql_init() that caused problems with + Python 2.3. The type for tp_free was changed from destructor + to freefunc. Removing the casts make both 2.2 and 2.3 happy. + * Fixed the bug that prevented member access. + * Embedded server support. Can't get it use InnoDB tables yet. + However, MyISAM (default) tables seem to work fine. +- one source package for both python versions +- added few more files to docs + +------------------------------------------------------------------- +Mon Aug 11 11:52:57 CEST 2003 - mcihar@suse.cz + +- builds on lib64 + +------------------------------------------------------------------- +Thu Aug 07 17:01:20 CEST 2003 - mcihar@suse.cz + +- updated to 0.9.2 + +------------------------------------------------------------------- +Mon Jun 16 15:02:16 CEST 2003 - mcihar@suse.cz + +- use record-rpm + +------------------------------------------------------------------- +Mon May 12 14:18:18 CEST 2003 - mcihar@suse.cz + +- use versioned dependency on python + +------------------------------------------------------------------- +Wed Jan 22 14:36:52 CET 2003 - mcihar@suse.cz + +- using build root +- file list is correct on lib64 arches + +------------------------------------------------------------------- +Tue Jan 15 18:06:17 CET 2002 - ro@suse.de + +- up to 0.9.1 to make it build on python-2.2 + +------------------------------------------------------------------- +Sat Dec 29 22:07:39 CET 2001 - schwab@suse.de + +- Add mysql-shared to neededforbuild. + +------------------------------------------------------------------- +Thu Nov 1 16:02:14 CET 2001 - vinil@suse.cz + +- initial version 0.9.0 + + diff --git a/python-mysqlclient.spec b/python-mysqlclient.spec new file mode 100644 index 0000000..f41585c --- /dev/null +++ b/python-mysqlclient.spec @@ -0,0 +1,67 @@ +# +# spec file for package python-mysqlclient +# +# Copyright (c) 2018 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 +# 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. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-mysqlclient +Version: 1.3.13 +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 +Patch0: MySQL-python-Py_ssize.patch +BuildRequires: %{python_module Sphinx} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: libmariadb-devel +BuildRequires: python-rpm-macros +BuildRequires: unzip +Recommends: mariadb +Provides: python-mysql = %{version} +Obsoletes: python-mysql < %{version} +Provides: python-MySQL-python = %{version} +Obsoletes: python-MySQL-python < %{version} +%python_subpackages + +%description +MySQLdb is an interface to the popular MySQL database server for Python. + +This package adds Python 3 support and bug fixes to MySQLdb1. + +%prep +%setup -q -n mysqlclient-%{version} +%patch0 -p1 + +%build +%python_build + +%{python_expand $python setup.py build +$python setup.py build_sphinx && rm build/sphinx/html/.buildinfo} + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitearch} + +%files %{python_files} +%license LICENSE +%doc HISTORY.rst MANIFEST.in README.md +%{python_sitearch}/* + +%changelog