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

Updates on supported versions #3

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
88 changes: 14 additions & 74 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,104 +47,57 @@ jobs:
source: true

# Linux py builds x64
# TODO: manylinux1 and 2014 are EOL, even more reason to remove these supported versions
- name: linux 2.7 amd64
os: ubuntu-latest
pyver: cp27-cp27m
piparch: manylinux1_x86_64
numpy: numpy==1.8.2
cython: Cython==0.29.2

- name: linux 2.7u amd64
os: ubuntu-latest
pyver: cp27-cp27mu
piparch: manylinux1_x86_64
numpy: numpy==1.8.2
cython: Cython==0.29.2

- name: linux 3.5 amd64
os: ubuntu-latest
pyver: cp35-cp35m
piparch: manylinux1_x86_64
numpy: numpy==1.12.1
cython: Cython==0.29.2

- name: linux 3.6 amd64
os: ubuntu-latest
pyver: cp36-cp36m
piparch: manylinux1_x86_64
piparch: manylinux_2_28_x86_64
numpy: numpy==1.12.1
cython: Cython==0.29.2

- name: linux 3.7 amd64
os: ubuntu-latest
pyver: cp37-cp37m
piparch: manylinux1_x86_64
piparch: manylinux_2_28_x86_64
numpy: numpy==1.16.2
cython: Cython==0.29.2

- name: linux 3.8 amd64
os: ubuntu-latest
pyver: cp38-cp38
piparch: manylinux1_x86_64
piparch: manylinux_2_28_x86_64
numpy: numpy==1.17.3
cython: Cython==0.29.2

- name: linux 3.9 amd64
os: ubuntu-latest
pyver: cp39-cp39
piparch: manylinux2010_x86_64
numpy: numpy==1.19.3
cython: Cython==0.29.23
piparch: manylinux_2_28_x86_64
numpy: numpy==2.0.1
cython: Cython==3.0.10

- name: linux 3.10 amd64
os: ubuntu-latest
pyver: cp310-cp310
piparch: manylinux2014_x86_64
numpy: numpy==1.22.0
cython: Cython==0.29.23
piparch: manylinux_2_28_x86_64
numpy: numpy==2.0.1
cython: Cython==3.0.10

- name: linux 3.11 amd64
os: ubuntu-latest
pyver: cp311-cp311
piparch: manylinux2014_x86_64
numpy: numpy==1.23.5
cython: Cython==0.29.35
piparch: manylinux_2_28_x86_64
numpy: numpy==2.0.1
cython: Cython==3.0.10

- name: linux 3.12 amd64
os: ubuntu-latest
pyver: cp312-cp312
piparch: manylinux2014_x86_64
piparch: manylinux_2_28_x86_64
numpy: numpy==2.0.1
cython: Cython==3.0.10
skip_cothread: yes

# Linux py builds x64
# TODO: manylinux1 and 2014 are EOL, even more reason to remove these supported versions
- name: linux 2.7 i686
os: ubuntu-latest
pyver: cp27-cp27m
piparch: manylinux1_i686
numpy: numpy==1.11.1
cython: Cython==0.29.2
pre: linux32

- name: linux 2.7u i686
os: ubuntu-latest
pyver: cp27-cp27mu
piparch: manylinux1_i686
numpy: numpy==1.11.1
cython: Cython==0.29.2
pre: linux32

- name: linux 3.5 i686
os: ubuntu-latest
pyver: cp35-cp35m
piparch: manylinux1_i686
numpy: numpy==1.12.1
cython: Cython==0.29.2
pre: linux32

- name: linux 3.6 i686
os: ubuntu-latest
pyver: cp36-cp36m
Expand Down Expand Up @@ -174,7 +127,7 @@ jobs:
- name: linux 3.9 i686
os: ubuntu-latest
pyver: cp39-cp39
piparch: manylinux2010_i686
piparch: manylinux2014_i686
numpy: numpy==1.19.5
cython: Cython==0.29.23
pre: linux32
Expand Down Expand Up @@ -244,13 +197,6 @@ jobs:
# python: "3.12"
# piparch: win_amd64

- name: win64 3.5
os: windows-2019
python: "3.5"
piparch: win_amd64
profile: latest
skip_cothread: yes

- name: win64 3.6
os: windows-latest
python: "3.6"
Expand Down Expand Up @@ -312,12 +258,6 @@ jobs:
python-version: ${{ matrix.python }}
#architecture: x64

# TLS 1.0 and 1.1 support was removed from pypi so the cached pip won't work
- name: Python 3.5 Fix
if: ${{ matrix.python == '3.5' }}
run: |
curl https://bootstrap.pypa.io/pip/3.5/get-pip.py | python

- name: Automatic core dumper analysis
uses: mdavidsaver/ci-core-dumper@master

Expand Down
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 hasattr(numpy.lib, "NumpyVersion") and 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
5 changes: 2 additions & 3 deletions src/p4p.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@
#endif

// 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
#endif
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#define NPY_TARGET_VERSION NPY_1_7_API_VERSION

namespace p4p {

Expand Down
2 changes: 1 addition & 1 deletion src/p4p/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ def __ge__(self, o):
def __gt__(self, o):
return self._cmp(o)>0

version = Version('4.2.0a1')
version = Version('4.2.0a2')
4 changes: 2 additions & 2 deletions src/pvxs_value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ PyObject* asPy(const Value& v, bool unpackstruct, bool unpackrecurse, PyObject*

PyRef pyarr(PyArray_New(&PyArray_Type, 1, &shape, ntype, nullptr,
const_cast<void*>(varr.data()), // should not actually be modifiable
esize, NPY_CARRAY_RO, nullptr));
esize, NPY_ARRAY_CARRAY_RO, nullptr));

#ifdef PyArray_SetBaseObject
PyArray_SetBaseObject((PyArrayObject*)pyarr.obj, holder.release());
Expand Down Expand Up @@ -530,7 +530,7 @@ void storePy(Value& v, PyObject* py, bool forceCast)
}

PyRef arr(PyArray_FromAny(py, PyArray_DescrFromType(ntype), 0, 0,
NPY_CARRAY_RO|NPY_ARRAY_FORCECAST, nullptr));
NPY_ARRAY_CARRAY_RO|NPY_ARRAY_FORCECAST, nullptr));

if(PyArray_NDIM((PyArrayObject*)arr.obj)!=1)
throw std::logic_error("Only 1-d array can be assigned");
Expand Down
Loading