Date: Wed, 15 Apr 2009 17:20:03 GMT From: Robet Kruus <rob.kruus@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/133757: New port of pyodbc Message-ID: <200904151720.n3FHK3W6031746@www.freebsd.org> Resent-Message-ID: <200904151730.n3FHU1iw062436@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 133757 >Category: ports >Synopsis: New port of pyodbc >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Apr 15 17:30:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Robet Kruus >Release: FreeBSD 7.1-RELEASE amd64 >Organization: >Environment: FreeBSD 412039H.gos.ca 7.1-RELEASE FreeBSD 7.1-RELEASE #4 >Description: Tested mainly with unixODBC, but should work with libiodbc. No 32 bit systems available for testing. >How-To-Repeat: >Fix: Patch attached with submission follows: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # /usr/ports/databases/py-odbc/ # /usr/ports/databases/py-odbc/files # /usr/ports/databases/py-odbc/files/patch-setup-libs # /usr/ports/databases/py-odbc/Makefile # /usr/ports/databases/py-odbc/distinfo # /usr/ports/databases/py-odbc/pkg-plist # /usr/ports/databases/py-odbc/pkg-descr # echo c - /usr/ports/databases/py-odbc/ mkdir -p /usr/ports/databases/py-odbc/ > /dev/null 2>&1 echo c - /usr/ports/databases/py-odbc/files mkdir -p /usr/ports/databases/py-odbc/files > /dev/null 2>&1 echo x - /usr/ports/databases/py-odbc/files/patch-setup-libs sed 's/^X//' >/usr/ports/databases/py-odbc/files/patch-setup-libs << 'f505b8cdf1383d4fe8cb76209a036974' X--- setup.py.orig 2008-12-06 10:34:24.000000000 -0600 X+++ setup.py 2009-01-15 14:56:00.648997526 -0600 X@@ -40,7 +40,8 @@ X # Other posix-like: Linux, Solaris, etc. X X # Python functions take a lot of 'char *' that really should be const. gcc complains about this *a lot* X- extra_compile_args = ['-Wno-write-strings'] X+ extra_compile_args = ['-Wno-write-strings', '-I/usr/local/include', '-L/usr/local/lib'] X+ extra_link_args = ['-L/usr/local/lib'] X X # What is the proper way to detect iODBC, MyODBC, unixODBC, etc.? X libraries.append('odbc') f505b8cdf1383d4fe8cb76209a036974 echo x - /usr/ports/databases/py-odbc/Makefile sed 's/^X//' >/usr/ports/databases/py-odbc/Makefile << 'f9c198249a7a887bce9d930867410744' X# New ports collection makefile for: pyodbc X# Date created: April 15 2009 X# Whom: rkruus X# X# $FreeBSD$ X# X X# Like they say in the postgres-odbc Makefile (and I quote): X# X# This ODBC driver should work under either unixODBC or iODBC X# driver manager, when compliled against one. (Important: Do not try X# to have both installed -- they have overlapping files). X X# It looks like most people are using unixODBC these days, rather than X# iODBC, so let's make unixODBC the default choice: to select iODBC, X# set WITH_IODBC, without setting WITH_UNIXODBC. When the latter is X# set or when neither is set, we go with WITH_UNIXODBC. X# X XPORTNAME= pyodbc XPORTVERSION= 2.1.4 XCATEGORIES= databases python XMASTER_SITES= http://code.google.com/p/pyodbc/ \ X ${MASTER_SITE_LOCAL} XMASTER_SITE_SUBDIR= files XPKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} XDISTNAME= pyodbc-${PORTVERSION} X XMAINTAINER= rob.kruus@gmail.com XCOMMENT= ODBC connections for python X XUSE_GMAKE= yes XUSE_PYTHON= 2.4+ XUSE_PYDISTUTILS= yes X X# again, shamelessly copied from datebase/postgres-odbc X.if !defined(WITH_IODBC) XWITH_UNIXODBC= yes X.endif X X.if defined(WITH_UNIXODBC) X# I.e. even if WITH_IODBC is defined XLIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC XBUILD_DEPENDS+= unixODBC>=2.2.14_1:${PORTSDIR}/databases/unixODBC X.else XLIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc X.endif X Xdo-build: X @(cd ${WRKSRC}; ${PYTHON_CMD} setup.py build) X Xdo-install: X @(cd ${WRKSRC}; ${PYTHON_CMD} setup.py install) X XDOCSDIR= ${PREFIX}/share/doc/py-odbc X XDOCS= docs.html index.html license.html styles.css tutorial.html X Xpost-install: X.if !defined(NOPORTDOCS) X @${MKDIR} ${DOCSDIR} X.for f in ${DOCS} X @${INSTALL_DATA} ${WRKSRC}/web/${f} ${DOCSDIR} X.endfor X.endif X X.include <bsd.port.mk> f9c198249a7a887bce9d930867410744 echo x - /usr/ports/databases/py-odbc/distinfo sed 's/^X//' >/usr/ports/databases/py-odbc/distinfo << 'da3d1ffb55c5821876cff2fd1bd31344' XMD5 (pyodbc-2.1.4.tar.gz) = d8cbdfae251152e0f34668103ee5d094 XSHA256 (pyodbc-2.1.4.tar.gz) = 59b05a88f48230997b763189d25e7f909883c6628022b0f42f8a60f1bf108f03 XSIZE (pyodbc-2.1.4.tar.gz) = 119691 da3d1ffb55c5821876cff2fd1bd31344 echo x - /usr/ports/databases/py-odbc/pkg-plist sed 's/^X//' >/usr/ports/databases/py-odbc/pkg-plist << '71de8cbc5af9420bf5bd01be71fd9858' X%%PYTHON_SITELIBDIR%%/pyodbc.so X%%PORTDOCS%%%%DOCSDIR%%/docs.html X%%PORTDOCS%%%%DOCSDIR%%/index.html X%%PORTDOCS%%%%DOCSDIR%%/license.html X%%PORTDOCS%%%%DOCSDIR%%/styles.css X%%PORTDOCS%%%%DOCSDIR%%/tutorial.html X%%PORTDOCS%%@dirrm %%DOCSDIR%% 71de8cbc5af9420bf5bd01be71fd9858 echo x - /usr/ports/databases/py-odbc/pkg-descr sed 's/^X//' >/usr/ports/databases/py-odbc/pkg-descr << '883921557bcdb7c4176576154ebac995' Xpyodbc is a Python module that allows you to use ODBC to connect to Xalmost any database from Windows, Linux, OS/X, and more. X XIt implements the Python Database API Specification v2.0, but Xadditional features have been added to simplify database Xprogramming even more. X XWWW: http://code.google.com/p/pyodbc/ 883921557bcdb7c4176576154ebac995 exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904151720.n3FHK3W6031746>