cafe-1.12.5 release

This commit is contained in:
2021-03-16 09:33:22 +01:00
parent 603eda7531
commit 39607b33e2
35 changed files with 185186 additions and 9500 deletions
+1329 -1162
View File
File diff suppressed because it is too large Load Diff
+7204 -6052
View File
File diff suppressed because it is too large Load Diff
+1750 -1404
View File
File diff suppressed because it is too large Load Diff
+94
View File
@@ -0,0 +1,94 @@
cdef object py_cb_handle = None
cdef object py_cb_handle_open = None
# ***********public or api***************
cdef api void py_cb_wrapper(PVDataHolder pvd, unsigned int handle, string pvname) with gil:
#print(" py_cb_wrapper ====================================================+++++++++++++++PVDATA++++++= Handle/PVNAME :", handle, pvname)
cdef pvdata pv1 = PVDataHolderToStruct(pvd)
for cbobjt, v in handleMonDictGlobal.items():
if v == handle:
cbobjt(pv1, handle, pvname)
with nogil:
return
cdef api void py_cb_ctrl_wrapper(PVCtrlHolder pvc, unsigned int handle, string pvname) with gil:
#print(" py_cb_ctrl_wrapper ====================================================+++++++++++++++++CTRL+++++= Handle/PVNAME :", handle, pvname)
cdef pvctrl c1 = PVCtrlHolderToStruct(pvc)
for cbobjt, v in handleMonDictGlobal.items():
if v == handle:
cbobjt(c1, handle, pvname)
with nogil:
return
cdef api void py_cb_handle_wrapper(unsigned int handle) with gil:
#print(" py_cb_handle_wrapper ====================================================+++++++++++++++++HANDLE+++++= Handle :", handle)
py_cb_handle(handle)
with nogil:
return
# Default
cdef api void py_cb_handle_monid_wrapper(unsigned int handle, unsigned long monid) with gil:
#print(" py_cb_handle_monid_wrapper ====================================================+++++++++++++MONID++++++++++= Handle:", handle)
# if monDictGlobal.has_key(monid):
if monid in monDictGlobal.keys():
cbobjt = monDictGlobal[monid]
cbobjt(handle)
else:
print("CALLBACK NOT FOUND FOR handle/monid", handle, monid)
with nogil:
return
cdef api void py_cb_handle_get_wrapper(unsigned int handle) with gil:
#print(" py_cb_handle_get_wrapper ====================================================+++++++++++++GET++++++++++= Handle:", handle)
# py_cb_handle_get(handle)
if handle in getDictGlobal.keys():
cbobjt = getDictGlobal[handle]
cbobjt(handle)
else:
print("GET CALLBACK NOT FOUND FOR handle", handle)
with nogil:
return
cdef api void py_cb_handle_put_wrapper(unsigned int handle) with gil:
#print(" py_cb_handle_put_wrapper ====================================================+++++++++++++PUT++++++++++= Handle:", handle)
# py_cb_handle_put(handle)
if handle in putDictGlobal.keys():
cbobjt = putDictGlobal[handle]
cbobjt(handle)
else:
print("PUT CALLBACK NOT FOUND FOR handle", handle)
with nogil:
return
cdef api void py_cb_handle_open_wrapper(unsigned int handle, int status) with gil:
# status reports ICAFE_CS_CONN (602) or ICAFE_CS_DISCONN (604)
#print(" py_cb_handle_open_wrapper ====================================================+++++++++++++OPEN++++++++++= Handle/Status:", handle, status)
py_cb_handle_open(handle, status)
with nogil:
return
cdef api void py_cb_handle_connect_wrapper(unsigned int handle, string pvname, int status) with gil:
print(" py_cb_handle_connect_wrapper ===========================+++CONNECT++++++++++= Handle/PV/Status:", handle, pvname, status)
#py_cb_handle_connect(handle, pvname, status)
for k, y in openDictGlobal.items():
print(k, y)
# if openDictGlobal.has_key(pvname):
if str(pvname) in openDictGlobal.keys():
cbobjt = openDictGlobal[pvname]
cbobjt(handle, pvname, status)
with nogil:
return
# ***********api***************
File diff suppressed because it is too large Load Diff
+213
View File
@@ -0,0 +1,213 @@
cdef object py_cb_handle = None
cdef object py_cb_handle_open = None
cdef object cbobjt = None
# ***********public or api***************
# For when with pvdata
cdef public void cy_data_event_handler_wrapper(void * callback,
unsigned int handle,
string pvname,
PVDataHolder pvd) with gil:
global py_cb
#print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(1)= Handle/PVNAME :", handle, pvname)
cdef pvdata data = PVDataHolderToStruct(pvd)
#data.show()
py_cb = <object>(<void *> callback)
#print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(2)= Handle/PVNAME :", handle, pvname)
#print( <object>py_cb)
'''
global handleMonDictGlobal
if handleMonDictGlobal is not None:
for cbobjt, v in handleMonDictGlobal.items():
print("handle", v, "cbobjt", cbobjt)
if v == handle:
cbobjt(handle, pvname, data)
'''
if callback:
cbobjt=<object> (<void *> callback)
#print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(3)= Handle/PVNAME :", handle, pvname)
cbobjt(handle, pvname, data)
#print(" cy_data_event_handler_wrapper=====+++++++++++++++PVDATA++++++(4)= Handle/PVNAME :", handle, pvname)
#with nogil:
#return
cdef public void cy_ctrl_event_handler_wrapper(void * callback,
unsigned int handle,
string pvname,
PVCtrlHolder pvc) with gil:
#print(" cy_data_event_handler_wrapper=====+++++++++++++++PVCTRL++++++= Handle/PVNAME :", handle, pvname)
cdef pvctrl data = PVCtrlHolderToStruct(pvc)
cbobjt=<object> (<void *> callback)
cbobjt(handle, pvname, data)
with nogil:
return
cdef public void cy_event_handler_wrapper(void * callback,
unsigned int handle,
string pvname) with gil:
#print(" cy_event_handler_wrapper=====+++++++++++++++HANDLEPV++++++= Handle/PVNAME :", handle, pvname)
cbobjt=<object> callback
cbobjt(handle, pvname)
with nogil:
return
cdef public void cy_connect_handler_wrapper(void * callback,
unsigned int handle,
string pvname,
int status) with gil:
#print(" cy_connect_handler_wrapper ====+++CONNECT++++++++++= Handle/PV/Status:", handle, pvname, status)
#print(" callback is ", <object> callback)
if callback:
#print(" callback is not None ")
cbobjt=<object> callback
cbobjt(handle, pvname, status)
#print(" cy_connect_handler_wrapper ====+++CONNECT++++++++++ SUCCESS")
#else:
# if str(pvname) in openDictGlobal.keys():
# cbobjt = openDictGlobal[pvname]
# cbobjt(handle, pvname, status)
with nogil:
return
cdef public void py_cb_wrapper(PVDataHolder pvd, unsigned int handle, string pvname) with gil:
print(" py_cb_wrapper ====================================================+++++++++++++++PVDATA++++++= Handle/PVNAME :", handle, pvname)
cdef pvdata pv1 = PVDataHolderToStruct(pvd)
'''
cdef string val
_c_cafe.getCacheString(handle, val)
#print(val, " ", pv1.value[0])
cdef HandleHelper hh
cdef vector[void *] widgetV
widgetV.reserve(2)
widgetList = []
status = hh.getWidgets(handle, widgetV)
for i in range(0, widgetV.size()):
cbobjt = < object > widgetV[i]
cbobjt(pv1, handle, pvname)
widgetList.append( < object > widgetV[i])
#print(widgetList)
'''
'''
global handleMonDictGlobal
if handleMonDictGlobal is not None:
for cbobjt, v in handleMonDictGlobal.items():
print("handle", v, "cbobjt", cbobjt)
if v == handle:
cbobjt(pv1, handle, pvname)
'''
with nogil:
return
cdef public void py_cb_ctrl_wrapper(PVCtrlHolder pvc, unsigned int handle, string pvname) with gil:
#print(" py_cb_ctrl_wrapper ====================================================+++++++++++++++++CTRL+++++= Handle/PVNAME :", handle, pvname)
cdef pvctrl c1 = PVCtrlHolderToStruct(pvc)
'''
global handleMonDictGlobal
cdef object cbobjt = None
for cbobjt, v in handleMonDictGlobal.items():
if v == handle:
cbobjt(c1, handle, pvname)
'''
with nogil:
return
cdef public void py_cb_handle_wrapper(unsigned int handle) with gil:
print(" py_cb_handle_wrapper ====================================================+++++++++++++++++HANDLE+++++= Handle :", handle)
py_cb_handle(handle)
with nogil:
return
# Default
cdef public void py_cb_handle_monid_wrapper(unsigned int handle, unsigned long monid) with gil:
print(" py_cb_handle_monid_wrapper ====================================================+++++++++++++MONID++++++++++= Handle:", handle)
'''
cdef string val
_c_cafe.getCacheString(handle, val)
print(val, " is val")
'''
# if monDictGlobal.has_key(monid):
global monDictGlobal
if monid in monDictGlobal.keys():
cbobjt = monDictGlobal[monid]
cbobjt(handle)
else:
print("CALLBACK NOT FOUND FOR handle/monid", handle, monid)
with nogil:
return
cdef public void py_cb_handle_get_wrapper(unsigned int handle) with gil:
#print(" py_cb_handle_get_wrapper ====================================================+++++++++++++GET++++++++++= Handle:", handle)
# py_cb_handle_get(handle)
global getDictGlobal
if handle in getDictGlobal.keys():
cbobjt = getDictGlobal[handle]
cbobjt(handle)
else:
print("GET CALLBACK NOT FOUND FOR handle", handle)
with nogil:
return
cdef public void py_cb_handle_put_wrapper(unsigned int handle) with gil:
#print(" py_cb_handle_put_wrapper ====================================================+++++++++++++PUT++++++++++= Handle:", handle)
# py_cb_handle_put(handle)
global putDictGlobal
if handle in putDictGlobal.keys():
cbobjt = putDictGlobal[handle]
cbobjt(handle)
else:
print("PUT CALLBACK NOT FOUND FOR handle", handle)
with nogil:
return
cdef public void py_cb_handle_open_wrapper(unsigned int handle, int status) with gil:
# status reports ICAFE_CS_CONN (602) or ICAFE_CS_DISCONN (604)
print(" py_cb_handle_open_wrapper ====================================================+++++++++++++OPEN++++++++++= Handle/Status:", handle, status)
py_cb_handle_open(handle, status)
with nogil:
return
cdef public void py_cb_handle_connect_wrapper(unsigned int handle,
string pvname,
int status) with gil:
print(" py_cb_handle_connect_wrapper ===========================+++CONNECT++++++++++= Handle/PV/Status:", handle, pvname, status)
#py_cb_handle_connect(handle, pvname, status)
global openDictGlobal
for k, y in openDictGlobal.items():
print(k, y)
# if openDictGlobal.has_key(pvname):
if str(pvname) in openDictGlobal.keys():
cbobjt = openDictGlobal[pvname]
cbobjt(handle, pvname, status)
with nogil:
return
# ***********public***************
+1046 -872
View File
File diff suppressed because it is too large Load Diff
+42
View File
@@ -0,0 +1,42 @@
/* Generated by Cython 0.23.4 */
#ifndef __PYX_HAVE__PyCafe
#define __PYX_HAVE__PyCafe
#ifndef __PYX_HAVE_API__PyCafe
#ifndef __PYX_EXTERN_C
#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
#define __PYX_EXTERN_C extern
#endif
#endif
#ifndef DL_IMPORT
#define DL_IMPORT(_T) _T
#endif
__PYX_EXTERN_C DL_IMPORT(void) cy_data_event_handler_wrapper(void *, unsigned int, std::string, PVDataHolder);
__PYX_EXTERN_C DL_IMPORT(void) cy_ctrl_event_handler_wrapper(void *, unsigned int, std::string, PVCtrlHolder);
__PYX_EXTERN_C DL_IMPORT(void) cy_event_handler_wrapper(void *, unsigned int, std::string);
__PYX_EXTERN_C DL_IMPORT(void) cy_connect_handler_wrapper(void *, unsigned int, std::string, int);
__PYX_EXTERN_C DL_IMPORT(void) py_cb_wrapper(PVDataHolder, unsigned int, std::string);
__PYX_EXTERN_C DL_IMPORT(void) py_cb_ctrl_wrapper(PVCtrlHolder, unsigned int, std::string);
__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_wrapper(unsigned int);
__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_monid_wrapper(unsigned int, unsigned long);
__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_get_wrapper(unsigned int);
__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_put_wrapper(unsigned int);
__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_open_wrapper(unsigned int, int);
__PYX_EXTERN_C DL_IMPORT(void) py_cb_handle_connect_wrapper(unsigned int, std::string, int);
#endif /* !__PYX_HAVE_API__PyCafe */
#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initPyCafe(void);
#else
PyMODINIT_FUNC PyInit_PyCafe(void);
#endif
#endif /* !__PYX_HAVE__PyCafe */
+1
View File
@@ -0,0 +1 @@
../PyCafeDefs_api.pxi
+1
View File
@@ -0,0 +1 @@
../PyCafeDefs_pub.pxi
+1 -1
View File
@@ -1,4 +1,4 @@
source /opt/gfa/python 3.5
python setup3.5_release.py build_ext -i
export PYTHONPATH=.:/opt/gfa/cafe/python/python-3.5/pycafe-1.8.0/lib
export PYTHONPATH=.:/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/lib
export LD_LIBRARY_PATH=./
+1 -1
View File
@@ -5,7 +5,7 @@
##### CHANGE AS APPROPRIATE #################
#Cython Version to install
CYCAFE_VERSION=pycafe-1.8.0
CYCAFE_VERSION=pycafe-1.12.5-gcc-7.3.0
#CAFE project base
#CAFE_BASE=${EPICS_EXTENSIONS}/CAFE
+1
View File
@@ -0,0 +1 @@
../python35_header.pxi
+24 -8
View File
@@ -1,3 +1,4 @@
import sys
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
@@ -13,19 +14,34 @@ setup(
'/usr/local/epics/base/include/os/Linux',
'/opt/gfa/cafe/boost/boost_1_61_0/include',
'/opt/gfa/cafe/boost/boost_1_61_0/include/boost',
'/opt/gfa/cafe/python/python-3.5/pycafe-1.8.0/include',
'/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/include',
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/include',
'/opt/gfa/zmq/curl-7.54.1/include',
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include',
'.', get_include()],
library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64',
'/opt/gfa/cafe/python/python-3.5/pycafe-1.8.0/lib',
'/opt/gfa/python-3.5/latest/lib'
'/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/lib',
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib',
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0',
'/opt/gfa/zmq/curl-7.54.1/lib',
'/opt/gfa/python-3.5/latest/lib',
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64',
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib'
],
runtime_library_dirs=['/usr/local/epics/base/lib/SL6-x86_64',
'/opt/gfa/cafe/python/python-3.5/pycafe-1.8.0/lib',
'/opt/gfa/python-3.5/latest/lib'
runtime_library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64',
'/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/lib',
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib',
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0',
'/opt/gfa/zmq/curl-7.54.1/lib',
'/opt/gfa/python-3.5/latest/lib',
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64',
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib'
],
libraries=['ca','Com','dl','cafe'])
libraries=['ca','Com','dl','cafe'])
], annotate=False,
compiler_directives={'embedsignature': False, 'language_level': 3, 'c_string_type': 'str',
'c_string_encoding' : 'ascii', 'warning_errors' : False, 'py2_import': False, 'warn.unreachable': False,
'remove_unreachable': False})
'remove_unreachable': False},
compile_time_env={'PY_VERSION_HEX':sys.hexversion, 'PY_EXT_C': True}
)
)
+171098
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.
+45
View File
@@ -0,0 +1,45 @@
/* Generated by Cython 0.29.2 */
#ifndef __PYX_HAVE__PyCafe
#define __PYX_HAVE__PyCafe
#ifndef __PYX_HAVE_API__PyCafe
#ifndef __PYX_EXTERN_C
#ifdef __cplusplus
#define __PYX_EXTERN_C extern "C"
#else
#define __PYX_EXTERN_C extern
#endif
#endif
#ifndef DL_IMPORT
#define DL_IMPORT(_T) _T
#endif
__PYX_EXTERN_C void cy_data_event_handler_wrapper(void *, unsigned int, std::string, PVDataHolder);
__PYX_EXTERN_C void cy_ctrl_event_handler_wrapper(void *, unsigned int, std::string, PVCtrlHolder);
__PYX_EXTERN_C void cy_event_handler_wrapper(void *, unsigned int, std::string);
__PYX_EXTERN_C void cy_connect_handler_wrapper(void *, unsigned int, std::string, int);
__PYX_EXTERN_C void py_cb_wrapper(PVDataHolder, unsigned int, std::string);
__PYX_EXTERN_C void py_cb_ctrl_wrapper(PVCtrlHolder, unsigned int, std::string);
__PYX_EXTERN_C void py_cb_handle_wrapper(unsigned int);
__PYX_EXTERN_C void py_cb_handle_monid_wrapper(unsigned int, unsigned long);
__PYX_EXTERN_C void py_cb_handle_get_wrapper(unsigned int);
__PYX_EXTERN_C void py_cb_handle_put_wrapper(unsigned int);
__PYX_EXTERN_C void py_cb_handle_open_wrapper(unsigned int, int);
__PYX_EXTERN_C void py_cb_handle_connect_wrapper(unsigned int, std::string, int);
#endif /* !__PYX_HAVE_API__PyCafe */
/* WARNING: the interface of the module init function changed in CPython 3.5. */
/* It now returns a PyModuleDef instance instead of a PyModule instance. */
#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initPyCafe(void);
#else
PyMODINIT_FUNC PyInit_PyCafe(void);
#endif
#endif /* !__PYX_HAVE__PyCafe */
+1
View File
@@ -0,0 +1 @@
../PyCafe.pxd
+1
View File
@@ -0,0 +1 @@
../PyCafe.pyx
+1
View File
@@ -0,0 +1 @@
../PyCafeDefs.pxi
+1
View File
@@ -0,0 +1 @@
../PyCafeDefs_api.pxi
+1
View File
@@ -0,0 +1 @@
../PyCafeDefs_pub.pxi
+4
View File
@@ -0,0 +1,4 @@
source /opt/gfa/python 3.7
python setup3.7_release.py build_ext -i
export PYTHONPATH=.:/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/lib
export LD_LIBRARY_PATH=./
+4
View File
@@ -0,0 +1,4 @@
source /opt/gfa/python 3.5
python setup3.5_release.py build_ext -i
export PYTHONPATH=.:/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/lib
export LD_LIBRARY_PATH=./
+1
View File
@@ -0,0 +1 @@
../sf_ar_cNodes.xml
+1
View File
@@ -0,0 +1 @@
../examples.py
+7
View File
@@ -0,0 +1,7 @@
source /opt/gfa/python 3.5
export SFEL_OMC_PYTHONPATH=/afs/psi.ch/intranet/SF/Applications/on-line_model/default/PythonModule
export SFEL_LAYOUT_PYTHONPATH=/afs/psi.ch/intranet/SF/Applications/on-line_model/default/scripts/VA
export PYTHONPATH=.:$SFEL_LAYOUT_PYTHONPATH:$SFEL_OMC_PYTHONPATH:/opt/gfa/cafe/python/python-3.5/latest/lib
export LD_LIBRARY_PATH=/opt/gfa/cafe/python/python-3.5/latest/lib
python examples.py
+1
View File
@@ -0,0 +1 @@
../gDBPM.xml
+36
View File
@@ -0,0 +1,36 @@
#
# Jan Chrin
# July 2015
#
##### CHANGE AS APPROPRIATE #################
#Cython Version to install
CYCAFE_VERSION=pycafe-1.12.5-gcc-7.3.0
#CAFE project base
#CAFE_BASE=${EPICS_EXTENSIONS}/CAFE
CAFE_BASE=/opt/gfa/cafe/python/python-3.5
CAFE_CYCAFE_BASE=${CAFE_BASE}/${CYCAFE_VERSION}
INSTALL_PATH_AFS=/afs/psi.ch/intranet/Controls/cafe/CAFE/cycafe/$(CYCAFE_VERSION)/lib/${EPICS_HOST_ARCH}
INSTALL_PATH= $(CAFE_CYCAFE_BASE)/lib
EXAMPLES_INSTALL_PATH= $(CAFE_CYCAFE_BASE)/examples
#############################################
install_local: PyCafe.cpython-35m-x86_64-linux-gnu.so
mkdir -p ${EPICS_HOST_ARCH}
cp PyCafe.cpython-35m-x86_64-linux-gnu.so ${EPICS_HOST_ARCH}
mkdir -p ${INSTALL_PATH_AFS}
cp PyCafe.cpython-35m-x86_64-linux-gnu.so ${INSTALL_PATH_AFS}
install_rel: PyCafe.cpython-35m-x86_64-linux-gnu.so
mkdir -p $(INSTALL_PATH)
cp PyCafe.cpython-35m-x86_64-linux-gnu.so $(INSTALL_PATH)
mkdir -p $(EXAMPLES_INSTALL_PATH)
cp examples.py $(EXAMPLES_INSTALL_PATH)
cp examples.sh $(EXAMPLES_INSTALL_PATH)
+1
View File
@@ -0,0 +1 @@
../python35_header.pxi
+47
View File
@@ -0,0 +1,47 @@
import sys
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
from numpy import get_include
#runtime_library_dirs do not override LD_LIBRARY_PATH!
setup(
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
language="c++",
include_dirs=[ '/opt/gfa/python-3.5/latest/include/python3.5m',
'/usr/local/epics/base/include',
'/usr/local/epics/base/include/os/Linux',
'/opt/gfa/cafe/boost/boost_1_61_0/include',
'/opt/gfa/cafe/boost/boost_1_61_0/include/boost',
'/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/include',
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/include',
'/opt/gfa/zmq/curl-7.54.1/include',
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include',
'.', get_include()],
library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64',
'/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/lib',
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib',
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0',
'/opt/gfa/zmq/curl-7.54.1/lib',
'/opt/gfa/python-3.5/latest/lib',
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64',
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib'
],
runtime_library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64',
'/opt/gfa/cafe/python/python-3.5/pyzcafe-1.12.5-gcc-7.3.0/lib',
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib',
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0',
'/opt/gfa/zmq/curl-7.54.1/lib',
'/opt/gfa/python-3.5/latest/lib',
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64',
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib'
],
libraries=['ca','Com','dl','cafe'])
], annotate=False,
compiler_directives={'embedsignature': False, 'language_level': 3, 'c_string_type': 'str',
'c_string_encoding' : 'ascii', 'warning_errors' : False, 'py2_import': False, 'warn.unreachable': False,
'remove_unreachable': False},
compile_time_env={'PY_VERSION_HEX':sys.hexversion, 'PY_EXT_C': True}
)
)
+47
View File
@@ -0,0 +1,47 @@
import sys
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
from numpy import get_include
#runtime_library_dirs do not override LD_LIBRARY_PATH!
setup(
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
language="c++",
include_dirs=[ '/opt/gfa/python-3.7/latest/include/python3.7m',
'/usr/local/epics/base/include',
'/usr/local/epics/base/include/os/Linux',
'/opt/gfa/cafe/boost/boost_1_61_0/include',
'/opt/gfa/cafe/boost/boost_1_61_0/include/boost',
'/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include',
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/include',
'/opt/gfa/zmq/curl-7.54.1/include',
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include',
'.', get_include()],
library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64',
'/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/lib',
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib',
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0',
'/opt/gfa/zmq/curl-7.54.1/lib',
'/opt/gfa/python-3.7/latest/lib',
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64',
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib'
],
runtime_library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64',
'/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/lib',
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib',
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0',
'/opt/gfa/zmq/curl-7.54.1/lib',
'/opt/gfa/python-3.7/latest/lib',
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64',
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib'
],
libraries=['ca','Com','dl','cafe'])
], annotate=False,
compiler_directives={'embedsignature': False, 'language_level': 3, 'c_string_type': 'str',
'c_string_encoding' : 'ascii', 'py2_import': False, 'warn.unreachable': False,
'remove_unreachable': False},
compile_time_env={'PY_VERSION_HEX':sys.hexversion, 'PY_EXT_C': True}
)
)
+47
View File
@@ -0,0 +1,47 @@
import sys
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
from numpy import get_include
#runtime_library_dirs do not override LD_LIBRARY_PATH!
setup(
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
language="c++",
include_dirs=[ '/opt/gfa/python-3.7/latest/include/python3.7m',
'/usr/local/epics/base/include',
'/usr/local/epics/base/include/os/Linux',
'/opt/gfa/cafe/boost/boost_1_61_0/include',
'/opt/gfa/cafe/boost/boost_1_61_0/include/boost',
'/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/include',
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/include',
'/opt/gfa/zmq/curl-7.54.1/include',
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/include',
'.', get_include()],
library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64',
'/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/lib',
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib',
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0',
'/opt/gfa/zmq/curl-7.54.1/lib',
'/opt/gfa/python-3.7/latest/lib',
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64',
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib'
],
runtime_library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64',
'/opt/gfa/cafe/python/python-3.7/pyzcafe-1.12.5-gcc-7.3.0/lib',
'/opt/gfa/zmq/zeromq-4.2.3-gcc-6.3.0/lib',
'/opt/gfa/zmsglog/json/jsoncpp-src-0.6.0-rc2/libs/linux-gcc-6.3.0',
'/opt/gfa/zmq/curl-7.54.1/lib',
'/opt/gfa/python-3.7/latest/lib',
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib64',
'/afs/psi.ch/sys/psi.x86_64_slp6/Programming/gcc/7.3.0/lib'
],
libraries=['ca','Com','dl','cafe'])
], annotate=False,
compiler_directives={'embedsignature': False, 'language_level': 3, 'c_string_type': 'str',
'c_string_encoding' : 'ascii', 'warning_errors' : False, 'py2_import': False, 'warn.unreachable': False,
'remove_unreachable': False},
compile_time_env={'PY_VERSION_HEX':sys.hexversion, 'PY_EXT_C': True}
)
)
+3
View File
@@ -0,0 +1,3 @@
cdef extern from "Python.h":
ctypedef extern class builtins.Exception[object PyBaseExceptionObject]:
pass
+13
View File
@@ -0,0 +1,13 @@
cdef extern from "Python.h":
ctypedef enum PyGILState_STATE:
PyGILState_LOCKED = 0
PyGILState_UNLOCKED = 1
void PyEval_InitThreads()
void Py_Initialize()
PyGILState_STATE PyGILState_Ensure()
void PyGILState_Release(PyGILState_STATE)
char* __FILE__
int __LINE__