[MacPorts] #32706: py27-odbc can't find MacPorts ODBC drivers on 10.7
#32706: py27-odbc can't find MacPorts ODBC drivers on 10.7 --------------------------------+------------------------------------------- Reporter: bpanulla@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: pyodbc | Port: py27-odbc --------------------------------+------------------------------------------- The current version of py27-odbc doesn't find ODBC drivers in /opt/local, failing with the classic and super-informative 'Data source name not found, and no default driver specified'. I've tried it with both the mysql-odbc-connector port and my psqlODBC port (still [https://trac.macports.org/ticket/31282 waiting to be approved]). I can connect to the data sources using the MacPorts unixODBC isql client without issue, so this is definitely a problem in pyodbc. I *think* this was previously working under Snow Leopard, but I can't be sure and I don't have a system running that anymore. I got a hint to the problem from a [http://stackoverflow.com/questions/7881985/using-alternate-unixodbc- installation Stack Overflow question/answer] that led me to a solution. Attached are an updated Portfile and a new setup.py.patch that adds MacPorts library and include paths to the build process. Alas, I've also included an upgrade to pyodbc 2.1.11. The current version (2.1.8) is quite old and I couldn't see how to accomplish what I needed to do against the old codebase. I f someone who knows more about the build process can tease these two patches apart into one, go for it. -- Ticket URL: <https://trac.macports.org/ticket/32706> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32706: py27-odbc can't find MacPorts ODBC drivers on 10.7 --------------------------------+------------------------------------------- Reporter: bpanulla@… | Owner: singingwolfboy@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: pyodbc | Port: py27-odbc --------------------------------+------------------------------------------- Changes (by macsforever2000@…): * owner: macports-tickets@… => singingwolfboy@… Comment: Please supply a unified diff of the portfile so we can easily see the changes you made. -- Ticket URL: <https://trac.macports.org/ticket/32706#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32706: py27-odbc can't find MacPorts ODBC drivers on 10.7 --------------------------------+------------------------------------------- Reporter: bpanulla@… | Owner: singingwolfboy@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: pyodbc | Port: py27-odbc --------------------------------+------------------------------------------- Old description:
The current version of py27-odbc doesn't find ODBC drivers in /opt/local, failing with the classic and super-informative 'Data source name not found, and no default driver specified'. I've tried it with both the mysql-odbc-connector port and my psqlODBC port (still [https://trac.macports.org/ticket/31282 waiting to be approved]).
I can connect to the data sources using the MacPorts unixODBC isql client without issue, so this is definitely a problem in pyodbc. I *think* this was previously working under Snow Leopard, but I can't be sure and I don't have a system running that anymore.
I got a hint to the problem from a [http://stackoverflow.com/questions/7881985/using-alternate-unixodbc- installation Stack Overflow question/answer] that led me to a solution.
Attached are an updated Portfile and a new setup.py.patch that adds MacPorts library and include paths to the build process.
Alas, I've also included an upgrade to pyodbc 2.1.11. The current version (2.1.8) is quite old and I couldn't see how to accomplish what I needed to do against the old codebase. I f someone who knows more about the build process can tease these two patches apart into one, go for it.
New description: The current version of py27-odbc doesn't find ODBC drivers in /opt/local, failing with the classic and super-informative 'Data source name not found, and no default driver specified'. I've tried it with both the mysql-odbc-connector port and my psqlODBC port (still [ticket:31282 waiting to be approved]). I can connect to the data sources using the MacPorts unixODBC isql client without issue, so this is definitely a problem in pyodbc. I *think* this was previously working under Snow Leopard, but I can't be sure and I don't have a system running that anymore. I got a hint to the problem from a [http://stackoverflow.com/questions/7881985/using-alternate-unixodbc- installation Stack Overflow question/answer] that led me to a solution. Attached are an updated Portfile and a new setup.py.patch that adds MacPorts library and include paths to the build process. Alas, I've also included an upgrade to pyodbc 2.1.11. The current version (2.1.8) is quite old and I couldn't see how to accomplish what I needed to do against the old codebase. I f someone who knows more about the build process can tease these two patches apart into one, go for it. -- Comment(by ryandesign@…): Your patch hardcodes /opt/local; you must instead arrange to use the current value of ${prefix}. -- Ticket URL: <https://trac.macports.org/ticket/32706#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32706: py27-odbc can't find MacPorts ODBC drivers on 10.7 --------------------------------+------------------------------------------- Reporter: bpanulla@… | Owner: singingwolfboy@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: pyodbc | Port: py27-odbc --------------------------------+------------------------------------------- Comment(by bpanulla@…): Not sure where to start with this. Do you know any ports off hand that have handled this before? It seems like I would need to dynamically create the patch somehow. -- Ticket URL: <https://trac.macports.org/ticket/32706#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32706: py27-odbc can't find MacPorts ODBC drivers on 10.7 --------------------------------+------------------------------------------- Reporter: bpanulla@… | Owner: singingwolfboy@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: pyodbc | Port: py27-odbc --------------------------------+------------------------------------------- Comment(by jmr@…): Replying to [comment:3 bpanulla@…]:
Not sure where to start with this. Do you know any ports off hand that have handled this before? It seems like I would need to dynamically create the patch somehow. wiki:PortfileRecipes#hardcode_opt_local
-- Ticket URL: <https://trac.macports.org/ticket/32706#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32706: py-pyodbc: can't find MacPorts ODBC drivers -------------------------+-------------------------------- Reporter: bpanulla@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: | Keywords: haspatch Port: py-pyodbc | -------------------------+-------------------------------- Changes (by ryandesign@…): * keywords: pyodbc => haspatch * owner: singingwolfboy@… => macports-tickets@… * port: py27-odbc => py-pyodbc Comment: Is this still a problem with py-pyodbc 3.0.6? -- Ticket URL: <https://trac.macports.org/ticket/32706#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts