You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect the package name and package version (tuple) to be correctly processed when running towncrier build --draft or towncrier build.
I can circumvent this exception by specifying the package name towncrider build --draft --name mypkg, even though the above command has correctly found and loaded my package.
Looking at the _project.py and build.py code, there appears to be a 2 different ways for versions to be loaded.
get_project_name, which does not support tuple __version__
get_version, which does support tuple __version__.
I believe the fix will simplify require get_project_name to call get_version in the event that a tuple version is returned.
The text was updated successfully, but these errors were encountered:
Description
I have a python project "mypkg" with the source code in the
mypkg
directory of the root project.My version is stored as a tuple in
mypkg.__init__.py
such that it can be imported as follows:I have setup towncrier to recognize my package name in my
pyproject.toml
file.I did not specify the
package_dir
since it is the same as my package name.Additionally, I have created the templates and stubs as described in the tutorial.
When I try to create a draft build, an exception is raised that a tuple version is unsupported.
Expected behavior
I expect the package name and package version (tuple) to be correctly processed when running
towncrier build --draft
ortowncrier build
.I can circumvent this exception by specifying the package name
towncrider build --draft --name mypkg
, even though the above command has correctly found and loaded my package.Looking at the _project.py and build.py code, there appears to be a 2 different ways for versions to be loaded.
get_project_name
, which does not support tuple__version__
get_version
, which does support tuple__version__
.I believe the fix will simplify require
get_project_name
to callget_version
in the event that a tuple version is returned.The text was updated successfully, but these errors were encountered: