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

Add a dependencies command, which dumps the list of dependencies #241

Merged
merged 2 commits into from
Jan 6, 2021

Conversation

nbraud
Copy link
Collaborator

@nbraud nbraud commented Jan 6, 2021

This is useful for automating things like installing only a project's
dependencies. The specific usecase I just ran into, was generating container
images for CI with all dependencies preinstalled.

Obviously, this doesn't work well with pipelines that trigger actions if a file
changed in the source repo, but it's still much better than nothing.

@nbraud
Copy link
Collaborator Author

nbraud commented Jan 6, 2021

The use of pep517.meta was suggested by @jaraco in a setuptool issue about accepting file: requirements.txt in install_requires

This is useful for automating things like installing only a project's
dependencies, in CI.
Comment on lines +44 to +45
@click.option('-o', '--output', type=click.File('w'), default='-',
help='File in which to save the list of dependencies.')
Copy link
Owner

Choose a reason for hiding this comment

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

So, print(string, file='-') doesn't work — is accepting - a magical click thing? If so, that's pretty neat.

Copy link
Owner

Choose a reason for hiding this comment

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

nvm, I r'd tfm and yup it's a magical click thing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, it's a click thing

@duckinator
Copy link
Owner

bors r+

this is fantastic, thank you. ^.^

@bors
Copy link
Contributor

bors bot commented Jan 6, 2021

Build succeeded:

@bors bors bot merged commit 41c4c12 into master Jan 6, 2021
@bors bors bot deleted the dependencies branch January 6, 2021 16:49
@nbraud
Copy link
Collaborator Author

nbraud commented Jan 6, 2021

blushes brightly.

You are fantastic 💜

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