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

Homebrew shebang in the package on PyPI #116

Closed
lsde opened this issue Oct 17, 2018 · 3 comments
Closed

Homebrew shebang in the package on PyPI #116

lsde opened this issue Oct 17, 2018 · 3 comments

Comments

@lsde
Copy link

lsde commented Oct 17, 2018

Hi,
there is a shebang from Homebrew in the script in the bagit.py package downloaded from PyPI.
This effectivelly breaks the functionality if not run from within Homebrew, like other POSIX systems, Windows, non-homebrew OSX etc..

$ diff bagit.py bagit-1.7.0.data/scripts/bagit.py 
1c1
< #!/usr/bin/env python
---
> #!/usr/local/opt/python@2/bin/python2.7
cat bagit-1.7.0.dist-info/RECORD 
bagit.py,sha256=MvoFUMBP7sS4AjIT5hR9ktF7bKfHqvQdbsqDfXKn_zQ,54756
bagit-1.7.0.data/data/locale/en/LC_MESSAGES/bagit-python.mo,sha256=sLgIsf2Q1e6b4zTOHgfaC5zlZLGp4mTfYRb8PkUco2k,2849
bagit-1.7.0.data/scripts/bagit.py,sha256=x51j6TtA2AFzJOhghKQW5sxTot-lRAreOjOd72YkqKs,54774
bagit-1.7.0.dist-info/METADATA,sha256=qhxnDsxtmVTjSp5VO9xLAcVNTIXjewaK0OtlKj5zkBA,8077
bagit-1.7.0.dist-info/RECORD,,
bagit-1.7.0.dist-info/WHEEL,sha256=gduuPyBvFJQSQ0zdyxF7k0zynDXbIbvg5ZBHoXum5uk,110
bagit-1.7.0.dist-info/top_level.txt,sha256=f288ippe7ERSzETsEftza1dXq61Z4zFSXDgaTF6djpE,6

Even the hashes and filesizes are different..perhaps a manual PyPI push from the Homebrew environment?
I would suggest to create an os-independent Wheel..that's why we write tools in Python, right? :)

But other than this, thanks for all the great work!

@acdha
Copy link
Member

acdha commented Oct 17, 2018

Looks like something changed to cause bdist_wheel to include the shebang. I've deleted the wheel entirely since the source install is almost as fast.

@acdha
Copy link
Member

acdha commented Oct 17, 2018

That's really odd: bdist_wheel does not generate an archive including a shebang when rerun from the same source folder using the same version. I'm not sure what caused that last time but I'll have to check it next time we do a release.

@lsde
Copy link
Author

lsde commented Oct 17, 2018

Right, now it works well without the wheel.
Let's hope it was just once-in-a-lifetime glitch in the release process.. :)

Closing this now..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants