Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

On Travis, follow package dependency graph to expand package list.#2487

Closed
dhermes wants to merge 2 commits into
googleapis:mastergoogleapis/google-cloud-python:masterfrom
dhermes:compute-dep-graphdhermes/google-cloud-python:compute-dep-graphCopy head branch name to clipboard
Closed

On Travis, follow package dependency graph to expand package list.#2487
dhermes wants to merge 2 commits into
googleapis:mastergoogleapis/google-cloud-python:masterfrom
dhermes:compute-dep-graphdhermes/google-cloud-python:compute-dep-graphCopy head branch name to clipboard

Conversation

@dhermes

@dhermes dhermes commented Oct 4, 2016

Copy link
Copy Markdown
Contributor

To make computing the dependency graph easier I moved the requirements of each package into a requirements.txt file.

I'm happy to instead write a custom setup.py parser but decided that the route of less code was "better" in some sense.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 4, 2016
@daspecster

Copy link
Copy Markdown
Contributor

@dhermes can you fix the conflicts?
Otherwise this LGTM.

Using boilerplate code snippet in each setup.py to load
the requirements.txt and adding the requirements.txt file to
MANIFEST.in file.
@dhermes dhermes force-pushed the compute-dep-graph branch from 31d2f51 to f2b87af Compare October 4, 2016 17:25

@tseaver tseaver left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am -1 on the "parse requirements.txt" approach:

  • The requirements.txt format is effectively an internal implementation detail of pip: they provide no public API for parsing it.
  • In the words of the PyPA docs and @dstufft, it is intended to support "application deployments", not as a substitute driver for install_requires / "library requirements."

I believe we would be better off leaving install_requires as the definitive version spec for the library, and using the pkg_resources API in our scripts to get the dependency metadata we need.

/cc @jonparrott

@dhermes

dhermes commented Oct 4, 2016

Copy link
Copy Markdown
Contributor Author

@tseaver SGTM. @jonparrott and I discussed and I view pkg_resources as inferior to parsing because it requires having those packages installed somewhere before we decide we want to run those tests.

I'll whip up a proof of concept that parses our setup.py files, assuming some kind of format, and enforces the assumptions with errors.

@tseaver

tseaver commented Oct 4, 2016

Copy link
Copy Markdown
Contributor

@dhermes To do the analysis on Travis, we are going to have them installed somewhere, likely into a tox environment. If we add a console_script (maybe as an extra) which is installed into the environment, then we can get the metadata from it.

@dhermes

dhermes commented Oct 4, 2016

Copy link
Copy Markdown
Contributor Author

@tseaver PTAL at #2498

@dhermes dhermes closed this Oct 4, 2016
@dhermes dhermes deleted the compute-dep-graph branch October 4, 2016 22:57
parthea pushed a commit that referenced this pull request Nov 24, 2025
Co-authored-by: Victor Chudnovsky <vchudnov@google.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Apr 1, 2026
feat: update image to
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:160860d189ff1c2f7515638478823712fa5b243e27ccc33a2728669fa1e2ed0c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement. testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.