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

Make distutils symlink_data command private #645

Merged
merged 2 commits into from
May 31, 2024

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented May 17, 2024

We don't want anyone taking a dependency on this functionality, and we don't want to interfere with non-colcon use of setuptools or distutils, so it's best to just hide this entry point and make it available only when we're running our builds.

We don't want anyone taking a dependency on this functionality, and we
don't want to interfere with non-colcon use of setuptools or distutils,
so it's best to just hide this entry point and make it available only
when we're running our builds.
@cottsay cottsay added the enhancement New feature or request label May 17, 2024
@cottsay cottsay self-assigned this May 17, 2024
Copy link

codecov bot commented May 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.44%. Comparing base (b174608) to head (f46b170).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #645   +/-   ##
=======================================
  Coverage   83.43%   83.44%           
=======================================
  Files          66       66           
  Lines        3816     3817    +1     
  Branches      745      745           
=======================================
+ Hits         3184     3185    +1     
  Misses        555      555           
  Partials       77       77           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@nuclearsandwich nuclearsandwich left a comment

Choose a reason for hiding this comment

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

I understand and agree with the why of this change and want to confirm that I understand the how as well.

  1. The entrypoint configuration is removed from the package configuration in setup.cfg
  2. Data files representing a vendored/stashed python module with entrypoints are installed with colcon-core
  3. In colcon core's build task, this vendored/stashed module is added to the PYTHONPATH directly at the point before its used.

Is that about correct?

@cottsay
Copy link
Member Author

cottsay commented May 31, 2024

Is that about correct?

Nailed it.

I discounted this as an option when it was originally implemented, but the Python metadata specification is actually pretty simple so it was easy to dump it in there. We're already modifying the PYTHONPATH when we invoke the build in order to change the installation locations via the site customization, so it isn't a very far reach to also inject some setuptools nonsense here.

All of this will be deprecated by colcon-python-project code at some point.

@nuclearsandwich
Copy link
Contributor

Nailed it.

Thanks for confirming!

All of this will be deprecated by colcon-python-project code at some point.

May the day be soon at hand!

@cottsay cottsay merged commit 485f500 into master May 31, 2024
36 checks passed
@delete-merged-branch delete-merged-branch bot deleted the cottsay/private-distutils-command branch May 31, 2024 21:15
@cottsay cottsay added this to the 0.16.2 milestone Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants