Skip to content
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
11 changes: 10 additions & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ jobs:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

- uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Install twine
run: |
python -m pip install --upgrade pip
python -m pip install twine build

- name: PyPI deployment
env:
TWINE_USERNAME: __token__
Expand All @@ -63,4 +72,4 @@ jobs:
echo "# No PYPI_TOKEN secret in job!" | tee -a "$GITHUB_STEP_SUMMARY"
exit 1
fi
twine upload --verbose dist/*
twine upload --verbose ./wheelhouse/*.whl
4 changes: 2 additions & 2 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ about:
description: |
PyCA (Python Channel Access) is a module that offers lightweight
bindings for Python applications to access EPICS PVs. It acts as
a channel access client, much like pyepics. The intention of the
a channel access client, much like pyepics. The intention of the
module is to provide better performance for embedded applications,
rather than to provide an interactive interface. The most significant
gains will be found when monitoring large waveforms that need to be
processed before exposing them the Python layer.
processed before exposing them the Python layer.
dev_url: https://github.com/slaclab/pyca
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pcaspy
pytest
pytest
2 changes: 1 addition & 1 deletion pyca/getfunctions.hh
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ PyObject* _pyca_get_value(capv* pv, const T* dbrv, long count)
npy_intp dims[1] = {count};
int typenum = _numpy_array_type(&(dbrv->value));
PyObject* nparray = PyArray_EMPTY(1, dims, typenum, 0);
PyArrayObject *arr = (PyArrayObject *)PyArray_FROM_O(nparray);
PyArrayObject *arr = (PyArrayObject *)PyArray_FROM_O(nparray);
memcpy(PyArray_DATA(arr), &(dbrv->value), count*sizeof(dbrv->value));
return nparray;
} else {
Expand Down
4 changes: 2 additions & 2 deletions pyca/putfunctions.hh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void _pyca_put_value(capv* pv, PyObject* pyvalue, T** buf, long count)
_pyca_put(pyval, buffer);
} else if (PyArray_Check(pyvalue)) {
// Convert to array
PyArrayObject *arr = (PyArrayObject *)PyArray_FROM_O(pyvalue);
PyArrayObject *arr = (PyArrayObject *)PyArray_FROM_O(pyvalue);
char* npdata = static_cast<char*>(PyArray_GETPTR1(arr, 0));
if (PyArray_IsPythonScalar(pyvalue)) {
PyObject* pyval = PyArray_GETITEM(arr, npdata);
Expand All @@ -88,7 +88,7 @@ void _pyca_put_value(capv* pv, PyObject* pyvalue, T** buf, long count)
_pyca_put(pyval, buffer+i);
}
} else if (PyArray_Check(pyvalue)) {
PyArrayObject *arr2 = (PyArrayObject *)PyArray_FROM_O(pyvalue);
PyArrayObject *arr2 = (PyArrayObject *)PyArray_FROM_O(pyvalue);
bool py_type = PyArray_IsPythonScalar(arr2);
for (long i=0; i<count; i++) {
char* npdata = static_cast<char*>(PyArray_GETPTR1(arr2, i));
Expand Down
2 changes: 1 addition & 1 deletion scripts/get_library_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ def get_library_paths():


if __name__ == "__main__":
get_library_paths()
get_library_paths()
33 changes: 17 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import platform
import sys

import epicscorelibs.path
import epicscorelibs.version
import numpy
import platform
from epicscorelibs.config import get_config_var
from numpy import get_include
from setuptools_dso import Extension, setup

from numpy import get_include

def get_numpy_include_dirs():
return [get_include()]

import epicscorelibs.path
import epicscorelibs.version
from epicscorelibs.config import get_config_var


extra = []
if sys.platform=='linux2':
if sys.platform == 'linux2':
extra += ['-v']
elif platform.system()=='Darwin':
elif platform.system() == 'Darwin':
# avoid later failure where install_name_tool may run out of space.
# install_name_tool: changing install names or rpaths can't be redone for:
# ... because larger updated load commands do not fit (the program must be relinked,
Expand All @@ -27,12 +27,13 @@ def get_numpy_include_dirs():
pyca = Extension(
name='pyca',
sources=['pyca/pyca.cc'],
include_dirs= get_numpy_include_dirs()+[epicscorelibs.path.include_path],
define_macros = get_config_var('CPPFLAGS'),
extra_compile_args = get_config_var('CXXFLAGS'),
extra_link_args = get_config_var('LDFLAGS')+extra,
dsos = ['epicscorelibs.lib.ca',
'epicscorelibs.lib.Com'
include_dirs=get_numpy_include_dirs() + [epicscorelibs.path.include_path],
define_macros=get_config_var('CPPFLAGS'),
extra_compile_args=get_config_var('CXXFLAGS'),
extra_link_args=get_config_var('LDFLAGS') + extra,
dsos=[
'epicscorelibs.lib.ca',
'epicscorelibs.lib.Com'
],
libraries=get_config_var('LDADD'),
)
Expand All @@ -42,9 +43,9 @@ def get_numpy_include_dirs():
description='python channel access library',
packages=['psp', 'pyca'],
ext_modules=[pyca],
install_requires = [
install_requires=[
epicscorelibs.version.abi_requires(),
'numpy >=%s'%numpy.version.short_version,
'numpy >=%s' % numpy.version.short_version,
],
zip_safe=False,
)
Loading