-
Notifications
You must be signed in to change notification settings - Fork 892
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
PyPI package is missing Grammar.txt #1107
Comments
Strange. Are the other files present in that directory? or are just the *.txt files gone? |
I have not reproduced this on GitHub Codespaces, pipx (Ubuntu and Windows) or poetry virtualenv (Ubuntu and Windows). What is the repro environment (including versions and package manager)? |
Linux + Python 3.10 + pip install + wheel |
From #1108 looks like this is affecting Homebrew, but that's insufficient information to determine a repro. |
I am trying to package v0.40.0 for PkgSrc (http://pkgsrc.org) and I need the source distfile, but it does not contain Grammar.txt. Here's the proof:
|
Confirmed, the sdist on pypi.org does not have the Grammer files. Local testing shows that with |
@bwendling , what is the reproduction environment for building the sdist for publishing to pypi? I'm getting a different output locally. Looks like on pypi.org it's built against metadata-version 1.2 and for myself locally it's 2.1. |
I create it on a MacBook Pro. Nothing interesting about the environment. Just execute |
@bwendling What version of python and setup tools? |
Python 3.9 and here's the pip version list:
|
I updated things and pushed a v0.40.1. Could you check it out please? |
@bwendling I think that worked: # cd "$(mktemp -d)"
# wget https://files.pythonhosted.org/packages/7a/cb/7675e1d2788ce93246f8c2e0e6ed00019c86853f92dc9226a90e0e1a1e95/yapf-0.40.0.tar.gz
# wget https://files.pythonhosted.org/packages/e0/7a/9020bfa17d294b5d0d8bf26bb175ad4c90d1e3ad4039001f621ef046cb06/yapf-0.40.1.tar.gz
# tar xf yapf-0.40.0.tar.gz
# tar xf yapf-0.40.1.tar.gz
# diff -r -q yapf-0.40.{0,1} | grep Only
Only in yapf-0.40.1/third_party/yapf_third_party/yapf_diff: LICENSE
Only in yapf-0.40.1/third_party/yapf_third_party/_ylib2to3: Grammar.txt
Only in yapf-0.40.1/third_party/yapf_third_party/_ylib2to3: LICENSE
Only in yapf-0.40.1/third_party/yapf_third_party/_ylib2to3: PatternGrammar.txt What was the fix — upgrading setuptools? |
What should I do to get this patch merged? We still need it for 0.40.1 release |
@chenrui333 cannot confirm for setuptools 67.8.0 on Linux (proof below). Could you elaborate what "we still need" means in detail? For proof on Linux: # cd "$(mktemp -d)"
# git clone --depth 1 https://github.com/google/yapf
# cd yapf/
# git rev-parse HEAD
54c679d4060a75d733bc96bacaab78c48710b785
# python3.10 -m venv venv
# source venv/bin/activate
# python -c 'import setuptools; print(setuptools.__version__)'
67.8.0
# rm -Rf build/ *.egg-info/ && python setup.py sdist
# tar tf dist/yapf-0.40.1.tar.gz | grep -i grammar
yapf-0.40.1/third_party/yapf_third_party/_ylib2to3/Grammar.txt
yapf-0.40.1/third_party/yapf_third_party/_ylib2to3/PatternGrammar.txt
yapf-0.40.1/third_party/yapf_third_party/_ylib2to3/pgen2/grammar.py |
@hartwork Looks like you have them now in the 0.41.1 release, if possible, can you also point us to the related changes? |
@chenrui333 I didn't do the upload and there are no relevant changes in Git according to v.40.0...v0.40.1 . |
ah ok, then you might still with my patch PR, but I will wait for the confirmation from bwendling first. Thanks! |
I played with different versions of setuptools now and found that it takes setuptools >=58.5.0 to work. I have created a pull request #1115 to make sure that future releases will use at least that version so that this issue cannot happen again. @bwendling can you confirm? |
Yeah. :-) |
@chenrui333 The fix was to upgrade my |
The text was updated successfully, but these errors were encountered: