-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix packages= so top_level.txt is correct #786
Conversation
Codecov Report
@@ Coverage Diff @@
## master #786 +/- ##
=======================================
Coverage 98.77% 98.77%
=======================================
Files 67 67
Lines 7565 7565
=======================================
Hits 7472 7472
Misses 93 93 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
So when I put the package together I had only a rudimentary understanding of setuptools. I took inspiration from DRF there. That snipped came from DRF/yasg, but I don't know how I ended up using this after it got patched out over a year prior ( encode/django-rest-framework@abef84f ). How did this negatively impact you, since there have been no issues raised until now? |
I'm doing some rudimentary validation of packages by importing the namespaces defined in $ python3 -c '__import__("drf_spectacular/contrib")'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'drf_spectacular/contrib' |
I see. thanks for clarifying. I guess if this works for DRF, it should work for us too. thanks @asottile-sentry |
so now for no apparent reason, setuptools includes more files ( do you have an idea where this different behavior is coming from? |
which package? what command is being run? (fwiw this package doesn't experience that for me): $ python -m build --sdist > /dev/null
$ tar --list -f dist/drf-spectacular-0.24.0.tar.gz | grep gitig
$ |
Sry, false alarm. For some reason, those files are packaged on my dev machine. However, in the github action, from where we publish, they are not included. The command is python setup.py sdist bdist_wheel
tar --list -f dist/drf-spectacular-0.24.0.tar.gz with |
can you run this command?
just curious what the exact difference is between the two which might give a hint -- also perhaps the path of the working directory might be useful too |
sure thing. it is like I said earlier, some regular files and some "special" files. all those files should be checked out in the GH action working dir. I usually don't check on this. I only did it this time because we changed something. Turns out this has nothing to do without your specific change. I just compared a locally build So nothing has changed, and this is all fine. You don't need to waste more time on this, though I am still curious. (venv) ➜ drf-spectacular git:(master) ✗ diff -ur <(tar --list -f dist/drf-spectacular-0.24.0.tar.gz) <(curl --silent --location https://files.pythonhosted.org/packages/b9/16/38c215e9677f8439a0d0e4acc33398916b3c4aff8bac806963a3ce83abf1/drf-spectacular-0.24.0.tar.gz | tar --list -zf -) --- /proc/self/fd/11 2022-09-14 16:49:28.742882388 +0200
+++ /proc/self/fd/18 2022-09-14 16:49:28.742882388 +0200
@@ -1,18 +1,10 @@
drf-spectacular-0.24.0/
-drf-spectacular-0.24.0/.github/
-drf-spectacular-0.24.0/.github/ISSUE_TEMPLATE/
-drf-spectacular-0.24.0/.github/ISSUE_TEMPLATE/bug_report.md
-drf-spectacular-0.24.0/.github/workflows/
-drf-spectacular-0.24.0/.github/workflows/ci.yml
-drf-spectacular-0.24.0/.github/workflows/publish.yml
-drf-spectacular-0.24.0/.gitignore
drf-spectacular-0.24.0/CHANGELOG.rst
drf-spectacular-0.24.0/CONTRIBUTING.rst
drf-spectacular-0.24.0/LICENSE
drf-spectacular-0.24.0/MANIFEST.in
drf-spectacular-0.24.0/PKG-INFO
drf-spectacular-0.24.0/README.rst
-drf-spectacular-0.24.0/codecov.yml
drf-spectacular-0.24.0/docs/
drf-spectacular-0.24.0/docs/Makefile
drf-spectacular-0.24.0/docs/blueprints/
@@ -90,18 +82,12 @@
drf-spectacular-0.24.0/drf_spectacular.egg-info/dependency_links.txt
drf-spectacular-0.24.0/drf_spectacular.egg-info/requires.txt
drf-spectacular-0.24.0/drf_spectacular.egg-info/top_level.txt
-drf-spectacular-0.24.0/helper/
-drf-spectacular-0.24.0/helper/changelog.sh
-drf-spectacular-0.24.0/helper/generate-client.sh
-drf-spectacular-0.24.0/helper/github-ci-vars.py
-drf-spectacular-0.24.0/helper/swagger-ui.sh
drf-spectacular-0.24.0/requirements/
drf-spectacular-0.24.0/requirements/base.txt
drf-spectacular-0.24.0/requirements/docs.txt
drf-spectacular-0.24.0/requirements/optionals.txt
drf-spectacular-0.24.0/requirements/packaging.txt
drf-spectacular-0.24.0/requirements/testing.txt
-drf-spectacular-0.24.0/requirements.txt
drf-spectacular-0.24.0/runtests.py
drf-spectacular-0.24.0/setup.cfg
drf-spectacular-0.24.0/setup.py
@@ -185,4 +171,3 @@
drf-spectacular-0.24.0/tests/test_view.py
drf-spectacular-0.24.0/tests/test_warnings.py
drf-spectacular-0.24.0/tests/urls.py
-drf-spectacular-0.24.0/tox.ini
|
did you happen to accidentally have |
nope pip freeze --all | grep setup
setuptools==65.3.0 |
what else all is in |
I created a fresh venv only installing lets put this one aside for now. I just looked into the console dump of the GH action for clues and found an actual problem related to the change 😄 . I checked that this was not occurring in the console dump of the last release.
|
packages
is meant to be a list ofdotted.names
but the current code putsdirectory/names
into that setting. this causes setuptools to produce an incorrecttop_level.txt
:after using the builtin setuptools mechanism for this,
top_level.txt
is correct: