Skip to content
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

WIP: use scikit-build-core #389

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

WIP: use scikit-build-core #389

wants to merge 2 commits into from

Conversation

maxnoe
Copy link
Member

@maxnoe maxnoe commented Feb 9, 2024

This should get you started.

More metadata can be added and I recommend to also include setuptools_scm for automatic version handling, this would require a top-level proposal/ pure python package though, instead of just shipping the extension library.

This can be made backwards compatible by importing everything from proposal.....so in proposal/__init__.py.

@maxnoe maxnoe force-pushed the scikit-build-core branch from 8ccb9ea to ee420a6 Compare February 9, 2024 15:52
@Jean1995
Copy link
Member

If I understand this concept correctly, calling conan and pip install is now separated - which I would prefer to the old solution where conan gets called from within setup.py.

I see from the CI how this can work when locally cloing the repository. But would this also be possible via pypi?
So that one can do something like

conan install . -o with_python=True -o with_testing=False --build=missing # optional: fetch dependencies
pip install proposal # install proposal

or how would this work?

@maxnoe
Copy link
Member Author

maxnoe commented Feb 12, 2024

I see from the CI how this can work when locally cloing the repository. But would this also be possible via pypi?

No... because the conanfile is of course only there once you downloaded the package.

This is one of the reasons why this is still "draft". Installing the source distribution from pypi would require having all dependencies already on the system.

One solution around this would be to offer pre-built wheels for the most common platforms, e.g. via cibuildwheel.
Then most users will just install the compiled binary, without ever needing conan or even compiling proposal itself.

If we really want to call conan, we could call it from CMakeLists.txt I think, in an if(SKBUILD AND USE_CONAN) block or similar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants