summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesus Rivero <neurogeek@gentoo.org>2012-04-14 11:25:13 +0000
committerJesus Rivero <neurogeek@gentoo.org>2012-04-14 11:25:13 +0000
commit46154eb5942fe2afbc5f8d017a98181e23004fc5 (patch)
treee6c985d364e50558e384ebdf3362d46a2e3814ba
parenttypo (diff)
downloadgentoo-2-46154eb5942fe2afbc5f8d017a98181e23004fc5.tar.gz
gentoo-2-46154eb5942fe2afbc5f8d017a98181e23004fc5.tar.bz2
gentoo-2-46154eb5942fe2afbc5f8d017a98181e23004fc5.zip
Version bump
(Portage version: 2.2.0_alpha95/cvs/Linux i686)
-rw-r--r--dev-python/pyodbc/ChangeLog8
-rw-r--r--dev-python/pyodbc/files/pyodbc-3.0.3-py25-compat.patch114
-rw-r--r--dev-python/pyodbc/pyodbc-3.0.3.ebuild30
3 files changed, 151 insertions, 1 deletions
diff --git a/dev-python/pyodbc/ChangeLog b/dev-python/pyodbc/ChangeLog
index 04eb394a02d3..8174e57d7ba3 100644
--- a/dev-python/pyodbc/ChangeLog
+++ b/dev-python/pyodbc/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-python/pyodbc
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pyodbc/ChangeLog,v 1.3 2012/02/20 14:44:32 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pyodbc/ChangeLog,v 1.4 2012/04/14 11:25:13 neurogeek Exp $
+
+*pyodbc-3.0.3 (14 Apr 2012)
+
+ 14 Apr 2012; Jesus Rivero <neurogeek@gentoo.org> +pyodbc-3.0.3.ebuild,
+ +files/pyodbc-3.0.3-py25-compat.patch:
+ Version bump
20 Feb 2012; Patrick Lauer <patrick@gentoo.org> pyodbc-2.1.11.ebuild,
pyodbc-2.1.8.ebuild:
diff --git a/dev-python/pyodbc/files/pyodbc-3.0.3-py25-compat.patch b/dev-python/pyodbc/files/pyodbc-3.0.3-py25-compat.patch
new file mode 100644
index 000000000000..a023f8834c49
--- /dev/null
+++ b/dev-python/pyodbc/files/pyodbc-3.0.3-py25-compat.patch
@@ -0,0 +1,114 @@
+# Added by Jesus Rivero <neurogeek@gentoo.org>
+# We can get rid of this when bumping 3.0.5 (source not released yet)
+# 2012-04-14
+--- org/src/pyodbccompat.h 2011-12-23 15:44:54.000000000 -0500
++++ new/src/pyodbccompat.h 2012-04-14 02:37:29.000000000 -0400
+@@ -16,6 +16,19 @@
+ #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
+ #endif
+
++// Macros were introduced in 2.6 to map "bytes" to "str" in Python 2. Back port to 2.5.
++#if PY_VERSION_HEX >= 0x02060000
++ #include <bytesobject.h>
++#else
++ #define PyBytes_AS_STRING PyString_AS_STRING
++ #define PyBytes_Check PyString_Check
++ #define PyBytes_CheckExact PyString_CheckExact
++ #define PyBytes_FromStringAndSize PyString_FromStringAndSize
++ #define PyBytes_GET_SIZE PyString_GET_SIZE
++ #define PyBytes_Size PyString_Size
++ #define _PyBytes_Resize _PyString_Resize
++#endif
++
+ // Used for items that are ANSI in Python 2 and Unicode in Python 3 or in int 2 and long in 3.
+
+ #if PY_MAJOR_VERSION >= 3
+--- org/src/pyodbc.h 2012-01-03 18:04:08.000000000 -0500
++++ new/src/pyodbc.h 2012-04-14 02:37:29.000000000 -0400
+@@ -44,7 +44,6 @@
+ #include <boolobject.h>
+ #include <unicodeobject.h>
+ #include <structmember.h>
+-#include <bytesobject.h>
+
+ #include <sql.h>
+ #include <sqlext.h>
+--- org/setup.py 2012-01-03 18:04:24.000000000 -0500
++++ new/setup.py 2012-04-14 02:37:29.000000000 -0400
+@@ -67,39 +67,45 @@
+ if exists('MANIFEST'):
+ os.remove('MANIFEST')
+
+- options = {}
++ kwargs = {
++ 'name': "pyodbc",
++ 'version': version_str,
++ 'description': "DB API Module for ODBC",
++
++ 'long_description': ('A Python DB API 2 module for ODBC. This project provides an up-to-date, '
++ 'convenient interface to ODBC using native data types like datetime and decimal.'),
++
++ 'maintainer': "Michael Kleehammer",
++ 'maintainer_email': "michael@kleehammer.com",
++
++ 'ext_modules': [Extension('pyodbc', files, **settings)],
++
++ 'license': 'MIT',
++
++ 'classifiers': ['Development Status :: 5 - Production/Stable',
++ 'Intended Audience :: Developers',
++ 'Intended Audience :: System Administrators',
++ 'License :: OSI Approved :: MIT License',
++ 'Operating System :: Microsoft :: Windows',
++ 'Operating System :: POSIX',
++ 'Programming Language :: Python',
++ 'Programming Language :: Python :: 2',
++ 'Programming Language :: Python :: 3',
++ 'Topic :: Database',
++ ],
++
++ 'url': 'http://code.google.com/p/pyodbc',
++ 'download_url': 'http://code.google.com/p/pyodbc/downloads/list',
++ 'cmdclass': { 'version' : VersionCommand,
++ 'tags' : TagsCommand }
++ }
++
+ if sys.hexversion >= 0x02060000:
+- options['bdist_wininst'] = {'user_access_control' : 'auto'}
+-
+- setup (name = "pyodbc",
+- version = version_str,
+- description = "DB API Module for ODBC",
+-
+- long_description = ('A Python DB API 2 module for ODBC. This project provides an up-to-date, '
+- 'convenient interface to ODBC using native data types like datetime and decimal.'),
+-
+- maintainer = "Michael Kleehammer",
+- maintainer_email = "michael@kleehammer.com",
+-
+- ext_modules = [Extension('pyodbc', files, **settings)],
+-
+- options = options,
+-
+- classifiers = ['Development Status :: 5 - Production/Stable',
+- 'Intended Audience :: Developers',
+- 'Intended Audience :: System Administrators',
+- 'License :: OSI Approved :: MIT License',
+- 'Operating System :: Microsoft :: Windows',
+- 'Operating System :: POSIX',
+- 'Programming Language :: Python',
+- 'Topic :: Database',
+- ],
+-
+- url = 'http://code.google.com/p/pyodbc',
+- download_url = 'http://code.google.com/p/pyodbc/downloads/list',
+- cmdclass = { 'version' : VersionCommand,
+- 'tags' : TagsCommand })
++ kwargs['options'] = {
++ 'bdist_wininst': {'user_access_control' : 'auto'}
++ }
+
++ setup(**kwargs)
+
+
+ def get_compiler_settings(version_str):
diff --git a/dev-python/pyodbc/pyodbc-3.0.3.ebuild b/dev-python/pyodbc/pyodbc-3.0.3.ebuild
new file mode 100644
index 000000000000..c2c5063bb4ec
--- /dev/null
+++ b/dev-python/pyodbc/pyodbc-3.0.3.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pyodbc/pyodbc-3.0.3.ebuild,v 1.1 2012/04/14 11:25:13 neurogeek Exp $
+
+EAPI="3"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="*-jython 2.7-pypy-*"
+
+inherit distutils eutils
+
+DESCRIPTION="python ODBC module to connect to almost any database"
+HOMEPAGE="http://code.google.com/p/pyodbc"
+SRC_URI="http://pyodbc.googlecode.com/files/${P}.zip"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="mssql"
+
+RDEPEND=">=dev-db/unixODBC-2.3.0
+ mssql? ( >=dev-db/freetds-0.64[odbc] )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-python/setuptools"
+
+PYTHON_CXXFLAGS=("* + -fno-strict-aliasing")
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-py25-compat.patch
+}