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

Remove all globbed dist-infos in editable self-installs #3742

Closed

Conversation

nickray
Copy link

@nickray nickray commented Mar 1, 2021

Pull Request Check List

Resolves: #2918, #3741, partially #2855.

  • Added tests for changed code.
  • Updated documentation for changed code.

Depends on: python-poetry/poetry-core#137

The SitePackages class seems not quite made for globbing. Appreciate pointers if there is a better way..

This depends on python-poetry/poetry-core#137 to avoid code duplication, might be easier to just implement the method from there here.

@nickray nickray force-pushed the remove-stale-editable-dist-infos branch 5 times, most recently from 1407dcd to 6acb4dd Compare March 4, 2021 10:03
@nickray
Copy link
Author

nickray commented Mar 4, 2021

This was mostly good to go, until a change in poetry-core/master broke the poetry/master build. How to proceed?

@nickray nickray force-pushed the remove-stale-editable-dist-infos branch from 6acb4dd to 322b546 Compare March 4, 2021 10:29
@nickray nickray force-pushed the remove-stale-editable-dist-infos branch from 322b546 to 2c5ee7f Compare March 4, 2021 10:31
Copy link
Member

@abn abn left a comment

Choose a reason for hiding this comment

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

You could add a find_glob method to SitePackages. That might be the clean way forward.

dist_info_paths = [
Path(dist_info)
for site_package_dir in self._env.site_packages.writable_candidates
for dist_info in site_package_dir.glob(builder.dist_info_glob)
Copy link
Member

Choose a reason for hiding this comment

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

Since the glob is only really required for an editable builder; you can construct it here.

Copy link
Author

@nickray nickray Mar 21, 2021

Choose a reason for hiding this comment

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

I can, sure. If I do, though, the glob "{}-*.dist-info".format(escaped_name) depends on implementation details of core (structure of format string, implementation of escape_name(self._package.name)), which I felt was iffy.

@fredrikaverpil
Copy link
Contributor

This issue is of interest to me, is there anything I can do to help?

@fredrikaverpil
Copy link
Contributor

@stephsamson @abn maybe this should be closed now that #3900 was merged?

@abn
Copy link
Member

abn commented Apr 11, 2021

Superseded by #3900.

Thanks @fredrikaverpil

@abn abn closed this Apr 11, 2021
@nickray nickray deleted the remove-stale-editable-dist-infos branch April 13, 2021 19:48
Copy link

github-actions bot commented Mar 1, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[1.1.0b2] Bumping version leaves orphaned dist-info in site-packages
3 participants