Skip to content

Commit

Permalink
Revert removal of license_file
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p committed May 22, 2021
1 parent 15565d1 commit 87e487e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions setuptools/dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ class Distribution(_Distribution):
'long_description_content_type': lambda: None,
'project_urls': dict,
'provides_extras': ordered_set.OrderedSet,
'license_file': lambda: None,
'license_files': lambda: None,
}

Expand Down Expand Up @@ -576,10 +577,7 @@ def _finalize_license_files(self):
license_files: Optional[List[str]] = self.metadata.license_files
patterns: List[str] = license_files if license_files else []

license_file: Optional[str] = None
opts = self.get_option_dict('metadata')
if 'license_file' in opts:
license_file = opts['license_file'][1]
license_file: Optional[str] = self.metadata.license_file
if license_file and license_file not in patterns:
patterns.append(license_file)

Expand Down

0 comments on commit 87e487e

Please sign in to comment.