-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
setup.py
of configured packages with small textual changes. (#…
- Loading branch information
Showing
4 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,13 @@ | |
https://github.com/zopefoundation/meta/tree/master/config/{config_type} | ||
-->""" | ||
DEFAULT = object() | ||
SETUP_PY_REPLACEMENTS = { | ||
'ZPL 2.1': 'ZPL-2.1', | ||
'[email protected]': '[email protected]', | ||
'Zope Corporation': 'Zope Foundation', | ||
'Framework :: Zope2': 'Framework :: Zope :: 2', | ||
'Framework :: Zope3': 'Framework :: Zope :: 3', | ||
} | ||
|
||
|
||
def handle_command_line_arguments(): | ||
|
@@ -355,6 +362,14 @@ def setup_cfg(self): | |
zest_releaser_options=zest_releaser_options, | ||
) | ||
|
||
def setup_py(self): | ||
"""Update setup.py to current texts.""" | ||
setup_py = self.path / 'setup.py' | ||
setup_py_content = setup_py.read_text() | ||
for src, dest in SETUP_PY_REPLACEMENTS.items(): | ||
setup_py_content = setup_py_content.replace(src, dest) | ||
setup_py.write_text(setup_py_content) | ||
|
||
def gitignore(self): | ||
git_ignore = self.meta_cfg['git'].get('ignore', []) | ||
|
||
|
@@ -656,6 +671,7 @@ def configure(self): | |
|
||
self.pyproject_toml() | ||
self.setup_cfg() | ||
self.setup_py() | ||
self.gitignore() | ||
self.pre_commit_config_yaml() | ||
self.copy_with_meta( | ||
|