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

Repository with "split" layout and editable installation #25

Open
robertodr opened this issue Jun 23, 2022 · 1 comment
Open

Repository with "split" layout and editable installation #25

robertodr opened this issue Jun 23, 2022 · 1 comment

Comments

@robertodr
Copy link

I am working on a project that has a somewhat unusual layout of the source folder:

  • All sources (C++ and Python) are under src
  • The Python sources are in src/pymodule
  • The C++ pybind11 sources are in src/python

Running pip install . works as expected, but I am having trouble with making the editable (pip install -e .) installation work. Can it be made to work?
Note that both editable and non-editable installations work if I:

  • rename the folder for the Python sources to src/hello
  • use package_dir = {'': 'src'} in setup.py
  • set the DESTINATION in the src/{hello,python}/CMakeLists.txt to src/hello

Here is a sample project for this "split" layout: https://github.com/robertodr/scikit-build-sample-projects/tree/split-layout/projects/hello-split-layout

@Zhaoyilunnn
Copy link

Having the same issue, does anybody know how to enable editable mode?

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

No branches or pull requests

2 participants