djhenderson / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

setup.py sdist does not include source files in generated tarball #83

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The "sdist" target for distutils seems to be failing on Linux systems at least 
(not tested in Win32).  This prevents us from being able to upload to our 
private PyPI repository.

Using 
http://github.com/mkleehammer/pyodbc/commit/eb545758079a743b2e
809e2e219c8848bc6256b2

What steps will reproduce the problem?
1. python setup.py sdist
2. tar ztf dist/pyodbc*tar

What is the expected output? What do you see instead?

Should see the contents of the source directory.  Instead, the source 
distribution contains no "src" directory.

What version of the product are you using? On what operating system?

Linux x86_64, Python 2.4, 2.6

Please provide any additional information below.

I believe the problem occurs because the file list given to the Extension 
constructor contains a list of absolute paths.  In the Extension 
documentation [1], sources is specified to be "list of source filenames, 
relative to the distribution root (where the setup script lives)...".  If you 
remove the wrapper function abspath(), the source tarball is buildable.

[1] http://docs.python.org/distutils/apiref.html#distutils.core.Extension

Original issue reported on code.google.com by bs1...@gmail.com on 8 Jan 2010 at 11:28

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Proposed fix at:

github.com/bshi/pyodbc/commit/810d25d4c248f52c2797dce39e426badc0b90aff

Original comment by bs1...@gmail.com on 8 Jan 2010 at 11:42

GoogleCodeExporter commented 9 years ago
Hrm, above patch didn't quite do the trick.

The other issue looks like it's in the MANIFEST.in file.  Currently, this file 
uses "\" path 
separators which are windows only.  I think the solution is to change them to 
"/"... on 
win32 systems, I think the resulting MANIFEST file generated via parsing 
MANIFEST.in 
should correctly convert the slashes and, of course, the other setup commands 
will 
work on other systems (need to find myself a win32 system and verify).

Original comment by bs1...@gmail.com on 25 Jan 2010 at 4:20

GoogleCodeExporter commented 9 years ago
Fixed in 2.1.8

Original comment by mkleehammer on 6 Sep 2010 at 5:38

GoogleCodeExporter commented 9 years ago
Not sure if related but in Debian Lenny I get:

easy_install pyodbc
Searching for pyodbc
Reading http://pypi.python.org/simple/pyodbc/
Reading http://code.google.com/p/pyodbc
Reading http://code.google.com/p/pyodbc/downloads/list
Best match: pyodbc 2.1.8
Downloading http://pyodbc.googlecode.com/files/pyodbc-2.1.8.zip
Processing pyodbc-2.1.8.zip
Running pyodbc-2.1.8/setup.py -q bdist_egg --dist-dir 
/tmp/easy_install-WwrQ7E/pyodbc-2.1.8/egg-dist-tmp-LIPnCi
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for 
Ada/C/ObjC but not for C++
In file included from /tmp/easy_install-WwrQ7E/pyodbc-2.1.8/src/buffer.cpp:12:
/tmp/easy_install-WwrQ7E/pyodbc-2.1.8/src/pyodbc.h:76:17: error: sql.h: No such 
file or directory
/tmp/easy_install-WwrQ7E/pyodbc-2.1.8/src/pyodbc.h:77:20: error: sqlext.h: No 
such file or directory
In file included from /tmp/easy_install-WwrQ7E/pyodbc-2.1.8/src/buffer.cpp:12:
/tmp/easy_install-WwrQ7E/pyodbc-2.1.8/src/pyodbc.h:93: error: ‘IsSet’ 
declared as an ‘inline’ variable
/tmp/easy_install-WwrQ7E/pyodbc-2.1.8/src/pyodbc.h:93: error: ‘DWORD’ was 
not declared in this scope
/tmp/easy_install-WwrQ7E/pyodbc-2.1.8/src/pyodbc.h:93: error: ‘DWORD’ was 
not declared in this scope
/tmp/easy_install-WwrQ7E/pyodbc-2.1.8/src/pyodbc.h:93: error: initializer 
expression list treated as compound expression
/tmp/easy_install-WwrQ7E/pyodbc-2.1.8/src/pyodbc.h:94: error: expected ‘,’ 
or ‘;’ before ‘{’ token
In file included from /tmp/easy_install-WwrQ7E/pyodbc-2.1.8/src/buffer.cpp:13:
/tmp/easy_install-WwrQ7E/pyodbc-2.1.8/src/buffer.h:44: error: ‘SQLLEN’ has 
not been declared
In file included from /tmp/easy_install-WwrQ7E/pyodbc-2.1.8/src/buffer.cpp:14:
/tmp/easy_install-WwrQ7E/pyodbc-2.1.8/src/pyodbcmodule.h:43: error: ‘HENV’ 
does not name a type
/usr/include/python2.5/datetime.h:186: warning: ‘PyDateTimeAPI’ defined but 
not used
error: Setup script exited with error: command 'gcc' failed with exit status 1

Thanks,
Lucas

Original comment by szybal...@gmail.com on 12 Nov 2010 at 5:15

GoogleCodeExporter commented 9 years ago
I figured it out, sorry for posting.
On Debian Lenny you need this package as well:
aptitude install unixodbc-dev

So in general the documentation should say:
aptitude install python-dev
aptitude install unixodbc
aptitude install unixodbc-dev

Thanks,
Lucas

Original comment by szybal...@gmail.com on 12 Nov 2010 at 6:53

GoogleCodeExporter commented 9 years ago

Original comment by mkleehammer on 21 Nov 2010 at 4:44

GoogleCodeExporter commented 9 years ago
Issue 88 has been merged into this issue.

Original comment by mkleehammer on 21 Nov 2010 at 6:38