Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix numpy deprecations and bump #26

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
4 changes: 1 addition & 3 deletions _javabridge.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import numpy as np
import sys
import threading
cimport numpy as np
np.import_array()
cimport cython
cimport _javabridge_osspecific
cimport cpython
Expand Down Expand Up @@ -43,11 +44,8 @@ cdef extern from "numpy/arrayobject.h":
cdef char *data
cdef Py_intptr_t *dimensions
cdef Py_intptr_t *strides
cdef void import_array()
cdef int PyArray_ITEMSIZE(np.ndarray)

import_array()

cdef extern from "jni.h":
enum:
JNI_VERSION_1_4
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "cython<3", "numpy>=1.24.0,<2"]
build-backend = "setuptools.build_meta"
3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def ext_modules():
# Build libjvm from jvm.dll on Windows.
# This assumes that we're using mingw32 for build
#
# generate the jvm.def file matching to the jvm.dll
# generate the jvm.def file matching to the jvm.dll
cmd = ["gendef", os.path.join(jdk_home,"jre\\bin\\server\\jvm.dll")]
p = subprocess.Popen(cmd)
p.communicate()
Expand Down Expand Up @@ -381,7 +381,7 @@ def get_version():
os.chdir(os.path.dirname(__file__))

setup(name="python-javabridge",
version="4.0.3",
version="4.0.4",
description="Python wrapper for the Java Native Interface",
long_description='''The python-javabridge package makes it easy to start a Java virtual
machine (JVM) from Python and interact with it. Python code can
Expand All @@ -398,12 +398,12 @@ def get_version():
],
license='BSD License',
setup_requires=[
'Cython>=0.29.16',
'numpy>=1.20.1',
],
'Cython>=0.29.16,<3',
'numpy<2',
],
install_requires=[
'numpy>=1.20.1',
],
'numpy>=1.20.1,<2',
],
tests_require="nose",
entry_points={'nose.plugins.0.10': [
'javabridge = javabridge.noseplugin:JavabridgePlugin'
Expand Down