Skip to content

Commit

Permalink
Merge pull request #568 from plone/erral-customized-variables
Browse files Browse the repository at this point in the history
allow overriding package.dottedname through a configuration file
  • Loading branch information
MrTango authored Oct 25, 2024
2 parents 8d2e31e + 2062a15 commit 52ef2ca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Changelog
6.3.4 (unreleased)
------------------

- Allow overriding package.dottedname in the configuration file
[erral]

- fix test-coverage bash script, so that it will fail if the tests fail
[mamico]

Expand Down
9 changes: 6 additions & 3 deletions bobtemplates/plone/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,9 +432,12 @@ def base_prepare_renderer(configurator):
)
if not configurator.variables["package.root_folder"]:
raise MrBobError("No setup.py found in path!\n")
configurator.variables["package.dottedname"] = configurator.variables[
"package.root_folder"
].split(os.path.sep)[-1]

if "package.dottedname" not in configurator.variables:
configurator.variables["package.dottedname"] = configurator.variables[
"package.root_folder"
].split(os.path.sep)[-1]

configurator.variables["package.namespace"] = configurator.variables[
"package.dottedname"
].split(".")[0]
Expand Down

0 comments on commit 52ef2ca

Please sign in to comment.