summaryrefslogtreecommitdiff
path: root/dev-python/jpype
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/jpype')
-rw-r--r--dev-python/jpype/Manifest2
-rw-r--r--dev-python/jpype/files/jpype-1.7.1-jar-location.patch36
-rw-r--r--dev-python/jpype/files/jpype-1.7.1-java-release.patch32
-rw-r--r--dev-python/jpype/jpype-1.6.0.ebuild24
-rw-r--r--dev-python/jpype/jpype-1.7.1.ebuild60
-rw-r--r--dev-python/jpype/metadata.xml4
6 files changed, 133 insertions, 25 deletions
diff --git a/dev-python/jpype/Manifest b/dev-python/jpype/Manifest
index 0d6d64aa739c..308057869528 100644
--- a/dev-python/jpype/Manifest
+++ b/dev-python/jpype/Manifest
@@ -1 +1 @@
-DIST v1.6.0.tar.gz 801839 BLAKE2B cdbb1f52156848d492a6e4ca3a224e2e8da94da00617aac014ad6daa031655d05228f00b9e7a3f044d3e6f5c31147f7d3175bddf5da042fecee3b6b46c2ebf56 SHA512 5849509334ab4eb63546b584eb32a0d61a9da2b5b303acc380f0be2742b96b32a2bd900b2a080e62ed32d7a7c5029a3d59c55fd9f7018ddd37e968e58df32707
+DIST jpype-1.7.1.gh.tar.gz 802748 BLAKE2B 035a91bd55d761e334a230bc550068829a72929ef9aad71c8bddf13f7866605b2d2abf95e42c9f03522fd1e698e381b77595db60fec8d8bd49f06e19bf53c173 SHA512 e02cfb72cfea61e445f8d448a559f58cf0016bccf689fe137ab4d75d6e5c8a640d774eadef09489b3ea3113725010a8c3251dfffe194b9c91250c9040923869c
diff --git a/dev-python/jpype/files/jpype-1.7.1-jar-location.patch b/dev-python/jpype/files/jpype-1.7.1-jar-location.patch
new file mode 100644
index 000000000000..f904a5d8c220
--- /dev/null
+++ b/dev-python/jpype/files/jpype-1.7.1-jar-location.patch
@@ -0,0 +1,36 @@
+QA marks the stray top-level jar in site-packages.
+Lookup adjusted to the new location.
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -26,7 +26,7 @@
+
+ if(SKBUILD)
+ message(DEBUG "SKBuild invocation")
+- set(DEST_JAR ${SKBUILD_PLATLIB_DIR})
++ set(DEST_JAR ${SKBUILD_PLATLIB_DIR}/jpype)
+ set(DEST_EXTENSION ${SKBUILD_PLATLIB_DIR})
+ else()
+ # in-place build, set output to cmakes output dir.
+--- a/jpype/_core.py
++++ b/jpype/_core.py
+@@ -313,7 +313,7 @@
+ # extra_jvm_args += ['--module-path=%s'%mp ]
+
+ # Get the support library
+- support_lib_p = Path(__file__).resolve().parent.parent / "org.jpype.jar"
++ support_lib_p = Path(__file__).resolve().parent / "org.jpype.jar"
+ if not support_lib_p.exists(): # pragma: no cover
+ raise RuntimeError(
+ f"Unable to find org.jpype.jar support library at {support_lib_p}")
+--- a/jpype/_pyinstaller/hook-jpype.py
++++ b/jpype/_pyinstaller/hook-jpype.py
+@@ -6,6 +6,6 @@
+
+ fspath = getattr(os, 'fspath', str)
+
+-jar_path = Path(jpype.__file__).parent.parent.joinpath('org.jpype.jar')
++jar_path = Path(jpype.__file__).parent.joinpath('org.jpype.jar')
+
+-datas = [[fspath(jar_path), '.']]
++datas = [[fspath(jar_path), 'jpype']]
diff --git a/dev-python/jpype/files/jpype-1.7.1-java-release.patch b/dev-python/jpype/files/jpype-1.7.1-java-release.patch
new file mode 100644
index 000000000000..c60a4939ec46
--- /dev/null
+++ b/dev-python/jpype/files/jpype-1.7.1-java-release.patch
@@ -0,0 +1,32 @@
+Upstream uses URLDecoder.decode(String, Charset) - unavailable in Java 9
+
+--- a/native/build.xml
++++ b/native/build.xml
+@@ -1,7 +1,7 @@
+ <project default="all" name="JPype - Native">
+
+ <!-- JAVA_VERSION must match the oldest supported Java version -->
+- <property name="JAVA_VERSION" value="9" />
++ <property name="JAVA_VERSION" value="11" />
+
+ <!-- src can't be "java" as it breaks nose tests -->
+ <property name="src" location="jpype_module/src/main/java"/>
+@@ -17,16 +17,14 @@
+ <mkdir dir="${build}/classes/META-INF/versions/0"/>
+ <mkdir dir="${build}/lib"/>
+ <javac destdir="${build}/classes"
+- source="${JAVA_VERSION}"
+- target="${JAVA_VERSION}"
++ release="${JAVA_VERSION}"
+ excludes="**/Reflector0.java"
+ includeantruntime="false"
+ >
+ <src path="${src}"/>
+ </javac>
+ <javac destdir="${build}/classes/META-INF/versions/0"
+- source="${JAVA_VERSION}"
+- target="${JAVA_VERSION}"
++ release="${JAVA_VERSION}"
+ includes="**/Reflector0.java"
+ includeantruntime="false"
+ >
diff --git a/dev-python/jpype/jpype-1.6.0.ebuild b/dev-python/jpype/jpype-1.6.0.ebuild
deleted file mode 100644
index 1caaef3f3492..000000000000
--- a/dev-python/jpype/jpype-1.6.0.ebuild
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{13..14} )
-
-inherit distutils-r1
-
-DESCRIPTION="Bridge to allow Python programs full access to Java class libraries"
-HOMEPAGE="https://github.com/jpype-project/jpype/"
-SRC_URI="https://github.com/jpype-project/jpype/archive/refs/tags/v${PV}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64"
-
-RDEPEND="virtual/jdk"
-
-src_prepare() {
- sed -i "s/'-g0', //g;s/, '-O2'//g" "${S}"/setupext/platform.py || die
- default
-}
diff --git a/dev-python/jpype/jpype-1.7.1.ebuild b/dev-python/jpype/jpype-1.7.1.ebuild
new file mode 100644
index 000000000000..407fa516aaa2
--- /dev/null
+++ b/dev-python/jpype/jpype-1.7.1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=scikit-build-core
+PYTHON_COMPAT=( python3_{13..14} )
+EPYTEST_PLUGINS=()
+
+inherit java-pkg-2 distutils-r1
+
+DESCRIPTION="Bridge to allow Python programs full access to Java class libraries"
+HOMEPAGE="https://github.com/jpype-project/jpype/"
+SRC_URI="
+ https://github.com/jpype-project/jpype/archive/refs/tags/v${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ dev-python/packaging[${PYTHON_USEDEP}]
+ >=virtual/jre-11:*
+"
+
+DEPEND=">=virtual/jdk-11:*"
+
+BDEPEND="
+ ${DEPEND}
+ >=dev-python/scikit-build-core-0.9[${PYTHON_USEDEP}]
+ dev-java/ant
+ test? (
+ dev-python/jedi[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+PATCHES=(
+ "${FILESDIR}/${P}-java-release.patch"
+ "${FILESDIR}/${P}-jar-location.patch"
+)
+
+python_compile() {
+ local DISTUTILS_ARGS=( -DBUILD_TEST_HARNESS=$(usex test ON OFF) )
+ distutils-r1_python_compile
+}
+
+python_test() {
+ cd test || die
+
+ epytest jpypetest --checkjni \
+ --ignore=jpypetest/test_sql_h2.py \
+ --ignore=jpypetest/test_sql_hsqldb.py \
+ --ignore=jpypetest/test_sql_sqlite.py
+}
diff --git a/dev-python/jpype/metadata.xml b/dev-python/jpype/metadata.xml
index 3e664c81ed3f..bb2b36e77133 100644
--- a/dev-python/jpype/metadata.xml
+++ b/dev-python/jpype/metadata.xml
@@ -5,5 +5,9 @@
<email>ivan.lloro.boada@gmail.com</email>
<name>Ivan Lloro</name>
</maintainer>
+ <maintainer type="person">
+ <email>mit.mis@gmail.com</email>
+ <name>Michal Andrzejczak</name>
+ </maintainer>
<origin>srcux</origin>
</pkgmetadata>