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

feat(python): read version-file from manifest #2434

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fredrikaverpil
Copy link

@fredrikaverpil fredrikaverpil commented Nov 16, 2024

Why this change?

I wanted to write the version string to __about__.py instead of the default __init__.py file for release-type python. Writing the version string to __about__.py is quite common in the python community.

After fiddling around, I noticed that the version-file value from the manifest JSON is not read and could've been used so to specify the path to __about__.py.

What was changed?

  • Read the manifest's version-file value and push the version string to it.
  • If no version-file was provided, fall back to previous behavior.

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #2433

Copy link

google-cla bot commented Nov 16, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Nov 16, 2024
@fredrikaverpil fredrikaverpil force-pushed the aboutpy branch 3 times, most recently from 28f18d8 to 5ab0703 Compare November 16, 2024 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python: add support for __about__.py
2 participants