Przeglądaj źródła

Merge pull request #801 from yyuu/let-jython-to-generate-launcher-as-shell-script

Let Jython installer to generate shell script instead of python script even if there's `python2.7` available in `$PATH`
pull/812/head
Yamashita, Yuu 9 lat temu
committed by GitHub
rodzic
commit
4d96271113
6 zmienionych plików z 19 dodań i 4 usunięć
  1. +14
    -4
      plugins/python-build/bin/python-build
  2. +1
    -0
      plugins/python-build/share/python-build/jython-2.7.0
  3. +1
    -0
      plugins/python-build/share/python-build/jython-2.7.1b1
  4. +1
    -0
      plugins/python-build/share/python-build/jython-2.7.1b2
  5. +1
    -0
      plugins/python-build/share/python-build/jython-2.7.1b3
  6. +1
    -0
      plugins/python-build/share/python-build/jython-dev

+ 14
- 4
plugins/python-build/bin/python-build Wyświetl plik

@ -588,7 +588,7 @@ fetch_jar() {
# Must use full path to jar and destination directory:
# http://bugs.jython.org/issue2350
{ if $JAVA -jar $PWD/${package_name}.jar -s -d $PWD/${package_name}; then
{ if $JAVA -jar "$PWD/${package_name}.jar" -s -d "$PWD/${package_name}"; then
if [ -z "$KEEP_BUILD_PATH" ]; then
rm -f "$package_filename"
else
@ -902,11 +902,10 @@ fix_jython_shebangs() {
for file in "${PREFIX_PATH}/bin"/*; do
case "$(head -1 "${file}")" in
"#!"*"/bin/jython" )
sed -i.bak "1 s:.*:#\!\/usr\/bin\/env ${PREFIX_PATH}\/bin\/jython:" "${file}"
sed -i.bak "1 s:.*:#\!${PREFIX_PATH}\/bin\/jython:" "${file}"
;;
"#!"*"/bin/python2.7"* )
# Jython 2.7+ requires CPython 2.7 to run
sed -i.bak "1 s:.*:#\!\/usr\/bin\/env python2.7:" "${file}"
sed -i.bak "1 s:.*:#\!\/usr\/bin\/env python:" "${file}"
;;
esac
rm -f "${file}.bak"
@ -1276,6 +1275,17 @@ require_java() {
export JAVA="$java"
}
# Let Jython installer to generate shell script instead of python script even if there's `python2.7` available in `$PATH` (#800)
# FIXME: better function naming
unrequire_python27() {
export PATH="${BUILD_PATH}/bin:${PATH}"
mkdir -p "${BUILD_PATH}/bin"
if command -v python2.7 1>/dev/null 2>&1; then
echo false > "${BUILD_PATH}/bin/python2.7"
chmod +x "${BUILD_PATH}/bin/python2.7"
fi
}
require_distro() {
for arg; do
if [[ "$(cat /etc/issue 2>/dev/null || true)" == "$arg"* ]]; then

+ 1
- 0
plugins/python-build/share/python-build/jython-2.7.0 Wyświetl plik

@ -1,4 +1,5 @@
require_java
unrequire_python27
install_jar "jython-2.7.0" "https://repo1.maven.org/maven2/org/python/jython-installer/2.7.0/jython-installer-2.7.0.jar#b44352ece72382268a60e2848741c96609a91d796bb9a9c6ebeff62f0c12c9cf" jython
case "$(pypy_architecture 2>/dev/null || true)" in

+ 1
- 0
plugins/python-build/share/python-build/jython-2.7.1b1 Wyświetl plik

@ -1,4 +1,5 @@
require_java
unrequire_python27
install_jar "jython-2.7.1b1" "https://repo1.maven.org/maven2/org/python/jython-installer/2.7.1b1/jython-installer-2.7.1b1.jar#c7a05911fed666c8f9df5bdce50bb5dc75482b7f6b1f1dbe433162d94c960ec3" jython
case "$(pypy_architecture 2>/dev/null || true)" in

+ 1
- 0
plugins/python-build/share/python-build/jython-2.7.1b2 Wyświetl plik

@ -1,4 +1,5 @@
require_java
unrequire_python27
install_jar "jython-2.7.1b2" "https://repo1.maven.org/maven2/org/python/jython-installer/2.7.1b2/jython-installer-2.7.1b2.jar#d994500808c8d448baab1f98e043e6a11360cff302f401901e73f0e34c27251a" jython
case "$(pypy_architecture 2>/dev/null || true)" in

+ 1
- 0
plugins/python-build/share/python-build/jython-2.7.1b3 Wyświetl plik

@ -1,4 +1,5 @@
require_java
unrequire_python27
install_jar "jython-2.7.1b3" "https://repo1.maven.org/maven2/org/python/jython-installer/2.7.1b3/jython-installer-2.7.1b3.jar#5c6c7dc372a131dbc2b29b95407c69a4ebab22c1823d9098b7f993444f3090c5" jython
case "$(pypy_architecture 2>/dev/null || true)" in

+ 1
- 0
plugins/python-build/share/python-build/jython-dev Wyświetl plik

@ -1,4 +1,5 @@
require_java
unrequire_python27
install_hg "jython-dev" "https://hg.python.org/jython" "default" jython_builder ez_setup
# pip (>= 1.3) does not work properly since it uses HTTPS for downloads
# * https://github.com/yyuu/pyenv/issues/15

Ładowanie…
Anuluj
Zapisz