Browse Source

python: make setup.py work even if imported from elsewhere.

I feel like I'm stepping into unknown waters here :D
pull/2/head
Vladimír Vondruš 7 years ago
parent
commit
6d30c5ddd7
  1. 6
      src/python/setup.py.cmake

6
src/python/setup.py.cmake

@ -65,6 +65,12 @@ setup(
name='magnum', name='magnum',
packages=packages, packages=packages,
ext_modules=[Extension(name, sources=[]) for name, path in extension_paths.items() if path], ext_modules=[Extension(name, sources=[]) for name, path in extension_paths.items() if path],
package_dir={
# Explicitly supply package_dir so importing this file from another
# setup.py (i.e., when this is a bundled dependency of another project)
# does the right thing
'.': os.path.dirname(__file__)
},
cmdclass={ cmdclass={
'build_ext': TheExtensionIsAlreadyBuiltWhyThisHasToBeSoDamnComplicated 'build_ext': TheExtensionIsAlreadyBuiltWhyThisHasToBeSoDamnComplicated
}, },

Loading…
Cancel
Save