Examples of setuptools install for compiled modules?

25 views
Skip to first unread message

woodri...@gmail.com

unread,
May 24, 2018, 5:27:53 PM5/24/18
to scikit-build
I'm having problems now that, while I can do a build, I can't do an install.

What are the "proper" options to setup() to provide the built extensions, such that they will be installed correctly, if using either "python setup.py install" or "pip install ."

For example, the behavior I am seeing is that it will copy the python files into site-packages, but none of the compiled extensions.

I tried setting ext_modules=[Extension('_foo', [])] but that didn't work as expected (from setuptools import Extension).

The examples I have seen in the source code have no examples of this. I know the modules are getting built, because they appear in _skbuild/cmake_install/... but they do not get copied from the setuptools perspective.

Second related thing, I have a superbuild going, where I build a related library first, and want to copy the shared libraries into the installed python module location. What would be recommended course of action? (Though, I am having trouble copying the libraries in the first place, but that seems to be more of a CMake problem for me, which is outside the scope of this.)

woodri...@gmail.com

unread,
May 24, 2018, 5:35:59 PM5/24/18
to scikit-build
And secondly, I do have "install(TARGETS _foo LIBRARY DESTINATION module_bar)" in my CMakeLists. So, at least the modules are being compiled and installed in _skbuild/cmake-install/...

Is there something there's supposed to go into setup.py, or should it "just work"?

woodri...@gmail.com

unread,
May 24, 2018, 5:48:35 PM5/24/18
to scikit-build
My kludge for now is:

setup(
  ...
  install_package_files=True,
  package_data = {"": ["_foo.*"]}
  ...
  )

which works.
Reply all
Reply to author
Forward
0 new messages