豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit c24cbe6

Browse files
fix: Fix Jython 2.0/2.1 not working on Windows runners (#14) (#15)
Fix #14 Commits: * wip(tests): Test only v2.0/v2.1 on all runners * fix: Preserve `$CLASSPATH` environment variable in `-cp` java option * fix: Fix wrong quotes * ci(tests): Do not run double tests in pull requests * chore(tests): Indent environment check commands output * wip: Revert changes to v3 to test failure point * wip: Add `-Dpython.path` to find the source of the bug * ci(tests): Disable tests for macos and ubuntu * wip: Use java to estract jython * ci(tests): Do not run action on pull request * wip: Update class name * fix: Fix bash syntax error * wip: Add list directory * wip: Fix class name * wip: Force class to be named `jython-21` * wip: Add `python.home` * fix: Remove `python.home` system property that caused the javaos module to not be loaded
1 parent f4625df commit c24cbe6

File tree

3 files changed

+18
-20
lines changed

3 files changed

+18
-20
lines changed

.github/workflows/test-action.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ run-name: "Run Jython tests"
44

55
on:
66
push:
7-
pull_request:
87
workflow_dispatch:
98

109
concurrency:
@@ -22,16 +21,16 @@ jobs:
2221
- windows-latest
2322
- macos-latest
2423
jython_version:
25-
- "2.7.3"
26-
- "2.7.2"
27-
- "2.7.1"
28-
- "2.7.0"
29-
- "2.5.3"
30-
- "2.5.2"
31-
- "2.5.1"
32-
- "2.5.0"
33-
- "2.2.1"
34-
- "2.2"
24+
# - "2.7.3"
25+
# - "2.7.2"
26+
# - "2.7.1"
27+
# - "2.7.0"
28+
# - "2.5.3"
29+
# - "2.5.2"
30+
# - "2.5.1"
31+
# - "2.5.0"
32+
# - "2.2.1"
33+
# - "2.2"
3534
- "2.1"
3635
- "2.0"
3736

@@ -65,30 +64,30 @@ jobs:
6564
shell: bash
6665
run: |
6766
printf "\033[0;33mEnvironment variables:\033[0m\n";
68-
env
67+
env | sed 's/^/ | /'
6968
7069
printf -- "\033[0;96m--------------------------------------------------\033[0m\n\n";
7170
printf "\033[0;33mGithub PATH (GITHUB_PATH='%s'):\033[0m\n" "$GITHUB_PATH";
72-
cat "$GITHUB_PATH";
71+
cat "$GITHUB_PATH" | sed 's/^/ | /'
7372
7473
printf -- "\033[0;96m--------------------------------------------------\033[0m\n\n";
7574
printf "\033[0;33mInstallation folder content:\033[0m\n";
76-
ls -la ~/jython/;
75+
ls -la ~/jython/ | sed 's/^/ | /'
7776
7877
printf -- "\033[0;96m--------------------------------------------------\033[0m\n\n";
7978
printf "\033[0;33mBinary files:\033[0m\n";
80-
ls -la ~/.local/bin/;
79+
ls -la ~/.local/bin/ | sed 's/^/ | /'
8180
8281
printf -- "\033[0;96m--------------------------------------------------\033[0m\n\n";
8382
printf "\033[0;33mBash script ('jython'):\033[0m\n";
8483
if [ -f ~/.local/bin/jython ]; then
85-
cat ~/.local/bin/jython;
84+
cat ~/.local/bin/jython | sed 's/^/ | /'
8685
fi
8786
8887
printf -- "\033[0;96m--------------------------------------------------\033[0m\n\n";
8988
printf "\033[0;33mBatch script ('jython.bat'):\033[0m\n";
9089
if [ -f ~/.local/bin/jython.bat ]; then
91-
cat ~/.local/bin/jython.bat;
90+
cat ~/.local/bin/jython.bat | sed 's/^/ | /'
9291
fi
9392
9493
- name: Run Jython (Bash)

.github/workflows/test-path.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ run-name: "Installation path"
44

55
on:
66
push:
7-
pull_request:
87

98
jobs:
109
default_path:

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ runs:
152152
# # Created on XXX by @user.name@
153153
#
154154
# "@jvm@" -Dpython.home="@location._top_@" -classpath "@location._top_@/jython.jar:$CLASSPATH" "@classname@" "$@"
155-
jython_cmd="java -verbose -Dpython.path=${installation_path}/Lib -Dpython.home=${installation_path} -cp ${installation_path}/jython.jar org.python.util.jython \"\$@\""
155+
jython_cmd="java -cp ${installation_path}/jython.jar org.python.util.jython \"\$@\""
156156
;;
157157
158158
jar)
@@ -170,7 +170,7 @@ runs:
170170
run: |
171171
$installation_path = Convert-Path "${{ inputs.installation-path }}"
172172
if ("${{ steps.find_installer.outputs.file_type }}" -eq "class") {
173-
$jython_cmd = "java -Dpython.path=${installation_path}/Lib -Dpython.home=$installation_path -cp $installation_path\jython.jar org.python.util.jython %*"
173+
$jython_cmd = "java -cp ${installation_path}\jython.jar org.python.util.jython %*"
174174
} else {
175175
$jython_cmd = "java -jar $installation_path\jython.jar %*"
176176
}

0 commit comments

Comments
 (0)