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 misbehaves on Windows newlines #1126

Open
boppreh opened this issue Aug 5, 2017 · 9 comments
Open

bdist_wheel misbehaves on Windows newlines #1126

boppreh opened this issue Aug 5, 2017 · 9 comments
Labels
bug Needs Investigation Issues which are likely in scope but need investigation to figure out the cause Needs Repro Issues that need a reproducible example.

Comments

@boppreh
Copy link

boppreh commented Aug 5, 2017

Environment

Python 3.6 64 bits, Windows 10.

>>> setuptools.__version__
'36.2.6'

Steps to reproduce

setup.py

from setuptools import setup
setup(
    name='package',
    version='0.0.0',
    long_description='first line\r\nsecond line',
)
$ python setup.py bdist_wheel
running bdist_wheel
running build
installing to build\bdist.win-amd64\wheel
running install
running install_egg_info
running egg_info
writing package.egg-info\PKG-INFO
writing dependency_links to package.egg-info\dependency_links.txt
writing top-level names to package.egg-info\top_level.txt
reading manifest file 'package.egg-info\SOURCES.txt'
writing manifest file 'package.egg-info\SOURCES.txt'
Copying package.egg-info to build\bdist.win-amd64\wheel\.\package-0.0.0-py3.6.egg-info
running install_scripts
creating build\bdist.win-amd64\wheel\package-0.0.0.dist-info\WHEEL

Observed behavior

dist\package-0.0.0-py3-none-any.whl\package-0.0.0.dist-info\METADATA

Metadata-Version: 2.0
Name: package
Version: 0.0.0
Summary: UNKNOWN
Home-page: UNKNOWN
Author: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN

first line

Expected behavior

METADATA should include "second line", or an error raised during build.

Notes

python setup.py sdist generates a file with both lines correctly in the description field of PKG-INFO, but they maintain their '\r\n' line endings while the rest of the file uses only \n. This is very unusual and should probably be changed or warned against.

I'm not sure if this issue should be reported here or in https://github.com/pypa/wheel, so apologies if I'm in the wrong place.

@ghost
Copy link

ghost commented Aug 22, 2017

I discovered this on msabramo/setuptools-markdown#11.

@maphew
Copy link

maphew commented Nov 9, 2017

I have a similar problem, but only in py3. When I build with py27 the complete string is included. See JessicaTegner/pypandoc#147

@jaraco
Copy link
Member

jaraco commented Nov 12, 2017

I worked on this a bit today, but ended up running up against #1196 and pypa/wheel#206.

The thing I'm after - where are the lines being stripped? It should be possible by tracing a dist_info invocation on the setup.py presented above to ascertain where the failure lies.

@ghost
Copy link

ghost commented Nov 12, 2017

I traced this into wheel and then figured it would be easier to patch downstream.

@agronholm
Copy link
Contributor

This can be closed now, yes?

@boppreh
Copy link
Author

boppreh commented Jun 5, 2018

@agronholm I still experience the problem. Xoviat says the problem has been traced into "wheel", but I don't see an open issue, or reference to the offending piece of code. I would not rather close this until the problem is fixed, or a new issue is created.

@agronholm
Copy link
Contributor

Why not open an issue against wheel then? Provide instructions to reproduce and I'll fix it.

@boppreh
Copy link
Author

boppreh commented Jun 5, 2018

I haven't opened an issue against wheel because I don't know if it's a wheel problem or not. The only indication I have is the comment above, from a deleted account, made in 2017.

I've also implemented my own workaround (manually removing Windows linebreaks), so feel free to take ownership of the issue.

@agronholm
Copy link
Contributor

I can't reproduce this on Linux. Will try again with Windows 10.

@pganssle pganssle added Needs Triage Issues that need to be evaluated for severity and status. bug Needs Repro Issues that need a reproducible example. Needs Investigation Issues which are likely in scope but need investigation to figure out the cause and removed Needs Triage Issues that need to be evaluated for severity and status. labels Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Needs Investigation Issues which are likely in scope but need investigation to figure out the cause Needs Repro Issues that need a reproducible example.
Projects
None yet
Development

No branches or pull requests

5 participants