Skip to content

Commit f8fbd34

Browse files
oschwaldclaude
andcommitted
Remove Jython support
Remove Jython-specific code from setup.py. Jython does not support Python 3.10+, making this code unreachable given the package's minimum Python version requirement. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 9f87518 commit f8fbd34

File tree

1 file changed

+16
-24
lines changed

1 file changed

+16
-24
lines changed

setup.py

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
cmdclass = {}
1111
PYPY = hasattr(sys, "pypy_version_info")
12-
JYTHON = sys.platform.startswith("java")
1312

1413
if os.name == "nt":
1514
# Disable unknown pragma warning
@@ -135,30 +134,23 @@ def run_setup(with_cext) -> None:
135134
setup(version=VERSION, cmdclass=loc_cmdclass, **kwargs)
136135

137136

138-
if JYTHON:
137+
try:
138+
run_setup(True)
139+
except BuildFailed as exc:
140+
if os.getenv("MAXMINDDB_REQUIRE_EXTENSION"):
141+
raise
142+
status_msgs(
143+
exc.cause,
144+
"WARNING: The C extension could not be compiled, "
145+
+ "speedups are not enabled.",
146+
"Failure information, if any, is above.",
147+
"Retrying the build without the C extension now.",
148+
)
149+
139150
run_setup(False)
151+
140152
status_msgs(
141-
"WARNING: Disabling C extension due to Python platform.",
153+
"WARNING: The C extension could not be compiled, "
154+
+ "speedups are not enabled.",
142155
"Plain-Python build succeeded.",
143156
)
144-
else:
145-
try:
146-
run_setup(True)
147-
except BuildFailed as exc:
148-
if os.getenv("MAXMINDDB_REQUIRE_EXTENSION"):
149-
raise
150-
status_msgs(
151-
exc.cause,
152-
"WARNING: The C extension could not be compiled, "
153-
+ "speedups are not enabled.",
154-
"Failure information, if any, is above.",
155-
"Retrying the build without the C extension now.",
156-
)
157-
158-
run_setup(False)
159-
160-
status_msgs(
161-
"WARNING: The C extension could not be compiled, "
162-
+ "speedups are not enabled.",
163-
"Plain-Python build succeeded.",
164-
)

0 commit comments

Comments
 (0)