Skip to content
Snippets Groups Projects
Commit a5b0b7ff authored by Sergey Kosukhin's avatar Sergey Kosukhin
Browse files

Enable building of the Python interface with Python 3.

parent d6ede7b4
No related branches found
No related tags found
No related merge requests found
......@@ -64,7 +64,7 @@ Makefile
/interfaces/python/*.pyc
/interfaces/python/*.pyo
/interfaces/python/*.stamp
/interfaces/python/__pychache__
/interfaces/python/__pycache__
/tests/*.parallel.c
/tests/calendar_test1
/tests/cksum_read
......
......@@ -23,16 +23,16 @@ class lt_install_lib(install_lib):
verbose=1
update=0
if not self.dry_run and not os.path.isdir(infile):
raise DistutilsFileError, \
"cannot copy tree '%s': not a directory" % infile
raise DistutilsFileError(
"cannot copy tree '%s': not a directory" % infile)
try:
names = os.listdir(infile)
except os.error, (errno, errstr):
except os.error as e:
if self.dry_run:
names = []
else:
raise DistutilsFileError, \
"error listing files in '%s': %s" % (infile, errstr)
raise DistutilsFileError(
"error listing files in '%s': %s" % (infile, e.strerror))
if not self.dry_run:
mkpath(outfile, verbose=verbose)
......
......@@ -7,10 +7,10 @@ import sys, os, distutils
CdiLib_module = Extension('_CdiLib',
sources=['cdilib_wrap.c'],
extra_compile_args = INCFLAGS,
library_dirs = map(lambda x: x.lstrip('-L'),
filter(lambda x: x if x.startswith('-L')
else None,
os.environ['LDFLAGS'].split())),
library_dirs = list(map(
lambda x: x.lstrip('-L'),
filter(lambda x: x if x.startswith('-L') else None,
os.environ['LDFLAGS'].split()))),
libraries = ['cdi'],
extra_link_args = LIBS,
)
......
......@@ -12,10 +12,10 @@ from setup import *
cdiobj_module = Extension('_CdiObj',
sources=['cdiobj_wrap.cpp'],
extra_compile_args = INCFLAGS,
library_dirs = map(lambda x: x.lstrip('-L'),
filter(lambda x: x if x.startswith('-L')
else None,
os.environ['LDFLAGS'].split())),
library_dirs = list(map(
lambda x: x.lstrip('-L'),
filter(lambda x: x if x.startswith('-L') else None,
os.environ['LDFLAGS'].split()))),
extra_objects = ['../cdi.lo'],
runtime_library_dirs = [os.environ['BUILDLIBDIR'],os.environ['LIBDIR']],
extra_link_args = LIBS,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment