Skip to content
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

bdist_wheel upload failes for python3 #279

Closed
thilo-maurer opened this issue Jul 25, 2018 · 4 comments
Closed

bdist_wheel upload failes for python3 #279

thilo-maurer opened this issue Jul 25, 2018 · 4 comments
Assignees
Labels
hygiene priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@thilo-maurer
Copy link
Contributor

After

pip3 download google-auth --no-binary :all:

then extracting the package, then

  • build good
  • upload failes, when using python3 (python2 is fine)

Reason is that in this projects's setup.py line 45, argument classifiers should be an array, not a tuple. Replacing ( by [ fixes the issue.

See log below:

root@host:/build/google-auth-1.5.0.tar.gz.extracted/google-auth-1.5.0# python3 setup.py bdist_wheel upload -r artifactory
running bdist_wheel
running build
running build_py
installing to build/bdist.linux-ppc64le/wheel
running install
running install_lib
Skipping installation of build/bdist.linux-ppc64le/wheel/google/__init__.py (namespace package)
copying google/auth/iam.py -> build/bdist.linux-ppc64le/wheel/google/auth
copying google/auth/environment_vars.py -> build/bdist.linux-ppc64le/wheel/google/auth
copying google/auth/exceptions.py -> build/bdist.linux-ppc64le/wheel/google/auth
copying google/auth/credentials.py -> build/bdist.linux-ppc64le/wheel/google/auth
copying google/auth/_helpers.py -> build/bdist.linux-ppc64le/wheel/google/auth
copying google/auth/jwt.py -> build/bdist.linux-ppc64le/wheel/google/auth
copying google/auth/_oauth2client.py -> build/bdist.linux-ppc64le/wheel/google/auth
copying google/auth/_cloud_sdk.py -> build/bdist.linux-ppc64le/wheel/google/auth
copying google/auth/_default.py -> build/bdist.linux-ppc64le/wheel/google/auth
copying google/auth/__init__.py -> build/bdist.linux-ppc64le/wheel/google/auth
copying google/auth/app_engine.py -> build/bdist.linux-ppc64le/wheel/google/auth
copying google/auth/_service_account_info.py -> build/bdist.linux-ppc64le/wheel/google/auth
copying google/auth/crypt/_python_rsa.py -> build/bdist.linux-ppc64le/wheel/google/auth/crypt
copying google/auth/crypt/base.py -> build/bdist.linux-ppc64le/wheel/google/auth/crypt
copying google/auth/crypt/_helpers.py -> build/bdist.linux-ppc64le/wheel/google/auth/crypt
copying google/auth/crypt/__init__.py -> build/bdist.linux-ppc64le/wheel/google/auth/crypt
copying google/auth/crypt/_cryptography_rsa.py -> build/bdist.linux-ppc64le/wheel/google/auth/crypt
copying google/auth/crypt/rsa.py -> build/bdist.linux-ppc64le/wheel/google/auth/crypt
copying google/auth/transport/grpc.py -> build/bdist.linux-ppc64le/wheel/google/auth/transport
copying google/auth/transport/requests.py -> build/bdist.linux-ppc64le/wheel/google/auth/transport
copying google/auth/transport/_http_client.py -> build/bdist.linux-ppc64le/wheel/google/auth/transport
copying google/auth/transport/__init__.py -> build/bdist.linux-ppc64le/wheel/google/auth/transport
copying google/auth/transport/urllib3.py -> build/bdist.linux-ppc64le/wheel/google/auth/transport
copying google/auth/compute_engine/_metadata.py -> build/bdist.linux-ppc64le/wheel/google/auth/compute_engine
copying google/auth/compute_engine/credentials.py -> build/bdist.linux-ppc64le/wheel/google/auth/compute_engine
copying google/auth/compute_engine/__init__.py -> build/bdist.linux-ppc64le/wheel/google/auth/compute_engine
copying google/oauth2/credentials.py -> build/bdist.linux-ppc64le/wheel/google/oauth2
copying google/oauth2/service_account.py -> build/bdist.linux-ppc64le/wheel/google/oauth2
copying google/oauth2/__init__.py -> build/bdist.linux-ppc64le/wheel/google/oauth2
copying google/oauth2/id_token.py -> build/bdist.linux-ppc64le/wheel/google/oauth2
copying google/oauth2/_client.py -> build/bdist.linux-ppc64le/wheel/google/oauth2
running install_egg_info
running egg_info
writing google_auth.egg-info/PKG-INFO
writing dependency_links to google_auth.egg-info/dependency_links.txt
writing namespace_packages to google_auth.egg-info/namespace_packages.txt
writing requirements to google_auth.egg-info/requires.txt
writing top-level names to google_auth.egg-info/top_level.txt
reading manifest file 'google_auth.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '__pycache__' found anywhere in distribution
writing manifest file 'google_auth.egg-info/SOURCES.txt'
Copying google_auth.egg-info to build/bdist.linux-ppc64le/wheel/google_auth-1.5.0-py3.6.egg-info
Installing build/bdist.linux-ppc64le/wheel/google_auth-1.5.0-py3.6-nspkg.pth
running install_scripts
creating build/bdist.linux-ppc64le/wheel/google_auth-1.5.0.dist-info/WHEEL
creating '/build/google-auth-1.5.0.tar.gz.extracted/google-auth-1.5.0/dist/google_auth-1.5.0-py2.py3-none-any.whl' and adding '.' to it
adding 'google_auth-1.5.0-py3.6-nspkg.pth'
adding 'google/auth/__init__.py'
adding 'google/auth/_cloud_sdk.py'
adding 'google/auth/_default.py'
adding 'google/auth/_helpers.py'
adding 'google/auth/_oauth2client.py'
adding 'google/auth/_service_account_info.py'
adding 'google/auth/app_engine.py'
adding 'google/auth/credentials.py'
adding 'google/auth/environment_vars.py'
adding 'google/auth/exceptions.py'
adding 'google/auth/iam.py'
adding 'google/auth/jwt.py'
adding 'google/auth/compute_engine/__init__.py'
adding 'google/auth/compute_engine/_metadata.py'
adding 'google/auth/compute_engine/credentials.py'
adding 'google/auth/crypt/__init__.py'
adding 'google/auth/crypt/_cryptography_rsa.py'
adding 'google/auth/crypt/_helpers.py'
adding 'google/auth/crypt/_python_rsa.py'
adding 'google/auth/crypt/base.py'
adding 'google/auth/crypt/rsa.py'
adding 'google/auth/transport/__init__.py'
adding 'google/auth/transport/_http_client.py'
adding 'google/auth/transport/grpc.py'
adding 'google/auth/transport/requests.py'
adding 'google/auth/transport/urllib3.py'
adding 'google/oauth2/__init__.py'
adding 'google/oauth2/_client.py'
adding 'google/oauth2/credentials.py'
adding 'google/oauth2/id_token.py'
adding 'google/oauth2/service_account.py'
adding 'google_auth-1.5.0.dist-info/namespace_packages.txt'
adding 'google_auth-1.5.0.dist-info/top_level.txt'
adding 'google_auth-1.5.0.dist-info/WHEEL'
adding 'google_auth-1.5.0.dist-info/METADATA'
adding 'google_auth-1.5.0.dist-info/RECORD'
removing build/bdist.linux-ppc64le/wheel
running upload
Traceback (most recent call last):
  File "setup.py", line 59, in <module>
    'Topic :: Internet :: WWW/HTTP',
  File "/usr/local/lib/python3.6/site-packages/setuptools/__init__.py", line 131, in setup
    return distutils.core.setup(**attrs)
  File "/usr/local/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/local/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python3.6/distutils/command/upload.py", line 64, in run
    self.upload_file(command, pyversion, filename)
  File "/usr/local/lib/python3.6/distutils/command/upload.py", line 162, in upload_file
    body.write(value)
TypeError: a bytes-like object is required, not 'str'
@theacodes
Copy link
Contributor

Why are you attempting to upload this package?

Seems if you use twine you probably won't run into this issue.

@thilo-maurer
Copy link
Contributor Author

Yes, twine may be fine. - Nevertheless, there is this bug.

@theacodes
Copy link
Contributor

Seems like a simple fix, wanna submit a PR and get the credit for fixing it?

@theacodes theacodes added hygiene priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jul 25, 2018
@thilo-maurer
Copy link
Contributor Author

Merged with #280

@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hygiene priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants