-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
If binary wheel is not available to the platform, it would be install from sdist. One issue found that setup.py will remove src and copy from ../src if it is present.
i.e. installation from sdist would install files out of the sdist archive.
e.g. pip install ....path/to/sxtwl-2.0.7.tar.gz
setup.py would be run in directory /tmp/pip-req-build-g4txwujj on linux. If /tmp/src is present, files under src in sdist would be erased and replaced (by whatever under /tmp/src/)
as a test:
# on linux
mkdir /tmp/src
# (create virtual environment and install setup tools)
# the following would fail:
pip install ....path/to/sxtwl-2.0.7.tar.gz
Similar issue found if it is installed by uv; setup.py is run in directory: ~/.cache/uv/sdists-v6/path/random1/random2/src, that means ../src is present.
Any idea to change as below:
- remove
/srcfrompython/.gitignore - create symbolic link
python/srcto../src - remove below from
setup.py
if os.path.isdir("../src"):
if os.path.isdir("src"):
shutil.rmtree("src")
shutil.copytree("../src", "src")Metadata
Metadata
Assignees
Labels
No labels