-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support building a pip package using scikit-build #559
base: master
Are you sure you want to change the base?
Conversation
Hmm, it looks like https://github.com/DanielBok/nlopt-python does the same thing. |
Perhaps we should remove the python parts from the existing nlopt conda package and just onboard nlopt-python as a separate conda package? Not sure the best path since technically both of these libraries produce python bindings |
|
@stevengj @DanielBok @jschueller, any thoughts on how to proceed? |
) | ||
configure_file( | ||
${CMAKE_CURRENT_SOURCE_DIR}/nlopt.i | ||
${CMAKE_CURRENT_BINARY_DIR}/python/nlopt.i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a good reason why these have to be copied? Why can't they be used directly from the source dir?
set (NLopt_ROOT @CMAKE_CURRENT_BINARY_DIR@/../../) | ||
find_package (NLopt CONFIG REQUIRED) | ||
|
||
set (SWIG_MODULE__nlopt_EXTRA_DEPS nlopt-python.i numpy.i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't this depend on ../nlopt-python.i
etcetera if the paths are set correctly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spent quite some time trying to set up paths correctly, but couldn't figure out how to do it.
Helps make the conda package have correct pip metadata.
Makes it possible to create wheels and have them uploaded to PyPI later.