[BUG] setuptools 84.0.0 no longer preserves executable bit on package_data files in wheels
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
setuptools version
84.0.0
Python version
Python 3.12, 3.14
OS
RHEL8, Ubuntu 24.04
Additional environment information
No response
Description
Since setuptools 84.0.0, executable permission bits (e.g. +x on scripts included via package_data ) are silently dropped from wheels. setuptools 83.0.0 preserves them correctly.
Expected behavior
Mode bits should not be changed from 83.0.0 to 84.0.0
How to Reproduce
mkdir pkg
cat << EOF > pkg/pyproject.toml
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "mypkg"
version = "0.0.1"
[tool.setuptools.package-data]
mypkg = ["scripts/*"]
EOF
mkdir -p pkg/mypkg/scripts
printf '#!/usr/bin/env python\nprint("hi")\n' > pkg/mypkg/scripts/some_script.py
chmod 755 pkg/mypkg/scripts/some_script.py
touch pkg/mypkg/__init__.py
python -m venv venv83 && venv83/bin/pip install setuptools==83.0.0 build
python -m venv venv84 && venv84/bin/pip install setuptools==84.0.0 build
cd pkg
../venv83/bin/python -m build --wheel --no-isolation -o ../dist83 .
../venv84/bin/python -m build --wheel --no-isolation -o ../dist84 .
cd ..
unzip -Z -l dist83/*.whl | grep some_script
unzip -Z -l dist84/*.whl | grep some_script
Output
$ unzip -Z -l dist83/*.whl | grep some_script
-rwxr-xr-x 2.0 unx 34 b- 36 defN 26-Aug-10 07:28 mypkg/scripts/some_script.py
$ unzip -Z -l dist84/*.whl | grep some_script
-rw-rw-r-- 2.0 unx 34 b- 36 defN 26-Aug-10 07:28 mypkg/scripts/some_script.py
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the supplied reproduction with setuptools 83.0.0 and 84.0.0, focusing on the package's pyproject.toml and mypkg/scripts/some_script.py. Trace the wheel-building path responsible for package_data permissions and add coverage for the executable-bit regression. Done means the generated wheel preserves the script's 755 mode as in 83.0.0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100