Skip to content

libtbx_refresh.py: find dist-info in the install directory instead of src#2906

Merged
dwpaley merged 7 commits into
mainfrom
libtbx_refresh_pep660
May 1, 2025
Merged

libtbx_refresh.py: find dist-info in the install directory instead of src#2906
dwpaley merged 7 commits into
mainfrom
libtbx_refresh_pep660

Conversation

@dwpaley

@dwpaley dwpaley commented Apr 29, 2025

Copy link
Copy Markdown
Collaborator

Fixes #2902

@dwpaley dwpaley marked this pull request as draft April 30, 2025 17:36
@ndevenish

Copy link
Copy Markdown
Member

Ah, I looked at the failures this evening but forgot about that nuance

@dwpaley

dwpaley commented Apr 30, 2025

Copy link
Copy Markdown
Collaborator Author

right, me too :) any thoughts on 6172520? Is it sufficient to put the installed location in the python path, or does src also need to be there explicitly? (we'll see if the tests pass...)

@ndevenish

Copy link
Copy Markdown
Member

install -e for non-legacy should be dropping a .pth to point to the sources. But If remain unsure exactly which mix of behaviours we are getting here.

@dwpaley

dwpaley commented Apr 30, 2025

Copy link
Copy Markdown
Collaborator Author

Yes, I have a file inside build/dials/lib/python3.10/site-packages named __editable__.dials-3.22.dev0.pth and pointing to modules/dials/src so it should be sufficient to add just the site-packages inside build.

Comment thread libtbx_refresh.py Outdated
if rel_path not in env.pythonpath:
env.pythonpath.insert(0, rel_path)
# As of PEP 660, the package metadata (dist-info) goes in the install dir,
# not the source dir. Add this location to the python path too.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think with that latest change this is now not "too"

Suggested change
# not the source dir. Add this location to the python path too.
# not the source dir. Add this location to the python path.

@ndevenish

Copy link
Copy Markdown
Member

Otherwise, I think this looks good to merge dxtbx, then revert the branch changing here for final testing?

dwpaley added a commit to cctbx/dxtbx that referenced this pull request Apr 30, 2025
… src (#807)

See dials/dials#2902 and dials/dials#2906

Co-authored-by: Nicholas Devenish <ndevenish@gmail.com>
@dwpaley dwpaley marked this pull request as ready for review April 30, 2025 23:14
@dwpaley dwpaley merged commit de6e5b5 into main May 1, 2025
12 checks passed
@dwpaley dwpaley deleted the libtbx_refresh_pep660 branch May 1, 2025 01:08
dwpaley added a commit to cctbx/cctbx_project that referenced this pull request May 1, 2025
Legacy-editable mode was removed in pypa/setuptools#4953, this env
variable no longer does anything. We accommodate the new behavior in
cctbx/dxtbx#807 and dials/dials#2906.
@ndevenish

Copy link
Copy Markdown
Member

Thank you very much for your work on this!

ndevenish added a commit to xia2/xia2 that referenced this pull request May 2, 2025
See dials/dials#2906.

Also, tidy up typing slightly here.
ndevenish added a commit to xia2/xia2 that referenced this pull request May 2, 2025
aaronfinke pushed a commit to aaronfinke/dxtbx that referenced this pull request Oct 7, 2025
ndevenish added a commit that referenced this pull request Dec 9, 2025
… src (#2906)

Fixes #2902

Co-authored-by: Nicholas Devenish <ndevenish@gmail.com>
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.

Freshly bootstrapped libtbx builds failing tests

3 participants