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

Support editable_wheel with setuptools>=64 #981

Open
casperdcl opened this issue May 16, 2023 · 1 comment
Open

Support editable_wheel with setuptools>=64 #981

casperdcl opened this issue May 16, 2023 · 1 comment

Comments

@casperdcl
Copy link

casperdcl commented May 16, 2023

On the subject of pip install -e, --editable woes, I've seen #697, #370, #436, #616, #585, #579, and also tried #582, #546 (comment), #546 (comment).

I think I have a different issue (setup.py develop works but pip install -e does not). Probably related to #737 (comment).

Added print(sys.argv) into setup.py for some debugging. This gives:

  1. ✅ works fine (normal install):
# pip install .
['.../pip/_vendor/pyproject_hooks/_in_process/_in_process.py', 'egg_info']
['.../pip/_vendor/pyproject_hooks/_in_process/_in_process.py', 'dist_info', '--output-dir', '/tmp/pip-modern-metadata-5jbkp8ic', '--keep-egg-info']
['.../pip/_vendor/pyproject_hooks/_in_process/_in_process.py', 'bdist_wheel', '--dist-dir', '/tmp/pip-wheel-tkgf3n8x/.tmp-nc33bf8_']
  1. ✅ works fine (editable install, creates ./_skbuild, ./cmake, ./mylib/ext.so):
# python setup.py develop
['setup.py', 'develop']
  1. ❌ doesn't work (editable install, DOES NOT create ./_skbuild, ./cmake, ./mylib/ext.so)
# pip install -e .
['.../pip/_vendor/pyproject_hooks/_in_process/_in_process.py', 'egg_info']
['.../pip/_vendor/pyproject_hooks/_in_process/_in_process.py', 'dist_info', '--output-dir', '/tmp/pip-modern-metadata-10kn81k6', '--keep-egg-info']
['.../pip/_vendor/pyproject_hooks/_in_process/_in_process.py', 'editable_wheel', '--dist-dir', '/tmp/pip-wheel-ufrvs40p/.tmp-d90gwcg9']
  1. ✅ works fine on setuptools<64 (editable install, creates ./_skbuild, ./cmake, ./mylib/ext.so)
# pip install -e .
['.../pip/_vendor/pyproject_hooks/_in_process/_in_process.py', 'egg_info']
['.../pip/_vendor/pyproject_hooks/_in_process/_in_process.py', 'dist_info', '--egg-base', '/tmp/pip-modern-metadata-lvcwha5j']
['setup.py', 'develop', '--no-deps']
@henryiii
Copy link
Contributor

setup.py develop triggers the old, deprecated codepath in setuptools which we support. The new one requires an output mapping, I believe, which we should be able to get in scikit-build-core, but would be much harder to produce here.

scikit-build-core supports modern pip editable mode in native mode, if that's helpful. I'm hoping to add support for editable installs in the setuptools mode, in which case scikit-build would get that for free when we switch backends to scikit-build-core.

rapids-bot bot pushed a commit to rapidsai/cugraph that referenced this issue Jul 28, 2023
…stores use of `setup.py` temporarily for develop builds (#3747)

This PR adds the following:
* Removes the now unnecessary "." path used in the install options when `--pydevelop` is used, which resulted in an error when called.
* Temporarily adds a call to `setup.py bdist_ext --inplace` only when `--pydevelop` is used to workaround a [bug in scikit-build](scikit-build/scikit-build#981) when `setuptools>=64` is installed.

Authors:
  - Rick Ratzel (https://github.com/rlratzel)

Approvers:
  - Brad Rees (https://github.com/BradReesWork)
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #3747
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

3 participants
@henryiii @casperdcl and others