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

libtbx_refresh runs with setuptools in "legacy_editable" mode #802

Merged
merged 1 commit into from Oct 13, 2022

Conversation

dwpaley
Copy link
Contributor

@dwpaley dwpaley commented Oct 12, 2022

In pypa/setuptools#3265 (merged in setuptools 64), the default behavior of pip install --editable changed. This broke the libtbx.refresh scripts that previously placed an entrypoints file in modules, e.g. modules/dxtbx/src/dxtbx.egg-info/entry_points.txt.

We restore the legacy behavior by setting an environment variable SETUPTOOLS_ENABLE_FEATURES=legacy_editable before running the libtbx_refresh scripts. This allows using the current setuptools, otherwise we would have to pin it again to <=63.

@ndevenish
Copy link
Contributor

What has physically changed with the layout? It tries to put the .egg-info in a different place now?

The documentation changes seem to be pushing people towards using virtual environments. I know cctbx has resisted this for some time (hence the whole bespoke engineering around read-only installs), but is it going to end up being unavoidable if they drop the legacy setting?

@dwpaley dwpaley merged commit 63510f5 into master Oct 13, 2022
@dwpaley
Copy link
Contributor Author

dwpaley commented Oct 17, 2022

Hi Nick, the new editable install doesn't create egg-info directories:

dwpaley@dials:/dev/shm/dwpaley/20221012
$ libtbx.refresh
[...]
$ find . -name dxtbx.egg-info
[nothing]
$ find . -name entry_points.txt |grep dxtbx
./build/dxtbx/lib/python3.9/site-packages/dxtbx-3.12.dev0.dist-info/entry_points.txt

I guess a more maintainable fix would be to fix the python environment so the entrypoints files are discovered in their new location? @bkpoon mentioned possibly installing in build instead of build/dxtbx etc.

@phyy-nx phyy-nx deleted the setuptools_legacy_editable branch October 18, 2022 16:41
Trzs pushed a commit that referenced this pull request Oct 28, 2022
Co-authored-by: Billy Poon <bkpoon@lbl.gov>
Co-authored-by: Aaron Brewster <asbrewster@lbl.gov>
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.

None yet

2 participants