thegooglecodearchive / pymssql

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

Make Cython not necessary when pymssql.c and _mssql.c are already present #127

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently, the setup.py always forces Cython to be installed, which takes a 
while to download and compile.

But Cython is only needed to translate {pymssql,_mssql}.pyx to 
{pymssql,_mssql}.c

The .c files wouldn't be present when building from the source code repository, 
because we don't check them in. But the .c files WILL be present when a user is 
building from a source distribution (because we include the .c files in the 
source distribution). This will be the case when a user is installing a 
distribution using pip, easy_install, etc. It will be nice to not force these 
folks to download and build Cython.

Original issue reported on code.google.com by msabr...@gmail.com on 22 Sep 2013 at 6:09

GoogleCodeExporter commented 9 years ago
Fixed with:

https://github.com/pymssql/pymssql/commit/daace623450efefe6a587f8519e9d688d3f797
50

If there are no C files:

(py26.venv)marca@marca-mac:~/dev/git-repos/pymssql$ rm .so .c (py26.venv)marca@marca-mac:~/dev/git-repos/pymssql$ rm -rf Cython-0.19.1-py2.6-macosx-10.8-x86_64.egg/ (py26.venv)marca@marca-mac:~/dev/git-repos/pymssql$ python setup.py build_ext -i Compiling module Cython.Plex.Scanners ... Compiling module Cython.Plex.Actions ... Compiling module Cython.Compiler.Lexicon ... ... Installed /Users/marca/dev/git-repos/pymssql/Cython-0.19.1-py2.6-macosx-10.8-x86_64.egg ... cythoning _mssql.pyx to _mssql.c building '_mssql' extension .. cythoning pymssql.pyx to pymssql.c building 'pymssql' extension ...


With the C files already present:

(py26.venv)marca@marca-mac:~/dev/git-repos/pymssql$ rm .so (py26.venv)marca@marca-mac:~/dev/git-repos/pymssql$ rm -rf Cython-0.19.1-py2.6-macosx-10.8-x86_64.egg/ (py26.venv)marca@marca-mac:~/dev/git-repos/pymssql$ ls -l .c -rw-r--r-- 1 marca staff 984673 Sep 21 23:15 _mssql.c -rw-r--r-- 1 marca staff 603301 Sep 21 23:15 pymssql.c (py26.venv)marca@marca-mac:~/dev/git-repos/pymssql$ python setup.py build_ext -i ... building '_mssql' extension ... building 'pymssql' extension ...

Original comment by msabr...@gmail.com on 22 Sep 2013 at 6:20