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 regression for Python 2.7 #388

Closed
AWSjswinney opened this issue Dec 4, 2020 · 3 comments
Closed

bdist_wheel regression for Python 2.7 #388

AWSjswinney opened this issue Dec 4, 2020 · 3 comments
Labels

Comments

@AWSjswinney
Copy link

A recent change introduced a regression in the bdist_wheel command for Python 2.7

Here is a stack trace:

Traceback (most recent call last):
  File "setup.py", line 75, in <module>
    setup_requires=setup_requires
  File "/Users/travis/.pyenv/versions/2.7.15/lib/python2.7/site-packages/skbuild/setuptools_wrap.py", line 693, in setup
    return upstream_setup(*args, **kw)
  File "/Users/travis/.pyenv/versions/2.7.15/lib/python2.7/site-packages/setuptools/__init__.py", line 162, in setup
    return distutils.core.setup(**attrs)
  File "/Users/travis/.pyenv/versions/2.7.15/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/Users/travis/.pyenv/versions/2.7.15/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/Users/travis/.pyenv/versions/2.7.15/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/Users/travis/.pyenv/versions/2.7.15/lib/python2.7/site-packages/skbuild/command/bdist_wheel.py", line 41, in run
    super(bdist_wheel, self).run(*args, **kwargs)
  File "/Users/travis/.pyenv/versions/2.7.15/lib/python2.7/site-packages/wheel/bdist_wheel.py", line 353, in run
    self.write_wheelfile(distinfo_dir)
  File "/Users/travis/.pyenv/versions/2.7.15/lib/python2.7/site-packages/skbuild/command/bdist_wheel.py", line 78, in write_wheelfile
    super(bdist_wheel, self).write_wheelfile(wheelfile_base, generator)
  File "/Users/travis/.pyenv/versions/2.7.15/lib/python2.7/site-packages/wheel/bdist_wheel.py", line 393, in write_wheelfile
    BytesGenerator(buffer, maxheaderlen=0).flatten(msg)
  File "/Users/travis/.pyenv/versions/2.7.15/lib/python2.7/email/generator.py", line 83, in flatten
    self._write(msg)
  File "/Users/travis/.pyenv/versions/2.7.15/lib/python2.7/email/generator.py", line 115, in _write
    self._write_headers(msg)
  File "/Users/travis/.pyenv/versions/2.7.15/lib/python2.7/email/generator.py", line 145, in _write_headers
    print >> self._fp, v
TypeError: 'unicode' does not have the buffer interface

This is blocking Python 2.7 wheel builds for a recent pull request to scikit-build/ninja-python-distributions. You can see output from the CI builds there where it fails on all Python 2.7 wheel builds on various platforms.

Thanks for reviewing!

@agronholm agronholm added the bug label Dec 4, 2020
@agronholm
Copy link
Contributor

Odd that all the tests on 2.7 still passed. If you could help me figure out what went wrong, that would speed up the fix too.

@agronholm
Copy link
Contributor

agronholm commented Dec 4, 2020

Scikit-build seems to be the culprit here. It changes the "Generator" header to unicode (u'skbuild 0.11.1').

@AWSjswinney
Copy link
Author

Thanks for the quick fix. It's working again!

Linkid added a commit to Linkid/python-mixstream that referenced this issue Dec 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants