Skip to content

Commit

Permalink
Stop writing License-File
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja committed Dec 17, 2024
1 parent cc43212 commit 56dd871
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setuptools/_core_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def write_field(key, value):
if self.long_description_content_type:
write_field('Description-Content-Type', self.long_description_content_type)

self._write_list(file, 'License-File', self.license_files or [])
# self._write_list(file, 'License-File', self.license_files or [])
_write_requirements(self, file)

long_description = self.get_long_description()
Expand Down
7 changes: 4 additions & 3 deletions setuptools/tests/test_egg_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -1051,11 +1051,12 @@ def test_license_file_attr_pkg_info(self, tmpdir_cwd, env):
line for line in pkg_info_lines if line.startswith('License-File:')
]

assert license_file_lines == []
# Only 'NOTICE', LICENSE-ABC', and 'LICENSE-XYZ' should have been matched
# Also assert that order from license_files is keeped
assert "License-File: NOTICE" == license_file_lines[0]
assert "License-File: LICENSE-ABC" in license_file_lines[1:]
assert "License-File: LICENSE-XYZ" in license_file_lines[1:]
# assert "License-File: NOTICE" == license_file_lines[0]
# assert "License-File: LICENSE-ABC" in license_file_lines[1:]
# assert "License-File: LICENSE-XYZ" in license_file_lines[1:]

def test_metadata_version(self, tmpdir_cwd, env):
"""Make sure latest metadata version is used by default."""
Expand Down

0 comments on commit 56dd871

Please sign in to comment.