-
Notifications
You must be signed in to change notification settings - Fork 54
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
how to find PythonExtensions
#966
Comments
If you use scikit-build (classic), then that tutorial will work, and |
Ok, thank you. Where can I find documentation on the CMake things that scikit-build and scikit-build-core provide? I want to be as independent as possible! My goal is to redo my build system for a C++/Python library using Boost.Python (so I can finally hopefully distribute pre-compiled binaries, a goal that's long challenged me), and I'm working to build a minimal example since the examples don't include such an example. For example, my question next is about linking needed libraries to my
The error I get is
I can get it to work by adding the Another thing vexing me is how to get scikit-build-core / CMake / pip to install both a built C++/.so library AND a pure-python library that imports the .so and makes calls into it. I haven't found an example of that yet. Is there one in the documentation for scikit-build-core? Thanks for your time! |
Regarding dependencies though, you can bundle them and download them as needed using
This is a rather more complex design question, and it can be handled in various ways depending on what are your requirements. I generally ask the question where do you want to package and support your project (PyPI, conda, spack, distro packages)? Each of these will put some constraints on the design and guide you to some good practices for each environment. Another important aspect is what is your intended user experience after As for reference projects, I do not believe we have any official ones to recommend, but maybe @henryiii has some good references. My design in Footnotes |
Thank you for your thorough reply. I have a working CMake build setup already for my library, but it still feels piecemeal, in that pip installing from the repo isn't connected to compilation (yet). My tool consists of three pieces:
Getting all three built and installed currently takes three steps, and they feel disconnected, and it's a barrier to people using my tools. I desperately need it to be pip- or conda-installable. I certainly would welcome a complete model example for packaging and distribution of a library built using C++ and Python; not just building, but how to get it all the way into the distribution pipeline. My highest goal is I think we're close to the end of this thread, which has now wandered from the title of this thread. To conclude, do you have advice or resources for closing the gap between a public repo on github and installation via pip, for such a library as I'm working with? That's what brought me to scikit-build in the first place. I keep finding examples that do one step or another, but nothing that's end-to-end (and maybe such an example would be too specific, but here I am, needing to solve this problem, and it continues to be challenging to me). Thanks again, I really appreciate your time. |
I'm trying to use scikit-build-core for a C++ project that generates Python bindings, and I'm stuck at an early step. I've tried to follow the tutorial, and I can't even get that to work because I can't get CMake to find
FindPythonExtensions.cmake
. I'm writing to ask for help making sure this.cmake
file is available.I've seen a number of projects online that use your tool, and their CMakeLists.txt files contain the line
I just cannot get this step to succeed. All I can get is
I can see the necessary file
FindPythonExtensions.cmake
as part of my scikit-build installation atsite-packages/skbuild/resources/cmake
. But I do not know how to programmatically get the location of this file to add it to myCMAKE_MODULE_PATH
. To that end, I've tried running a Python script viaEXECUTE_PROCESS
a la this forum post, but I cannot get it to succeed for the life of me.Am I supposed to take a copy of
FindPythonExtensions.cmake
into my repo? Why doesn't scikit-build-core find it when I invokepip install .
to build and install my library?The text was updated successfully, but these errors were encountered: