thegooglecodearchive / pymssql

Automatically exported from code.google.com/p/pymssql
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Pyrex required for install? #86

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
See last few comments here:

http://code.google.com/p/pymssql/issues/detail?id=3

Original issue reported on code.google.com by rsyr...@gmail.com on 9 Mar 2012 at 9:20

GoogleCodeExporter commented 9 years ago
I swear I had added a hack for this, adding a .pyrex folder in the root of the 
source tree with some dummy modules and then adding that to sys.path.

I believe an alternative is also to use a newer version of Cython.

Original comment by dam...@gmail.com on 3 May 2012 at 12:44

GoogleCodeExporter commented 9 years ago
The fake_pyrex in .pyrex (same hack used by lxml and other projects) seems to 
not work with a pip install when vanilla setuptools (not distribute) is 
present, because a pip install will result in pip executing something like this:

Command /private/tmp/pymssql_issue_14/bin/python2.6 -c "import setuptools;file='/var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/pip-nt9xkx -build/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/pip-6dSOcg-record/install-recor d.txt --single-version-externally-managed --install-headers /private/tmp/pymssql_issue_14/include/site/python2.6 failed with error code 1 in /var/folders/nk/8f8f6wjn7v3b9cb2gjqf6vph0000gp/T/pip-nt9xkx-build


The key here is that pip imports setuptools BEFORE executing the setup.py. This 
causes the monkey patching in  setuptools/extension.py to kick in because at 
this point the setup.py wasn't executed yet so the fake pyrex hasn't been added 
to sys.path yet so it detects no pyrex and therefore 
setuptools.extension.Extension.__init__ is monkeypatched.

Going to mark this as a duplicate of issue #14 - I have more info there and I 
think a possible fix soon...

Original comment by msabr...@gmail.com on 8 Jan 2013 at 12:07

GoogleCodeExporter commented 9 years ago
Just mentioned this at issue #14 - I hope that this change fixes the issue; it 
did for me at least:

http://code.google.com/p/pymssql/source/detail?r=86a73a19d5bd627e72dbc8b0a924d29
7b10682c0

Original comment by msabr...@gmail.com on 8 Jan 2013 at 12:27