diff options
| author | Benoit Pierre <benoit.pierre@gmail.com> | 2018-08-21 01:54:51 +0200 |
|---|---|---|
| committer | Benoit Pierre <benoit.pierre@gmail.com> | 2018-08-21 02:01:22 +0200 |
| commit | 337c008c33ab5799911cc7a8f4e8ff93e715a73b (patch) | |
| tree | 1f7a25972132ff78456bc3c05a208ff79faa5b7a /setuptools/command | |
| parent | d63b6b5b9fb63c0bfb83fb91edee10114c932e54 (diff) | |
| download | python-setuptools-git-337c008c33ab5799911cc7a8f4e8ff93e715a73b.tar.gz | |
setuptools: fix regression with `egg_info` command
Ensure version is tagged only once.
Diffstat (limited to 'setuptools/command')
| -rw-r--r-- | setuptools/command/egg_info.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 5fd6c888..74350cbd 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -160,7 +160,9 @@ class egg_info(InfoCommon, Command): def initialize_options(self): self.egg_base = None + self.egg_name = None self.egg_info = None + self.egg_version = None self.broken_egg_info = False #################################### @@ -188,15 +190,13 @@ class egg_info(InfoCommon, Command): egg_info['tag_date'] = 0 edit_config(filename, dict(egg_info=egg_info)) - @property - def egg_name(self): - return self.name - - @property - def egg_version(self): - return self.tagged_version() - def finalize_options(self): + # Note: we need to capture the current value returned + # by `self.tagged_version()`, so we can later update + # `self.distribution.metadata.version` without + # repercussions. + self.egg_name = self.name + self.egg_version = self.tagged_version() parsed_version = parse_version(self.egg_version) try: |
