Skip to content

Commit

Permalink
Change Numpy version dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
OCopping committed Aug 15, 2024
1 parent 4c49371 commit 0243dae
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ requires = [
"setuptools_dso>=2.7a1,<=2.10; python_version<='3.11'",
"setuptools_dso>=2.11a2; python_version>='3.12'",
"wheel",
"numpy",
"numpy>=2.0.1; python_version>='3.10'",
"numpy>=1.7",
"Cython>=0.20",
"epicscorelibs==7.0.7.99.0.2; python_version<='3.11'",
"epicscorelibs>=7.0.7.99.1.1a2; python_version>='3.12'",
Expand Down
24 changes: 15 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,20 @@ def get_numpy_include_dirs():
with open(os.path.join(os.path.dirname(__file__), 'README.md')) as F:
long_description = F.read()

install_requires = [
epicscorelibs.version.abi_requires(),
pvxslibs.version.abi_requires(),
'nose2>=0.8.0',
'ply', # for asLib
]

if numpy.lib.NumpyVersion(numpy.__version__) >= '2.0.0b1':
install_requires += ['numpy >= 1.7', 'numpy < 3']
else:
# assume ABI forward compatibility as indicated by
# https://github.com/numpy/numpy/blob/master/numpy/core/setup_common.py#L28
install_requires += ['numpy >=%s'%numpy.version.short_version, 'numpy < 2']

setup(
name='p4p',
version=package_version,
Expand Down Expand Up @@ -131,15 +145,7 @@ def get_numpy_include_dirs():
package_dir={'':'src'},
package_data={'p4p': ['*.conf', '*.service']},
ext_modules = exts,
install_requires = [
epicscorelibs.version.abi_requires(),
pvxslibs.version.abi_requires(),
# assume ABI forward compatibility as indicated by
# https://github.com/numpy/numpy/blob/master/numpy/core/setup_common.py#L28
'numpy >=%s'%numpy.version.short_version,
'nose2>=0.8.0',
'ply', # for asLib
],
install_requires = install_requires,
extras_require={
'qt': ['qtpy'],
},
Expand Down
1 change: 1 addition & 0 deletions src/p4p.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
// avoid numpy deprecation warnings when building with cython >= 3.0
#if CYTHON_HEX_VERSION>=0x03000000
# define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
# define NPY_TARGET_VERSION NPY_1_7_API_VERSION
#endif

namespace p4p {
Expand Down

0 comments on commit 0243dae

Please sign in to comment.