Skip to content

Commit d6cf1f9

Browse files
committed
Stop installing and testing jep
* The jep tests do not pass reliably on macOS. * Installing jep can trigger a build from source. * The support for scyjava via jep is incomplete anyway, due to jep's lack of support for class reflection (i.e. the jclass function). And now, on Windows CI with Python 3.13: LINK : fatal error LNK1104: cannot open file 'python313t.lib' error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.43.34808\\bin\\HostX86\\x64\\link.exe' failed with exit code 1104 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for jep ERROR: Failed to build installable wheels for some pyproject.toml based projects (jep) Successfully built scyjava assertpy Failed to build jep The jep mode is probably used by no one. We'll leave it in as-is, but no more worrying about whether it still works, at least for now. :-(
1 parent fe835a1 commit d6cf1f9

File tree

3 files changed

+6
-66
lines changed

3 files changed

+6
-66
lines changed

bin/test.sh

Lines changed: 6 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ dir=$(dirname "$0")
1313
cd "$dir/.."
1414

1515
echo
16-
echo "-------------------------------------------"
17-
echo "| Testing JPype mode (Java inside Python) |"
18-
echo "-------------------------------------------"
16+
echo "----------------------"
17+
echo "| Running unit tests |"
18+
echo "----------------------"
1919

2020
if [ $# -gt 0 ]
2121
then
@@ -26,9 +26,9 @@ fi
2626
jpypeCode=$?
2727

2828
echo
29-
echo "-------------------------------------------"
30-
echo "| Running integration tests (JPype only) |"
31-
echo "-------------------------------------------"
29+
echo "-----------------------------"
30+
echo "| Running integration tests |"
31+
echo "-----------------------------"
3232
itCode=0
3333
for t in tests/it/*.py
3434
do
@@ -44,64 +44,6 @@ do
4444
fi
4545
done
4646

47-
echo
48-
echo "-------------------------------------------"
49-
echo "| Testing Jep mode (Python inside Java) |"
50-
echo "-------------------------------------------"
51-
52-
# Discern the Jep installation.
53-
site_packages=$(python -c 'import sys; print(next(p for p in sys.path if p.endswith("site-packages")))')
54-
test -d "$site_packages/jep" || {
55-
echo "[ERROR] Failed to detect Jep installation in current environment!" 1>&2
56-
exit 1
57-
}
58-
59-
# We execute the pytest framework through Jep via jgo, so that
60-
# the surrounding JVM includes scijava-table on the classpath.
61-
#
62-
# Arguments to the shell script are translated into an argument
63-
# list to the pytest.main function. A weak attempt at handling
64-
# special characters, e.g. single quotation marks and backslashes,
65-
# is made, but there are surely other non-working cases.
66-
67-
if [ $# -gt 0 ]
68-
then
69-
a=$(echo "$@" | sed 's/\\/\\\\/g') # escape backslashes
70-
a=$(echo "$a" | sed 's/'\''/\\'\''/g') # escape single quotes
71-
a=$(echo "$a" | sed 's/ /'\'','\''/g') # replace space with ','
72-
argString="['-v', '$a']"
73-
else
74-
argString=""
75-
fi
76-
if ! java -version 2>&1 | grep -q '^openjdk version "\(1\.8\|9\|10\|11\|12\|13\|14\|15\|16\)\.'
77-
then
78-
echo "Skipping jep tests due to unsupported Java version:"
79-
java -version || true
80-
jepCode=0
81-
elif [ "$(uname -s)" = "Darwin" ]
82-
then
83-
echo "Skipping jep tests on macOS due to flakiness"
84-
jepCode=0
85-
else
86-
echo "# AUTOGENERATED test file for jep; safe to delete.
87-
import logging, sys, pytest, scyjava
88-
scyjava._logger.addHandler(logging.StreamHandler(sys.stderr))
89-
scyjava._logger.setLevel(logging.INFO)
90-
scyjava.config.set_verbose(2)
91-
result = pytest.main($argString)
92-
if result:
93-
sys.exit(result)
94-
" > jep_test.py
95-
jgo -vv \
96-
-r scijava.public=https://maven.scijava.org/content/groups/public \
97-
-Djava.library.path="$site_packages/jep" \
98-
black.ninia:jep:jep.Run+org.scijava:scijava-table \
99-
jep_test.py
100-
jepCode=$?
101-
rm -f jep_test.py
102-
fi
103-
10447
test "$jpypeCode" -ne 0 && exit "$jpypeCode"
10548
test "$itCode" -ne 0 && exit "$itCode"
106-
test "$jepCode" -ne 0 && exit "$jepCode"
10749
exit 0

dev-environment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,4 @@ dependencies:
3737
# Project from source
3838
- pip
3939
- pip:
40-
- git+https://github.com/ninia/jep.git@cfca63f8b3398daa6d2685428660dc4b2bfab67d
4140
- -e .

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ dependencies = [
4343
dev = [
4444
"assertpy",
4545
"build",
46-
"jep",
4746
"pytest",
4847
"pytest-cov",
4948
"numpy",

0 commit comments

Comments
 (0)