FS#45315 - [jython] Wrong shebang lines and name conflicts for scripts

Attached to Project: Community Packages
Opened by Chih-Hsuan Yen (yan12125) - Saturday, 13 June 2015, 16:23 GMT
Last edited by Chih-Hsuan Yen (yan12125) - Thursday, 09 April 2020, 03:53 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 7
Private No

Details

Description:

$ pip2.7
zsh: /opt/jython/bin/pip2.7: bad interpreter: /build/jython/pkg/jython/opt/jython/bin/jython: no such file or directory

The cause is obvious:

$ grep -r '^#!' /opt/jython/bin
/opt/jython/bin/jython:#!/usr/bin/env bash
/opt/jython/bin/pip2:#!/build/jython/pkg/jython/opt/jython/bin/jython
/opt/jython/bin/pip:#!/build/jython/pkg/jython/opt/jython/bin/jython
/opt/jython/bin/easy_install-2.7:#!/build/jython/pkg/jython/opt/jython/bin/jython
/opt/jython/bin/easy_install:#!/build/jython/pkg/jython/opt/jython/bin/jython
/opt/jython/bin/pip2.7:#!/build/jython/pkg/jython/opt/jython/bin/jython

They should be /opt/jython/bin/jython instead.

Also, I recommend renaming all scripts to have a suffix "-jython". For example pip2 => pip2-jython. This prevents name conflicts with /usr/bin/pip2 from extra/python2-pip.

Additional info:
community/jython 2.7.0-1
extra/python2-pip 7.0.3-1

Steps to reproduce:
This task depends upon

Closed by  Chih-Hsuan Yen (yan12125)
Thursday, 09 April 2020, 03:53 GMT
Reason for closing:  Fixed
Additional comments about closing:  jython 2.7.2-1
Comment by Sun Ning (sunng) - Sunday, 21 February 2016, 03:52 GMT
Better to rename jython's pip to something like pipjy or so.
I suggest to increase severity for this issue because it makes existed python installation unusable.
Comment by Eli Schwartz (eschwartz) - Wednesday, 09 August 2017, 05:01 GMT
ping new maintainer...
Comment by Denis Kasak (dkasak) - Friday, 15 November 2019, 15:22 GMT
Pinging again, since it's been so long now. I recently needed jython for a project so I installed this package, which broke my regular python installation due to overloading `pip`.

Could this be given another look?
Comment by Chih-Hsuan Yen (yan12125) - Wednesday, 01 April 2020, 04:27 GMT
I managed to fix the issue and update Jython to the latest version for ncurses 6.1 compatibility [1]. A test package can be found at [2].

Felix Yan: do you think the patch is OK? If so I will commit it.

[1] https://pkgbuild.com/~yan12125/FS%2345315.diff
[2] https://pkgbuild.com/~yan12125/jython-2.7.2-1-any.pkg.tar.zst
Comment by Chih-Hsuan Yen (yan12125) - Thursday, 09 April 2020, 03:53 GMT
I pushed jython 2.7.2-1 with a fix to this issue.

@felixonmars: I checked `jython -m pip` works. Please tell me if there are some other issues, thanks!

Loading...