Skip to content

Commit

Permalink
feat: Use the build_ext command generated filename for SOs. Fixes #6
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Dec 7, 2017
1 parent f22df90 commit bf8b9af
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions milksnake/setuptools_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,13 @@ def __init__(self, spec, module_path, dylib=None, header_filename=None,

genbase = '%s._%s' % (parts[0], parts[1].lstrip('_'))
self.cffi_module_path = '%s__ffi' % genbase

self.fake_module_name = "%s__lib" % genbase.split('.')[-1]
self.lib_filename = '%s__lib%s' % (
genbase.split('.')[-1],
new_compiler().shared_lib_extension,
)
self.fake_module_path = '%s__lib' % genbase

bdist_ext = spec.dist.get_command_obj('build_ext', 1)
bdist_ext.ensure_finalized()
self.lib_filename = bdist_ext.get_ext_filename(
self.fake_module_path).split(os.path.sep, 1)[-1]

def get_header_source(self):
if self.header_source is not None:
return self.header_source
Expand Down

0 comments on commit bf8b9af

Please sign in to comment.