Skip to content

Commit d0c9aa5

Browse files
authored
Fix: CFFI build now uses relative paths (#387)
The CFFI build process was previously using absolute paths to the source and include directories, which caused the resulting wheel to be non-portable. Resolves #386.
1 parent d274869 commit d0c9aa5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@
8181
patch_lmdb_source = False
8282
else:
8383
print('py-lmdb: Using bundled liblmdb with py-lmdb patches; override with LMDB_FORCE_SYSTEM=1 or LMDB_PURE=1.')
84-
extra_sources = [os.path.abspath(s) for s in ['build/lib/mdb.c', 'build/lib/midl.c']]
85-
extra_include_dirs += [os.path.abspath('build/lib'), os.path.abspath('lib/py-lmdb')]
84+
extra_sources = [os.path.join(os.path.dirname(__file__), 'build/lib/mdb.c'), os.path.join(os.path.dirname(__file__), 'build/lib/midl.c')]
85+
extra_include_dirs += [os.path.join(os.path.dirname(__file__), 'build/lib'), os.path.join(os.path.dirname(__file__), 'lib/py-lmdb')]
8686
extra_compile_args += ['-DHAVE_PATCHED_LMDB=1']
8787
libraries = []
8888

0 commit comments

Comments
 (0)