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): support src/packagename/__init__.py #1062
Conversation
For the popular src directory layout, https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure
@@ -115,6 +115,14 @@ export class Python extends ReleasePR { | |||
packageName: packageName.name, | |||
}) | |||
); | |||
updates.push( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind adding a // TODO: figure out refactor that makes logic for updating __init__.py, etc., configurable
I'm a little worried about the number of optional paths we've added at this point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
FWIW after this one's in, pretty much the last one re filenames I'm aware some projects could appreciate would be updating __version__.py
files anywhere in the tree. That could be handled just like version.py
currently is.
But at that point I think all the "standard" ways to refer to the version would be addressed and a reasonable alternative to configurability might be to nudge projects to use a more common filename to place their __version__
in.
Then again while the __version__
symbol is probably the most prominent, some projects use just version
or VERSION
...
🤖 I have created a release \*beep\* \*boop\* --- ## [12.3.0](https://www.github.com/googleapis/release-please/compare/v12.2.0...v12.3.0) (2021-09-24) ### Features * allow forcing latest tag ([#1070](https://www.github.com/googleapis/release-please/issues/1070)) ([0549a30](https://www.github.com/googleapis/release-please/commit/0549a3035c8348c62958d2f1f037226bf2a0ce21)) * **manifest:** add option to skip creating github release ([#1048](https://www.github.com/googleapis/release-please/issues/1048)) ([59f3094](https://www.github.com/googleapis/release-please/commit/59f309429586200f835fdffe07ed9860a1901e31)) * **python:** support src/packagename/__init__.py ([#1062](https://www.github.com/googleapis/release-please/issues/1062)) ([598667d](https://www.github.com/googleapis/release-please/commit/598667da5a623c3fb057874840b3c308d225c627)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
release-please(-action) supports that now. Refs googleapis/release-please#1062
This reverts commit 08457a1. release-please(-action) supports __version__ in __init__.py now. Refs googleapis/release-please#1062
For the popular src directory layout,
https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure
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:
Refs #1026
Basically just monkeying what was done with earlier related python changes recently and git grepping what might need updating without really understanding it all, could very well be that I've missed something.