chtd / psycopg2cffi

Port to cffi with some speed improvements
Other
177 stars 43 forks source link

Not compiling on windows #76

Closed mentat51 closed 7 years ago

mentat51 commented 7 years ago

C:\usr\pypy2>bin\pip install psycopg2 Collecting psycopg2 Using cached psycopg2-2.6.2.tar.gz Installing collected packages: psycopg2 Running setup.py install for psycopg2 ... error Complete output from command c:\usr\pypy2\pypy.exe -u -c "import setuptools, tokenize;file='c:\users\kristof\appdata\local\temp\pip-build-mzotsr\ psycopg2\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().re place('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --r ecord c:\users\kristof\appdata\local\temp\pip-bbsyy0-record\install-record.txt - -single-version-externally-managed --compile: running install running build running build_py creating build creating build\lib.win32-2.7 creating build\lib.win32-2.7\psycopg2 copying lib\errorcodes.py -> build\lib.win32-2.7\psycopg2 copying lib\extensions.py -> build\lib.win32-2.7\psycopg2 copying lib\extras.py -> build\lib.win32-2.7\psycopg2 copying lib\pool.py -> build\lib.win32-2.7\psycopg2 copying lib\psycopg1.py -> build\lib.win32-2.7\psycopg2 copying lib\tz.py -> build\lib.win32-2.7\psycopg2 copying lib_json.py -> build\lib.win32-2.7\psycopg2 copying lib_range.py -> build\lib.win32-2.7\psycopg2 copying lib__init__.py -> build\lib.win32-2.7\psycopg2 creating build\lib.win32-2.7\psycopg2\tests copying tests\dbapi20.py -> build\lib.win32-2.7\psycopg2\tests copying tests\dbapi20_tpc.py -> build\lib.win32-2.7\psycopg2\tests copying tests\testconfig.py -> build\lib.win32-2.7\psycopg2\tests copying tests\testutils.py -> build\lib.win32-2.7\psycopg2\tests copying tests\test_async.py -> build\lib.win32-2.7\psycopg2\tests copying tests\test_bugX000.py -> build\lib.win32-2.7\psycopg2\tests copying tests\test_bug_gc.py -> build\lib.win32-2.7\psycopg2\tests copying tests\test_cancel.py -> build\lib.win32-2.7\psycopg2\tests copying tests\test_connection.py -> build\lib.win32-2.7\psycopg2\tests copying tests\test_copy.py -> build\lib.win32-2.7\psycopg2\tests copying tests\test_cursor.py -> build\lib.win32-2.7\psycopg2\tests copying tests\test_dates.py -> build\lib.win32-2.7\psycopg2\tests copying tests\test_errcodes.py -> build\lib.win32-2.7\psycopg2\tests copying tests\test_extras_dictcursor.py -> build\lib.win32-2.7\psycopg2\test s copying tests\test_green.py -> build\lib.win32-2.7\psycopg2\tests copying tests\test_lobject.py -> build\lib.win32-2.7\psycopg2\tests copying tests\test_module.py -> build\lib.win32-2.7\psycopg2\tests copying tests\test_notify.py -> build\lib.win32-2.7\psycopg2\tests copying tests\test_psycopg2_dbapi20.py -> build\lib.win32-2.7\psycopg2\tests

copying tests\test_quote.py -> build\lib.win32-2.7\psycopg2\tests
copying tests\test_transaction.py -> build\lib.win32-2.7\psycopg2\tests
copying tests\test_types_basic.py -> build\lib.win32-2.7\psycopg2\tests
copying tests\test_types_extras.py -> build\lib.win32-2.7\psycopg2\tests
copying tests\test_with.py -> build\lib.win32-2.7\psycopg2\tests
copying tests\__init__.py -> build\lib.win32-2.7\psycopg2\tests
running build_ext
building 'psycopg2._psycopg' extension
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\psycopg
C:\Users\kristof\AppData\Local\Programs\Common\Microsoft\Visual C++ for Pyth

