Skip to content

Commit

Permalink
Merge pull request #26 from CellProfiler/404
Browse files Browse the repository at this point in the history
Fix numpy deprecations and bump
  • Loading branch information
gnodar01 authored Sep 13, 2024
2 parents 79c1a91 + 2a5f6ca commit 1ba4291
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
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

0 comments on commit 1ba4291

Please sign in to comment.