-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Needs DiscussionIssues where the implementation still needs to be discussed.Issues where the implementation still needs to be discussed.
Description
setuptools version
77.0.1
Python version
any
OS
any
Additional environment information
No response
Description
The new license file validation logic from #4838 breaks projects that have a non-standard layout. Projects like Apache Arrow or Triton don't have their Python code in the root directory of the sources. Instead it is in a subdirectory, typically called python
. For example Apache Arrow has a python/setup.cfg
with
[metadata]
license_files =
../LICENSE.txt
../NOTICE.txt
Expected behavior
setuptools does not break software that uses a non-standard layout and reference license files from a parent directory.
How to Reproduce
- download and unpack https://github.com/apache/arrow/archive/refs/tags/apache-arrow-19.0.1.tar.gz
cd arrow-apache-arrow-19.0.1/python
python3 -m venv venv
. venv/bin/activate
pip install -U setuptools cython
python3 setup.py
Output
Traceback (most recent call last):
File "/home/cheimes/tmp/arrow-apache-arrow-19.0.1/python/setup.py", line 399, in <module>
setup(
File "/home/cheimes/tmp/arrow-apache-arrow-19.0.1/python/venv/lib64/python3.9/site-packages/setuptools/__init__.py", line 116, in setup
_install_setup_requires(attrs)
File "/home/cheimes/tmp/arrow-apache-arrow-19.0.1/python/venv/lib64/python3.9/site-packages/setuptools/__init__.py", line 87, in _install_setup_requires
dist.parse_config_files(ignore_option_errors=True)
File "/home/cheimes/tmp/arrow-apache-arrow-19.0.1/python/venv/lib64/python3.9/site-packages/setuptools/dist.py", line 752, in parse_config_files
self._finalize_license_files()
File "/home/cheimes/tmp/arrow-apache-arrow-19.0.1/python/venv/lib64/python3.9/site-packages/setuptools/dist.py", line 466, in _finalize_license_files
self.metadata.license_files = list(unique_everseen(files))
File "/home/cheimes/tmp/arrow-apache-arrow-19.0.1/python/venv/lib64/python3.9/site-packages/setuptools/_vendor/more_itertools/recipes.py", line 511, in unique_everseen
for element in iterable:
File "/home/cheimes/tmp/arrow-apache-arrow-19.0.1/python/venv/lib64/python3.9/site-packages/setuptools/dist.py", line 483, in <genexpr>
for path in sorted(cls._find_pattern(pattern, enforce_match))
File "/home/cheimes/tmp/arrow-apache-arrow-19.0.1/python/venv/lib64/python3.9/site-packages/setuptools/dist.py", line 506, in _find_pattern
raise InvalidConfigError(f"Pattern {pattern!r} cannot contain '..'")
setuptools.errors.InvalidConfigError: Pattern '../LICENSE.txt' cannot contain '..'
nxlouie, calohmn, btschwertfeger, wenns, alsimfer and 5 more
Metadata
Metadata
Assignees
Labels
Needs DiscussionIssues where the implementation still needs to be discussed.Issues where the implementation still needs to be discussed.