jmacd / xdelta

open-source binary diff, delta/differential compression tools, VCDIFF/RFC 3284 delta compression
http://xdelta.org
1.11k stars 184 forks source link

setup.py install error #96

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When I try to install xdelta3 as a Python extension, I get
"c:\python26\xdelta3.0w\xdelta3-main.h(100) : fatal error C1083: Cannot
open include file: 'unistd.h': No such file or directory". I can build xd3
from xdelta3.vcproj with no difficulties, however.

Using Python 2.6.4, xdelta 3.0w source, on Windows XP with MSVC 9.0.

Original issue reported on code.google.com by uNsanity...@gmail.com on 7 Nov 2009 at 3:49

GoogleCodeExporter commented 9 years ago
Nevermind, I changed XD3_POSIX to XD3_WIN32 in setup.py after looking through
xdelta3-main.h for a little while and it installed correctly. I noticed that the
script already has get_platform imported from distutils; four lines before 
setting up
the extension could be used to make the setup more easily distributed:

if get_platform() == 'win32':
    platform = 'XD3_WIN32'
else:
    platform = 'XD3_POSIX' # xdelta3-main.h defaults to posix

followed by changing ('XD3_POSIX',1) to (platform,1).

Original comment by uNsanity...@gmail.com on 7 Nov 2009 at 6:26

Attachments:

GoogleCodeExporter commented 9 years ago
There's probably a more appropriate place for this, but I also took care of the 
todo
in xdelta3-python.h by changing ps = PyString_AsString (s); to if ((ps =
PyString_AsString (s)) == NULL) {goto cleanup; }.

Original comment by uNsanity...@gmail.com on 7 Nov 2009 at 6:54

Attachments:

GoogleCodeExporter commented 9 years ago
I've removed xdelta3-python.h and am now relying on the swig module, since it 
is less to maintain. The current release (3.0.1) uses automake-generated 
installation rules and I've been able to install and run xdelta3-test.py. 
However, this is still an area of trouble, installing and testing the python 
module.

Original comment by josh.mac...@gmail.com on 18 Jun 2012 at 11:31