on\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPSYCOPG_DEFAULT_PYDA TETIME=1 -DPSYCOPG_VERSION=\"2.6.2 (dt dec pq3 ext)\" -DPG_VERSION_HEX=0x090601 -Ic:\usr\pypy2\include -I. -IC:/PROGRA~2/POSTGR~1/9.6/include -IC:/PROGRA~2/POST GR~1/9.6/include/server /Tcpsycopg\psycopgmodule.c /Fobuild\temp.win32-2.7\Relea se\psycopg\psycopgmodule.obj psycopgmodule.c .\psycopg/error.h(32) : error C2016: C requires that a struct or union has a t least one member .\psycopg/error.h(32) : error C2061: syntax error : identifier 'PyBaseExcept ionObject' .\psycopg/error.h(39) : error C2059: syntax error : '}' .\psycopg/error.h(41) : error C2143: syntax error : missing ')' before '' .\psycopg/error.h(41) : error C2143: syntax error : missing '{' before '' .\psycopg/error.h(41) : error C2059: syntax error : 'type' .\psycopg/error.h(41) : error C2059: syntax error : ')' .\psycopg/diagnostics.h(36) : error C2061: syntax error : identifier 'errorO bject' .\psycopg/diagnostics.h(38) : error C2059: syntax error : '}' psycopg\psycopgmodule.c(555) : error C2065: 'errorObject' : undeclared ident ifier psycopg\psycopgmodule.c(555) : error C2065: 'perr' : undeclared identifier psycopg\psycopgmodule.c(555) : error C2065: 'errorObject' : undeclared ident ifier psycopg\psycopgmodule.c(555) : error C2059: syntax error : ')' psycopg\psycopgmodule.c(557) : error C2065: 'perr' : undeclared identifier psycopg\psycopgmodule.c(557) : error C2223: left of '->cursor' must point to struct/union psycopg\psycopgmodule.c(557) : error C2065: 'perr' : undeclared identifier psycopg\psycopgmodule.c(557) : error C2223: left of '->cursor' must point to struct/union psycopg\psycopgmodule.c(557) : error C2065: 'perr' : undeclared identifier psycopg\psycopgmodule.c(557) : error C2223: left of '->cursor' must point to struct/union psycopg\psycopgmodule.c(559) : error C2065: 'perr' : undeclared identifier psycopg\psycopgmodule.c(559) : error C2223: left of '->cursor' must point to struct/union psycopg\psycopgmodule.c(782) : error C2001: newline in constant psycopg\psycopgmodule.c(785) : error C2143: syntax error : missing ')' befor e ';' psycopg\psycopgmodule.c(903) : error C2001: newline in constant psycopg\psycopgmodule.c(904) : warning C4047: 'function' : 'const char *' di ffers in levels of indirection from 'int' psycopg\psycopgmodule.c(904) : warning C4024: 'PyPyModule_AddStringConstant' : different types for formal and actual parameter 3 psycopg\psycopgmodule.c(904) : error C2143: syntax error : missing ')' befor e ';' error: command 'C:\Users\kristof\AppData\Local\Programs\Common\Micros oft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2

----------------------------------------

Command "c:\usr\pypy2\pypy.exe -u -c "import setuptools, tokenize;file='c:\ users\kristof\appdata\local\temp\pip-build-mzotsr\psycopg2\setup.py';f=ge tattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.cl ose();exec(compile(code, file, 'exec'))" install --record c:\users\kristof\a ppdata\local\temp\pip-bbsyy0-record\install-record.txt --single-version-external ly-managed --compile" failed with error code 1 in c:\users\kristof\appdata\local \temp\pip-build-mzotsr\psycopg2\

C:\usr\pypy2>

lopuhin commented 7 years ago

Thanks for the report @mentat51! I don't have a working windows VM to test compilation at the moment, but just for completeness, could you tell the versions of Windows and PyPy that you are using? Thanks!

mentat51 commented 7 years ago

Tested on Window 7 Professionnal 64 bits pypy 5.6.0

I see someone can compile on september and you're on the way to add bdist in pypi. But apparently not available now. Have you some problem with this part ? Big thanks for your work !

mentat51 commented 7 years ago

AAAAARGH !

False positif, sorry ! I made some test, and this is the try to install psycopg, not psycopg2cffi. Big big sorry for the noise...

lopuhin commented 7 years ago

Glad to hear that! 👍