-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Setup function copies the entire directory into the dist #3246
Comments
Hi @freiburgermsu, thank you for reporting the problem.
Could you specify which version of setuptools you used to have installed in your machine when the
I cannot understand what you are reporting here. When I try the following steps, I cannot observe anything other than the cd $env:TEMP
git clone https://github.com/freiburgermsu/PDIpy.git
cd PDIpy
python -m virtualenv .venv
.\.venv\Scripts\python.exe -m pip install -U pip setuptools
.\.venv\Scripts\python.exe -m pip list
# Package Version
# ---------- -------
# pip 22.0.4
# setuptools 61.3.1
# wheel 0.37.1
.\.venv\Scripts\python.exe setup.py sdist
dir dist
# PDIpy-0.0.5.tar.gz
tar tf .\dist\PDIpy-0.0.5.tar.gz
# PDIpy-0.0.5/
# PDIpy-0.0.5/PDIpy.egg-info/
# PDIpy-0.0.5/PDIpy.egg-info/PKG-INFO
# PDIpy-0.0.5/PDIpy.egg-info/SOURCES.txt
# PDIpy-0.0.5/PDIpy.egg-info/dependency_links.txt
# PDIpy-0.0.5/PDIpy.egg-info/requires.txt
# PDIpy-0.0.5/PDIpy.egg-info/top_level.txt
# PDIpy-0.0.5/PKG-INFO
# PDIpy-0.0.5/README.rst
# PDIpy-0.0.5/pdipy/
# PDIpy-0.0.5/pdipy/__init__.py
# PDIpy-0.0.5/pdipy/parameters/
# PDIpy-0.0.5/pdipy/parameters/light.json
# PDIpy-0.0.5/pdipy/parameters/photosensitizers.json
# PDIpy-0.0.5/pdipy/parameters/wells.json
# PDIpy-0.0.5/pdipy/pdi.py
# PDIpy-0.0.5/setup.cfg
# PDIpy-0.0.5/setup.py
# PDIpy-0.0.5/test/
# PDIpy-0.0.5/test/__init__.py
# PDIpy-0.0.5/test/test_pdi.py Do you have a reproduction for the problem you are facing? |
Hello @abravalheri ,
|
I have a theory... Any chance you have When Could you try using a virtual environment as I suggested in #3246 (comment) to see if the problem persists? Alternatively you can also try the following: python -m pip install build
# Instead of `python setup.py sdist` use:
python -m build --sdist |
Hello @abravalheri , I followed the I indeed seem to have
Uninstalling |
Thank you very much for checking that. There is a chance some files were cached, if you are running @freiburgermsu is there any chance you can provide a minimal isolated reproducer for this issue so I can investigate the problem? (You can find information about minimal reproducers in: ref1 and ref2). For example, based on #3246 (comment) and #3246 (comment), I would expect one of the following snippets to be such a reproducer: cd $env:TEMP
rm -R -force .\PDIpy\
git clone https://github.com/freiburgermsu/PDIpy.git
cd PDIpy
python -m virtualenv .venv
.\.venv\Scripts\python.exe -m pip install -U pip setuptools
.\.venv\Scripts\python.exe setup.py sdist
tar tf .\dist\PDIpy-0.0.5.tar.gz OR cd $env:TEMP
rm -R -force .\PDIpy\
git clone https://github.com/freiburgermsu/PDIpy.git
cd PDIpy
python -m virtualenv .venv
.\.venv\Scripts\python.exe -m pip install -U build
.\.venv\Scripts\python.exe -m build --sdist
tar tf .\dist\PDIpy-0.0.5.tar.gz However, I cannot observe the behaviour you described. Please note that if we cannot find a minimal isolated reproducer, chances are the problem is being caused by circumstances unique to your machine, and that would be outside of the scope of this bug tracker. |
Im having the same issue on macOS 12 with python 3.9.12. Every directory in the project is being copied into lib/ when I run Here's a log of installing yaclog: and the wheel from its worth noting that it also includes Update: using |
Hi @drewcassidy, maybe that is being caused by cached files? Currently the recommended way of building the package is via Just for the sake of completeness, for the procedures you are using (other than |
Clearing the build directory fixed the issue. that makes sense, I was messing with package discovery and I guess it cached it with a bunch of files I didn't want I think there is still a bug here, since the cache should be cleared/updated instead of keeping old files around that shouldn't be there. Is the build directory handled by setuptools or something else? |
Thank you for checking out @drewcassidy . I understand that automatic invalidation of cache is a "nice to have" feature. If you would like to give a try and propose a PR, I would be more than happy to review it. Meanwhile note that this feature is not very relevant when considering the workflow recomended in the Quickstart docs: |
I was using |
☝️ meanwhile users can try |
Hello @abravalheri , Your suggestion of removing the Thank you for your patient troubleshooting :) |
Hey, thank you very much. Removing |
setuptools version
setuptools == 61.3.1
Python version
Python 3.8.10
OS
Windows 10
Additional environment information
No response
Description
This setup.py file
copies this entire directory into the dist folder, perplexingly including the examples folder that is neither mentioned in the setup.py file nor contains any script that could be perceived to be a package by
find_packages()
. This error is strangely also occurring with old setup.py files that previously worked perfectly. Changing or removing most of the arguments and values has been ineffectual.What in the setup file is erroneous, and how can it be resolved?
Expected behavior
A dist folder should be created that exclusively contains content from the
test
andpdipy
folders, which are specified in thesetup.py
file.How to Reproduce
python setup.py sdist
in Powershell.Output
The text was updated successfully, but these errors were encountered: