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

modify eachdist.py so develop subcommand works by default #3435

Closed
wants to merge 5 commits into from

Conversation

pmcollins
Copy link
Member

Description

By default and with a clean checkout,eachdist.py develop fails with a no matching distribution error.

However, if you modify the script, setting with_test_deps to False, the script issues a pip command that does not indicate [test] extras for each package, and it completes successfully.

This PR makes a small change to eachdist.py, defaulting with_test_deps to False and adding a flag so users can still turn this capability on.

Possible workaround for #1846

Related to #1462

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Tested manually by running eachdist.py develop in a clean Python environment.

Does This PR Require a Contrib Repo Change?

Answer the following question based on these examples of changes that would require a Contrib Repo Change:

  • The OTel specification has changed which prompted this PR to update the method interfaces of opentelemetry-api/ or opentelemetry-sdk/

  • The method interfaces of test/util have changed

  • Scripts in scripts/ that were copied over to the Contrib repo have changed

  • Configuration files that were copied over to the Contrib repo have changed (when consistency between repositories is applicable) such as in

    • pyproject.toml
    • isort.cfg
    • .flake8
  • When a new .github/CODEOWNER is added

  • Major changes to project information, such as in:

    • README.md
    • CONTRIBUTING.md
  • Yes?

  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@pmcollins
Copy link
Member Author

Scripts in scripts/ that were copied over to the Contrib repo have changed

If this change is accepted happy to apply it to contrib as well.

@pmcollins pmcollins marked this pull request as ready for review September 15, 2023 14:19
@pmcollins pmcollins requested a review from a team September 15, 2023 14:19
@ocelotl
Copy link
Contributor

ocelotl commented Nov 24, 2023

@pmcollins curious, what is the motivation behind this change? Is there something this script can do that tox can't?

@pmcollins
Copy link
Member Author

pmcollins commented Nov 27, 2023

@pmcollins curious, what is the motivation behind this change? Is there something this script can do that tox can't?

Hi @ocelotl -- I use the eachdist script to install all OTel python sub-projects in editable mode (python eachdist.py develop), and it looks like eachdist was developed for this purpose (among others). Do you feel that this approach is deprecated (or should it be)? I'm curious about alternative approaches (happy to discuss in Slack if you want, too).

In any case, it looks like my original problem is no longer a problem 🤷, but there is a new problem and that is that -- at least for me -- the import order defined in eachdist.ini needs tweaking. I have updated this PR with that tweak, which is a little bit sneaky because we're repurposing this PR a bit, but at least now we have the option.

In its current form, python scripts/eachdist.py develop fails, but it succeeds with the changes proposed in this PR (I have updated this PR with a different order in eachdist.ini), so if these changes are good, I'd like to make them available to other developers. On the other hand, if we want to deprecate the develop subcommand or the whole script, happy to discuss that too.

@pmcollins
Copy link
Member Author

Closing in favor of the fix for #3903.

@pmcollins pmcollins closed this May 6, 2024
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.

2 participants