Package considered zip_safe although package_data is used
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Originally reported by: xflr6 (Bitbucket: xflr6, GitHub: xflr6)
The description of zip_safe inference in the docs:
it will consider the project unsafe if it contains any C extensions or datafiles whatsoever.
suggests that a package with a setup.py like this
from setuptools import setup, find_packages
setup(
name='spam',
version='0.1.dev0',
packages=find_packages(),
package_data={'spam': ['spam.txt']},
)
should be considered zip_safe=False.
However, when such a package is installed via python setup.py install, it ends up as a zipped egg:
copying build/lib.linux-i686-2.7/spam/spam.txt -> build/bdist.linux-i686/egg/spam
copying build/lib.linux-i686-2.7/spam/__init__.py -> build/bdist.linux-i686/egg/spam
(...)
Processing spam-0.1.dev0-py2.7.egg
Copying spam-0.1.dev0-py2.7.egg to /tmp/venv/lib/python2.7/site-packages
Adding spam 0.1.dev0 to easy-install.pth file
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 with the zip_safe inference used by setup.py install, and reproduce the issue using the shown setup.py with package_data and spam.txt. Compare the behavior with the documentation's claim about data files; done means the inference and installed egg behavior agree with the documented expectation.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100