https://github.com/lrq3000/dummypiplinereturnbug
Minimal example showing that pip install -e git+... changes line returns in both text and binary files at some point in the unpacking process on Windows OSes
https://github.com/lrq3000/dummypiplinereturnbug
Last synced: 8 months ago
JSON representation
Minimal example showing that pip install -e git+... changes line returns in both text and binary files at some point in the unpacking process on Windows OSes
- Host: GitHub
- URL: https://github.com/lrq3000/dummypiplinereturnbug
- Owner: lrq3000
- License: mit
- Created: 2023-04-11T22:59:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-14T18:40:29.000Z (over 2 years ago)
- Last Synced: 2025-02-15T18:59:02.055Z (8 months ago)
- Language: Python
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dummypiplinereturnbug
Minimal example showing that `pip install -e git+...` changes line returns in both text and binary files at some point in the unpacking process on Windows OSesSee the GitHub Action `cibuild-downstream.yml` and run it, it should fail in the `windows-latest` OS, but not in others.
You may try to reproduce on your machine (although I was not successful - maybe it only fails on windows-2019?) with the following commands:
```
pip install --upgrade --editable git+https://github.com/lrq3000/dummypiplinereturnbug/tree/9a6df3d9b2975c894b017543e8195cc46e013093[test] --verbose
pytest src/dummypiplinereturnbug
```Tested with pip v23.0.1
See this pip issue: https://github.com/pypa/pip/issues/11952
The issue stems from git's default automatic crlf conversion/normalization settings.
The solution is to create a `.gitattributes` file at the root of the git repository, and set inside: `* -text`, which forces git to consider all files in the repository as binary and hence avoid converting line returns, they are kept as-is.
## LICENSE
MIT License