8 Commits

Author SHA1 Message Date
56fe465ee4 cafe-1.13.0 environment variables for setup scripts 2021-03-22 15:43:26 +01:00
03c8a5294e cafe-1.13.0 setup_py37_sls2.py 2021-03-22 13:14:29 +01:00
662a7257e8 cafe-1.13.0 2021-03-22 12:40:09 +01:00
39607b33e2 cafe-1.12.5 release 2021-03-16 09:33:22 +01:00
603eda7531 rm --cached ... 2018-12-20 10:44:04 +01:00
a3690b06e4 new release 2018-12-14 15:55:57 +01:00
8e1a1595e0 open methods refined 2017-11-22 14:16:25 +01:00
bc87ffe6ea Connection time optimized 2017-11-14 09:26:02 +01:00
52 changed files with 493585 additions and 9813 deletions

13
.gitignore vendored
View File

@@ -1,5 +1,10 @@
build
python-3.5/*.cpp
python-3.5/*.so
python-3.5/*.*~
python-3.5/SL6-x86_64
*.*~
*.*-*
python3.5
python3.5-sf
python3.7
python3.7-sf
python3.7-sls2
z_python-3.5-old
z_python-3.7-old

152434
PyCafe.cpp Normal file

File diff suppressed because it is too large Load Diff

42
PyCafe.h Normal file
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 */

52330
PyCafe.html Normal file

File diff suppressed because it is too large Load Diff

1141
PyCafe.pxd

File diff suppressed because it is too large Load Diff

1
PyCafe.pxd Symbolic link
View File

@@ -0,0 +1 @@
PyCafe_sls.pxd

Binary file not shown.

12410
PyCafe.pyx

File diff suppressed because it is too large Load Diff

17857
PyCafeDefs.html Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1 +0,0 @@
PyCafeDefs_api.pxi

1375
PyCafeDefs.pxi Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2119
PyCafeDefs_api_full.pxi Normal file

File diff suppressed because it is too large Load Diff

1845
PyCafeDefs_pub.html Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

23201
PyCafeDefs_sf.html Normal file

File diff suppressed because it is too large Load Diff

1859
PyCafeDefs_sf.pxi Normal file

File diff suppressed because it is too large Load Diff

166071
PyCafe_sf.cpp Normal file

File diff suppressed because it is too large Load Diff

42
PyCafe_sf.h Normal file
View File

@@ -0,0 +1,42 @@
/* Generated by Cython 0.23.4 */
#ifndef __PYX_HAVE__PyCafe_sf
#define __PYX_HAVE__PyCafe_sf
#ifndef __PYX_HAVE_API__PyCafe_sf
#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_sf */
#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initPyCafe_sf(void);
#else
PyMODINIT_FUNC PyInit_PyCafe_sf(void);
#endif
#endif /* !__PYX_HAVE__PyCafe_sf */

54836
PyCafe_sf.html Normal file

File diff suppressed because it is too large Load Diff

1447
PyCafe_sf.pxd Normal file

File diff suppressed because it is too large Load Diff

7695
PyCafe_sf.pyx Normal file

File diff suppressed because it is too large Load Diff

1361
PyCafe_sls.pxd Normal file

File diff suppressed because it is too large Load Diff

22
README Normal file
View File

@@ -0,0 +1,22 @@
######
# Build for python 3.7:
# source build_py37.sh
#
# Special build for swissfel - with zmq libraries:
# source build_py37_sf.sh
#
# Special build for sls2 - links to epics7:
# source build_py37_sls2.sh
# Build for python 3.5:
# source build_py35.sh
#
# Special build for swissfel - with zmq libraries:
# source build_py35_sf.sh
#
###
### Install directory:
# ./python<version>/lib/${EPICS_HOST_ARCH}
# where <version> is 3.7, 3.7-sf, 3.7-sls2
# 3.5, 3.5-sf

10
build_py35.sh Normal file
View File

@@ -0,0 +1,10 @@
module unload gcc
module load gcc/7.3.0
rm -f PyCafe.cpp
rm -f PyCafe.h
rm -f PyCafe.pxd
ln -s PyCafe_sls.pxd PyCafe.pxd
source /opt/gfa/python 3.5
python setup_py35.py build_ext -b ./python3.5/lib/${EPICS_HOST_ARCH}
cp examples.py ./python3.5/lib/${EPICS_HOST_ARCH}

9
build_py35_sf.sh Normal file
View File

@@ -0,0 +1,9 @@
module unload gcc
module load gcc/7.3.0
rm -f PyCafe_sf.cpp
rm -f PyCafe_sf.h
rm -f PyCafe.pxd
ln -s PyCafe_sf.pxd PyCafe.pxd
source /opt/gfa/python 3.5
python setup_py35_sf.py build_ext -b ./python3.5-sf/lib/${EPICS_HOST_ARCH}
cp examples.py ./python3.5-sf/lib/${EPICS_HOST_ARCH}

10
build_py37.sh Normal file
View File

@@ -0,0 +1,10 @@
module unload gcc
module load gcc/7.3.0
rm -f PyCafe.cpp
rm -f PyCafe.h
rm -f PyCafe.pxd
ln -s PyCafe_sls.pxd PyCafe.pxd
source /opt/gfa/python 3.7
python setup_py37.py build_ext -b ./python3.7/lib/${EPICS_HOST_ARCH}
cp examples.py ./python3.7/lib/${EPICS_HOST_ARCH}

9
build_py37_sf.sh Normal file
View File

@@ -0,0 +1,9 @@
module unload gcc
module load gcc/7.3.0
rm -f PyCafe_sf.cpp
rm -f PyCafe_sf.h
rm -f PyCafe.pxd
ln -s PyCafe_sf.pxd PyCafe.pxd
source /opt/gfa/python 3.7
python setup_py37_sf.py build_ext -b ./python3.7-sf/lib/${EPICS_HOST_ARCH}
cp examples.py ./python3.7-sf/lib/${EPICS_HOST_ARCH}

9
build_py37_sls2.sh Normal file
View File

@@ -0,0 +1,9 @@
module unload gcc
module load gcc/7.3.0
rm -f PyCafe.cpp
rm -f PyCafe.h
rm -f PyCafe.pxd
ln -s PyCafe_sls.pxd PyCafe.pxd
source /opt/gfa/python 3.7
python setup_py37_sls2.py build_ext -b ./python3.7-sls2/lib/${EPICS_HOST_ARCH}
cp examples.py ./python3.7-sls2/lib/${EPICS_HOST_ARCH}

File diff suppressed because it is too large Load Diff

12
julia/README Normal file
View File

@@ -0,0 +1,12 @@
source /opt/gfa/python 3.7
export PYTHONPATH=/opt/gfa/cafe/python/pycafe/cafe-1.13.0-sls2-gcc-7.3.0/lib/${EPICS_HOST_ARCH}
using PyCall
@pyimport PyCafe
cafe=PyCafe.CyCafe()
cyca=PyCafe.CyCa() #To examine error codes
pvdata=cafe.getPV("SATCL01-MQUA120:I-SET")
pvdata.show()
pvdata.value[1] #Note the indexing in julia starts at 1, as I daresay you will already know
pvdata.status # should equal cyca.ICAFE_NORMAL

62
julia/cafe.jl Normal file
View File

@@ -0,0 +1,62 @@
module MyModule
#First execute the following commands in your console window
#export PYTHONPATH=/opt/gfa/cafe/python/pycafe/pyzcafe-1.12.2-gcc-7.3.0
#Start Julia and change the python version from the default
#to Python 3.7.5 as follows:
#ENV["PYTHON"] = "/opt/gfa/python-3.7/latest/bin/python"
#using Pkg
#Pkg.build("PyCall")
#You may need to restart Julia
using PyCall
py"""
import sys
import time
import PyCafe
cafe = PyCafe.CyCafe()
cyca = PyCafe.CyCa()
print(sys.version) #Should see 3.7.5
pvlist = ["SARFE10-PSSS059:SPECTRUM_X", "SATCL01-MQUA120:I-SET","SATCL01-MQUA120:I-READ", "PV-DOES-NOT:EXIST"]
#Quicker to open all channels with one call
cafe.openPrepare()
handle=cafe.open(pvlist)
cafe.openNowAndWait(0.4)
cafe.setNelem(handle[0], 10) #just read out 10 elements of wf
pvdata=cafe.getPV(handle[0])
print(pvlist[0])
pvdata.show() #shows struct
if pvdata.status == cyca.ICAFE_NORMAL:
print("Value =", pvdata.value)
print("TimeStamp =", pvdata.tsDate)
print(pvlist[1])
pvdata=cafe.getPV(handle[1])
pvdata.show()
pvctrl=cafe.getCtrl(handle[1])
pvctrl.show()
cafe.monitor(handle[2])
for i in range (0, 10):
val = cafe.getCache(handle[2])
print (val)
time.sleep(0.25)
value=cafe.get(handle[3])
print(pvlist[3])
if value is None:
status=cafe.getStatus(handle[3])
print("Status =", status, cafe.getStatusCodeAsText(status))
"""
end

47
makefile Normal file
View File

@@ -0,0 +1,47 @@
#
# Jan Chrin
#
#
##### CHANGE AS APPROPRIATE #################
#
CAFE_CYCAFE_BASE=/opt/gfa/cafe/python/pycafe
INSTALL_PATH_PY= $(CAFE_CYCAFE_BASE)/cafe-1.13.0-gcc-7.3.0/lib/${EPICS_HOST_ARCH}
INSTALL_PATH_SF= $(CAFE_CYCAFE_BASE)/cafe-1.13.0-sf-gcc-7.3.0/lib/${EPICS_HOST_ARCH}
INSTALL_PATH_SLS2= $(CAFE_CYCAFE_BASE)/cafe-1.13.0-sls2-gcc-7.3.0/lib/${EPICS_HOST_ARCH}
#############################################
.DEFAULT_GOAL := help
.PHONY: clean
help:
@echo "Options for make: install_py37 install_py37_sf install_py37_sls2 install_py35 install_py35_sf"
install_py37: python3.7/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so
mkdir -p $(INSTALL_PATH_PY)
cp python3.7/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so $(INSTALL_PATH_PY)
cp python3.7/lib/${EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_PY)
install_py35: python3.5/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so
mkdir -p $(INSTALL_PATH_PY)
cp python3.5/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so $(INSTALL_PATH_PY)
install_py37_sf: python3.7-sf/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so
mkdir -p $(INSTALL_PATH_SF)
cp python3.7-sf/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so $(INSTALL_PATH_SF)
cp python3.7-sf/lib/${EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_SF)
install_py35_sf: python3.5-sf/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so
mkdir -p $(INSTALL_PATH_SF)
cp python3.5-sf/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so $(INSTALL_PATH_SF)
install_py37_sls2: python3.7-sls2/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so
mkdir -p $(INSTALL_PATH_SLS2)
cp python3.7-sls2/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so $(INSTALL_PATH_SLS2)
cp python3.7-sls2/lib/${EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_SLS2)
clean:
rm -f *.o

47
makefile~ Normal file
View File

@@ -0,0 +1,47 @@
#
# Jan Chrin
#
#
##### CHANGE AS APPROPRIATE #################
#
CAFE_CYCAFE_BASE=/opt/gfa/cafe/python/pycafe
INSTALL_PATH_PY= $(CAFE_CYCAFE_BASE)/cafe-1.13.0-gcc-7.3.0/lib/${EPICS_HOST_ARCH}
INSTALL_PATH_SF= $(CAFE_CYCAFE_BASE)/cafe-1.13.0-sf-gcc-7.3.0/lib/${EPICS_HOST_ARCH}
INSTALL_PATH_SLS2= $(CAFE_CYCAFE_BASE)/cafe-1.13.0-sls2-gcc-7.3.0/lib/${EPICS_HOST_ARCH}
#############################################
.DEFAULT_GOAL := help
.PHONY: clean
help:
@echo "Options for make: install_py37"
install_py37: python3.7/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so
mkdir -p $(INSTALL_PATH_PY)
cp python3.7/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so $(INSTALL_PATH_PY)
cp python3.7/lib/${EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_PY)
install_py35: python3.5/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so
mkdir -p $(INSTALL_PATH_PY)
cp python3.5/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so $(INSTALL_PATH_PY)
install_py37_sf: python3.7-sf/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so
mkdir -p $(INSTALL_PATH_SF)
cp python3.7-sf/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so $(INSTALL_PATH_SF)
cp python3.7-sf/lib/${EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_SF)
install_py35_sf: python3.5-sf/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so
mkdir -p $(INSTALL_PATH_SF)
cp python3.5-sf/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-35m-x86_64-linux-gnu.so $(INSTALL_PATH_SF)
install_py37_sls2: python3.7-sls2/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so
mkdir -p $(INSTALL_PATH_SLS2)
cp python3.7-sls2/lib/${EPICS_HOST_ARCH}/PyCafe.cpython-37m-x86_64-linux-gnu.so $(INSTALL_PATH_SLS2)
cp python3.7-sls2/lib/${EPICS_HOST_ARCH}/examples.py $(INSTALL_PATH_SLS2)
clean:
rm -f *.o

View File

@@ -1 +0,0 @@
../PyCafe.pxd

View File

@@ -1 +0,0 @@
../PyCafe.pyx

View File

@@ -1 +0,0 @@
../PyCafeDefs.pxi

View File

@@ -1,115 +0,0 @@
/* Generated by Cython 0.23.4 */
#ifndef __PYX_HAVE_API__PyCafe
#define __PYX_HAVE_API__PyCafe
#include "Python.h"
static void (*__pyx_api_f_6PyCafe_py_cb_wrapper)(PVDataHolder, unsigned int, std::string) = 0;
#define py_cb_wrapper __pyx_api_f_6PyCafe_py_cb_wrapper
static void (*__pyx_api_f_6PyCafe_py_cb_ctrl_wrapper)(PVCtrlHolder, unsigned int, std::string) = 0;
#define py_cb_ctrl_wrapper __pyx_api_f_6PyCafe_py_cb_ctrl_wrapper
static void (*__pyx_api_f_6PyCafe_py_cb_handle_wrapper)(unsigned int) = 0;
#define py_cb_handle_wrapper __pyx_api_f_6PyCafe_py_cb_handle_wrapper
static void (*__pyx_api_f_6PyCafe_py_cb_handle_monid_wrapper)(unsigned int, unsigned long) = 0;
#define py_cb_handle_monid_wrapper __pyx_api_f_6PyCafe_py_cb_handle_monid_wrapper
static void (*__pyx_api_f_6PyCafe_py_cb_handle_get_wrapper)(unsigned int) = 0;
#define py_cb_handle_get_wrapper __pyx_api_f_6PyCafe_py_cb_handle_get_wrapper
static void (*__pyx_api_f_6PyCafe_py_cb_handle_put_wrapper)(unsigned int) = 0;
#define py_cb_handle_put_wrapper __pyx_api_f_6PyCafe_py_cb_handle_put_wrapper
#if !defined(__Pyx_PyIdentifier_FromString)
#if PY_MAJOR_VERSION < 3
#define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
#else
#define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
#endif
#endif
#ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(const char *name) {
PyObject *py_name = 0;
PyObject *py_module = 0;
py_name = __Pyx_PyIdentifier_FromString(name);
if (!py_name)
goto bad;
py_module = PyImport_Import(py_name);
Py_DECREF(py_name);
return py_module;
bad:
Py_XDECREF(py_name);
return 0;
}
#endif
#ifndef __PYX_HAVE_RT_ImportFunction
#define __PYX_HAVE_RT_ImportFunction
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
PyObject *d = 0;
PyObject *cobj = 0;
union {
void (*fp)(void);
void *p;
} tmp;
d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
if (!d)
goto bad;
cobj = PyDict_GetItemString(d, funcname);
if (!cobj) {
PyErr_Format(PyExc_ImportError,
"%.200s does not export expected C function %.200s",
PyModule_GetName(module), funcname);
goto bad;
}
#if PY_VERSION_HEX >= 0x02070000
if (!PyCapsule_IsValid(cobj, sig)) {
PyErr_Format(PyExc_TypeError,
"C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
goto bad;
}
tmp.p = PyCapsule_GetPointer(cobj, sig);
#else
{const char *desc, *s1, *s2;
desc = (const char *)PyCObject_GetDesc(cobj);
if (!desc)
goto bad;
s1 = desc; s2 = sig;
while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
if (*s1 != *s2) {
PyErr_Format(PyExc_TypeError,
"C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
PyModule_GetName(module), funcname, sig, desc);
goto bad;
}
tmp.p = PyCObject_AsVoidPtr(cobj);}
#endif
*f = tmp.fp;
if (!(*f))
goto bad;
Py_DECREF(d);
return 0;
bad:
Py_XDECREF(d);
return -1;
}
#endif
static int import_PyCafe(void) {
PyObject *module = 0;
module = __Pyx_ImportModule("PyCafe");
if (!module) goto bad;
if (__Pyx_ImportFunction(module, "py_cb_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_wrapper, "void (PVDataHolder, unsigned int, std::string)") < 0) goto bad;
if (__Pyx_ImportFunction(module, "py_cb_ctrl_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_ctrl_wrapper, "void (PVCtrlHolder, unsigned int, std::string)") < 0) goto bad;
if (__Pyx_ImportFunction(module, "py_cb_handle_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_handle_wrapper, "void (unsigned int)") < 0) goto bad;
if (__Pyx_ImportFunction(module, "py_cb_handle_monid_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_handle_monid_wrapper, "void (unsigned int, unsigned long)") < 0) goto bad;
if (__Pyx_ImportFunction(module, "py_cb_handle_get_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_handle_get_wrapper, "void (unsigned int)") < 0) goto bad;
if (__Pyx_ImportFunction(module, "py_cb_handle_put_wrapper", (void (**)(void))&__pyx_api_f_6PyCafe_py_cb_handle_put_wrapper, "void (unsigned int)") < 0) goto bad;
Py_DECREF(module); module = 0;
return 0;
bad:
Py_XDECREF(module);
return -1;
}
#endif /* !__PYX_HAVE_API__PyCafe */

View File

@@ -1,4 +0,0 @@
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.3.0-final-2/lib
export LD_LIBRARY_PATH=./

View File

@@ -1 +0,0 @@
../sf_ar_cNodes.xml

View File

@@ -1 +0,0 @@
../examples.py

View File

@@ -1,7 +0,0 @@
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

View File

@@ -1 +0,0 @@
../examplesTest.py

View File

@@ -1 +0,0 @@
../gDBPM.xml

View File

@@ -1,36 +0,0 @@
#
# Jan Chrin
# July 2015
#
##### CHANGE AS APPROPRIATE #################
#Cython Version to install
CYCAFE_VERSION=pycafe-1.3.0-final-2
#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)

View File

@@ -1,31 +0,0 @@
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/pycafe-1.3.0-final-2/include',
'.', get_include()],
library_dirs=[ '/usr/local/epics/base/lib/SL6-x86_64',
'/opt/gfa/cafe/python/python-3.5/pycafe-1.3.0-final-2/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/pycafe-1.3.0-final-2/lib',
'/opt/gfa/python-3.5/latest/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})
)

371
python35_header.html Normal file
View File

@@ -0,0 +1,371 @@
<!DOCTYPE html>
<!-- Generated by Cython 0.23.4 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Cython: python35_header.pxi</title>
<style type="text/css">
body.cython { font-family: courier; font-size: 12; }
.cython.tag { }
.cython.line { margin: 0em }
.cython.code { font-size: 9; color: #444444; display: none; margin: 0px 0px 0px 8px; border-left: 8px none; }
.cython.line .run { background-color: #B0FFB0; }
.cython.line .mis { background-color: #FFB0B0; }
.cython.code.run { border-left: 8px solid #B0FFB0; }
.cython.code.mis { border-left: 8px solid #FFB0B0; }
.cython.code .py_c_api { color: red; }
.cython.code .py_macro_api { color: #FF7000; }
.cython.code .pyx_c_api { color: #FF3000; }
.cython.code .pyx_macro_api { color: #FF7000; }
.cython.code .refnanny { color: #FFA000; }
.cython.code .trace { color: #FFA000; }
.cython.code .error_goto { color: #FFA000; }
.cython.code .coerce { color: #008000; border: 1px dotted #008000 }
.cython.code .py_attr { color: #FF0000; font-weight: bold; }
.cython.code .c_attr { color: #0000FF; }
.cython.code .py_call { color: #FF0000; font-weight: bold; }
.cython.code .c_call { color: #0000FF; }
.cython.score-0 {background-color: #FFFFff;}
.cython.score-1 {background-color: #FFFFe7;}
.cython.score-2 {background-color: #FFFFd4;}
.cython.score-3 {background-color: #FFFFc4;}
.cython.score-4 {background-color: #FFFFb6;}
.cython.score-5 {background-color: #FFFFaa;}
.cython.score-6 {background-color: #FFFF9f;}
.cython.score-7 {background-color: #FFFF96;}
.cython.score-8 {background-color: #FFFF8d;}
.cython.score-9 {background-color: #FFFF86;}
.cython.score-10 {background-color: #FFFF7f;}
.cython.score-11 {background-color: #FFFF79;}
.cython.score-12 {background-color: #FFFF73;}
.cython.score-13 {background-color: #FFFF6e;}
.cython.score-14 {background-color: #FFFF6a;}
.cython.score-15 {background-color: #FFFF66;}
.cython.score-16 {background-color: #FFFF62;}
.cython.score-17 {background-color: #FFFF5e;}
.cython.score-18 {background-color: #FFFF5b;}
.cython.score-19 {background-color: #FFFF57;}
.cython.score-20 {background-color: #FFFF55;}
.cython.score-21 {background-color: #FFFF52;}
.cython.score-22 {background-color: #FFFF4f;}
.cython.score-23 {background-color: #FFFF4d;}
.cython.score-24 {background-color: #FFFF4b;}
.cython.score-25 {background-color: #FFFF48;}
.cython.score-26 {background-color: #FFFF46;}
.cython.score-27 {background-color: #FFFF44;}
.cython.score-28 {background-color: #FFFF43;}
.cython.score-29 {background-color: #FFFF41;}
.cython.score-30 {background-color: #FFFF3f;}
.cython.score-31 {background-color: #FFFF3e;}
.cython.score-32 {background-color: #FFFF3c;}
.cython.score-33 {background-color: #FFFF3b;}
.cython.score-34 {background-color: #FFFF39;}
.cython.score-35 {background-color: #FFFF38;}
.cython.score-36 {background-color: #FFFF37;}
.cython.score-37 {background-color: #FFFF36;}
.cython.score-38 {background-color: #FFFF35;}
.cython.score-39 {background-color: #FFFF34;}
.cython.score-40 {background-color: #FFFF33;}
.cython.score-41 {background-color: #FFFF32;}
.cython.score-42 {background-color: #FFFF31;}
.cython.score-43 {background-color: #FFFF30;}
.cython.score-44 {background-color: #FFFF2f;}
.cython.score-45 {background-color: #FFFF2e;}
.cython.score-46 {background-color: #FFFF2d;}
.cython.score-47 {background-color: #FFFF2c;}
.cython.score-48 {background-color: #FFFF2b;}
.cython.score-49 {background-color: #FFFF2b;}
.cython.score-50 {background-color: #FFFF2a;}
.cython.score-51 {background-color: #FFFF29;}
.cython.score-52 {background-color: #FFFF29;}
.cython.score-53 {background-color: #FFFF28;}
.cython.score-54 {background-color: #FFFF27;}
.cython.score-55 {background-color: #FFFF27;}
.cython.score-56 {background-color: #FFFF26;}
.cython.score-57 {background-color: #FFFF26;}
.cython.score-58 {background-color: #FFFF25;}
.cython.score-59 {background-color: #FFFF24;}
.cython.score-60 {background-color: #FFFF24;}
.cython.score-61 {background-color: #FFFF23;}
.cython.score-62 {background-color: #FFFF23;}
.cython.score-63 {background-color: #FFFF22;}
.cython.score-64 {background-color: #FFFF22;}
.cython.score-65 {background-color: #FFFF22;}
.cython.score-66 {background-color: #FFFF21;}
.cython.score-67 {background-color: #FFFF21;}
.cython.score-68 {background-color: #FFFF20;}
.cython.score-69 {background-color: #FFFF20;}
.cython.score-70 {background-color: #FFFF1f;}
.cython.score-71 {background-color: #FFFF1f;}
.cython.score-72 {background-color: #FFFF1f;}
.cython.score-73 {background-color: #FFFF1e;}
.cython.score-74 {background-color: #FFFF1e;}
.cython.score-75 {background-color: #FFFF1e;}
.cython.score-76 {background-color: #FFFF1d;}
.cython.score-77 {background-color: #FFFF1d;}
.cython.score-78 {background-color: #FFFF1c;}
.cython.score-79 {background-color: #FFFF1c;}
.cython.score-80 {background-color: #FFFF1c;}
.cython.score-81 {background-color: #FFFF1c;}
.cython.score-82 {background-color: #FFFF1b;}
.cython.score-83 {background-color: #FFFF1b;}
.cython.score-84 {background-color: #FFFF1b;}
.cython.score-85 {background-color: #FFFF1a;}
.cython.score-86 {background-color: #FFFF1a;}
.cython.score-87 {background-color: #FFFF1a;}
.cython.score-88 {background-color: #FFFF1a;}
.cython.score-89 {background-color: #FFFF19;}
.cython.score-90 {background-color: #FFFF19;}
.cython.score-91 {background-color: #FFFF19;}
.cython.score-92 {background-color: #FFFF19;}
.cython.score-93 {background-color: #FFFF18;}
.cython.score-94 {background-color: #FFFF18;}
.cython.score-95 {background-color: #FFFF18;}
.cython.score-96 {background-color: #FFFF18;}
.cython.score-97 {background-color: #FFFF17;}
.cython.score-98 {background-color: #FFFF17;}
.cython.score-99 {background-color: #FFFF17;}
.cython.score-100 {background-color: #FFFF17;}
.cython.score-101 {background-color: #FFFF16;}
.cython.score-102 {background-color: #FFFF16;}
.cython.score-103 {background-color: #FFFF16;}
.cython.score-104 {background-color: #FFFF16;}
.cython.score-105 {background-color: #FFFF16;}
.cython.score-106 {background-color: #FFFF15;}
.cython.score-107 {background-color: #FFFF15;}
.cython.score-108 {background-color: #FFFF15;}
.cython.score-109 {background-color: #FFFF15;}
.cython.score-110 {background-color: #FFFF15;}
.cython.score-111 {background-color: #FFFF15;}
.cython.score-112 {background-color: #FFFF14;}
.cython.score-113 {background-color: #FFFF14;}
.cython.score-114 {background-color: #FFFF14;}
.cython.score-115 {background-color: #FFFF14;}
.cython.score-116 {background-color: #FFFF14;}
.cython.score-117 {background-color: #FFFF14;}
.cython.score-118 {background-color: #FFFF13;}
.cython.score-119 {background-color: #FFFF13;}
.cython.score-120 {background-color: #FFFF13;}
.cython.score-121 {background-color: #FFFF13;}
.cython.score-122 {background-color: #FFFF13;}
.cython.score-123 {background-color: #FFFF13;}
.cython.score-124 {background-color: #FFFF13;}
.cython.score-125 {background-color: #FFFF12;}
.cython.score-126 {background-color: #FFFF12;}
.cython.score-127 {background-color: #FFFF12;}
.cython.score-128 {background-color: #FFFF12;}
.cython.score-129 {background-color: #FFFF12;}
.cython.score-130 {background-color: #FFFF12;}
.cython.score-131 {background-color: #FFFF12;}
.cython.score-132 {background-color: #FFFF11;}
.cython.score-133 {background-color: #FFFF11;}
.cython.score-134 {background-color: #FFFF11;}
.cython.score-135 {background-color: #FFFF11;}
.cython.score-136 {background-color: #FFFF11;}
.cython.score-137 {background-color: #FFFF11;}
.cython.score-138 {background-color: #FFFF11;}
.cython.score-139 {background-color: #FFFF11;}
.cython.score-140 {background-color: #FFFF11;}
.cython.score-141 {background-color: #FFFF10;}
.cython.score-142 {background-color: #FFFF10;}
.cython.score-143 {background-color: #FFFF10;}
.cython.score-144 {background-color: #FFFF10;}
.cython.score-145 {background-color: #FFFF10;}
.cython.score-146 {background-color: #FFFF10;}
.cython.score-147 {background-color: #FFFF10;}
.cython.score-148 {background-color: #FFFF10;}
.cython.score-149 {background-color: #FFFF10;}
.cython.score-150 {background-color: #FFFF0f;}
.cython.score-151 {background-color: #FFFF0f;}
.cython.score-152 {background-color: #FFFF0f;}
.cython.score-153 {background-color: #FFFF0f;}
.cython.score-154 {background-color: #FFFF0f;}
.cython.score-155 {background-color: #FFFF0f;}
.cython.score-156 {background-color: #FFFF0f;}
.cython.score-157 {background-color: #FFFF0f;}
.cython.score-158 {background-color: #FFFF0f;}
.cython.score-159 {background-color: #FFFF0f;}
.cython.score-160 {background-color: #FFFF0f;}
.cython.score-161 {background-color: #FFFF0e;}
.cython.score-162 {background-color: #FFFF0e;}
.cython.score-163 {background-color: #FFFF0e;}
.cython.score-164 {background-color: #FFFF0e;}
.cython.score-165 {background-color: #FFFF0e;}
.cython.score-166 {background-color: #FFFF0e;}
.cython.score-167 {background-color: #FFFF0e;}
.cython.score-168 {background-color: #FFFF0e;}
.cython.score-169 {background-color: #FFFF0e;}
.cython.score-170 {background-color: #FFFF0e;}
.cython.score-171 {background-color: #FFFF0e;}
.cython.score-172 {background-color: #FFFF0e;}
.cython.score-173 {background-color: #FFFF0d;}
.cython.score-174 {background-color: #FFFF0d;}
.cython.score-175 {background-color: #FFFF0d;}
.cython.score-176 {background-color: #FFFF0d;}
.cython.score-177 {background-color: #FFFF0d;}
.cython.score-178 {background-color: #FFFF0d;}
.cython.score-179 {background-color: #FFFF0d;}
.cython.score-180 {background-color: #FFFF0d;}
.cython.score-181 {background-color: #FFFF0d;}
.cython.score-182 {background-color: #FFFF0d;}
.cython.score-183 {background-color: #FFFF0d;}
.cython.score-184 {background-color: #FFFF0d;}
.cython.score-185 {background-color: #FFFF0d;}
.cython.score-186 {background-color: #FFFF0d;}
.cython.score-187 {background-color: #FFFF0c;}
.cython.score-188 {background-color: #FFFF0c;}
.cython.score-189 {background-color: #FFFF0c;}
.cython.score-190 {background-color: #FFFF0c;}
.cython.score-191 {background-color: #FFFF0c;}
.cython.score-192 {background-color: #FFFF0c;}
.cython.score-193 {background-color: #FFFF0c;}
.cython.score-194 {background-color: #FFFF0c;}
.cython.score-195 {background-color: #FFFF0c;}
.cython.score-196 {background-color: #FFFF0c;}
.cython.score-197 {background-color: #FFFF0c;}
.cython.score-198 {background-color: #FFFF0c;}
.cython.score-199 {background-color: #FFFF0c;}
.cython.score-200 {background-color: #FFFF0c;}
.cython.score-201 {background-color: #FFFF0c;}
.cython.score-202 {background-color: #FFFF0c;}
.cython.score-203 {background-color: #FFFF0b;}
.cython.score-204 {background-color: #FFFF0b;}
.cython.score-205 {background-color: #FFFF0b;}
.cython.score-206 {background-color: #FFFF0b;}
.cython.score-207 {background-color: #FFFF0b;}
.cython.score-208 {background-color: #FFFF0b;}
.cython.score-209 {background-color: #FFFF0b;}
.cython.score-210 {background-color: #FFFF0b;}
.cython.score-211 {background-color: #FFFF0b;}
.cython.score-212 {background-color: #FFFF0b;}
.cython.score-213 {background-color: #FFFF0b;}
.cython.score-214 {background-color: #FFFF0b;}
.cython.score-215 {background-color: #FFFF0b;}
.cython.score-216 {background-color: #FFFF0b;}
.cython.score-217 {background-color: #FFFF0b;}
.cython.score-218 {background-color: #FFFF0b;}
.cython.score-219 {background-color: #FFFF0b;}
.cython.score-220 {background-color: #FFFF0b;}
.cython.score-221 {background-color: #FFFF0b;}
.cython.score-222 {background-color: #FFFF0a;}
.cython.score-223 {background-color: #FFFF0a;}
.cython.score-224 {background-color: #FFFF0a;}
.cython.score-225 {background-color: #FFFF0a;}
.cython.score-226 {background-color: #FFFF0a;}
.cython.score-227 {background-color: #FFFF0a;}
.cython.score-228 {background-color: #FFFF0a;}
.cython.score-229 {background-color: #FFFF0a;}
.cython.score-230 {background-color: #FFFF0a;}
.cython.score-231 {background-color: #FFFF0a;}
.cython.score-232 {background-color: #FFFF0a;}
.cython.score-233 {background-color: #FFFF0a;}
.cython.score-234 {background-color: #FFFF0a;}
.cython.score-235 {background-color: #FFFF0a;}
.cython.score-236 {background-color: #FFFF0a;}
.cython.score-237 {background-color: #FFFF0a;}
.cython.score-238 {background-color: #FFFF0a;}
.cython.score-239 {background-color: #FFFF0a;}
.cython.score-240 {background-color: #FFFF0a;}
.cython.score-241 {background-color: #FFFF0a;}
.cython.score-242 {background-color: #FFFF0a;}
.cython.score-243 {background-color: #FFFF0a;}
.cython.score-244 {background-color: #FFFF0a;}
.cython.score-245 {background-color: #FFFF0a;}
.cython.score-246 {background-color: #FFFF09;}
.cython.score-247 {background-color: #FFFF09;}
.cython.score-248 {background-color: #FFFF09;}
.cython.score-249 {background-color: #FFFF09;}
.cython.score-250 {background-color: #FFFF09;}
.cython.score-251 {background-color: #FFFF09;}
.cython.score-252 {background-color: #FFFF09;}
.cython.score-253 {background-color: #FFFF09;}
.cython.score-254 {background-color: #FFFF09;}
.cython .hll { background-color: #ffffcc }
.cython { background: #f8f8f8; }
.cython .c { color: #408080; font-style: italic } /* Comment */
.cython .err { border: 1px solid #FF0000 } /* Error */
.cython .k { color: #008000; font-weight: bold } /* Keyword */
.cython .o { color: #666666 } /* Operator */
.cython .cm { color: #408080; font-style: italic } /* Comment.Multiline */
.cython .cp { color: #BC7A00 } /* Comment.Preproc */
.cython .c1 { color: #408080; font-style: italic } /* Comment.Single */
.cython .cs { color: #408080; font-style: italic } /* Comment.Special */
.cython .gd { color: #A00000 } /* Generic.Deleted */
.cython .ge { font-style: italic } /* Generic.Emph */
.cython .gr { color: #FF0000 } /* Generic.Error */
.cython .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.cython .gi { color: #00A000 } /* Generic.Inserted */
.cython .go { color: #888888 } /* Generic.Output */
.cython .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.cython .gs { font-weight: bold } /* Generic.Strong */
.cython .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.cython .gt { color: #0044DD } /* Generic.Traceback */
.cython .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.cython .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.cython .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.cython .kp { color: #008000 } /* Keyword.Pseudo */
.cython .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.cython .kt { color: #B00040 } /* Keyword.Type */
.cython .m { color: #666666 } /* Literal.Number */
.cython .s { color: #BA2121 } /* Literal.String */
.cython .na { color: #7D9029 } /* Name.Attribute */
.cython .nb { color: #008000 } /* Name.Builtin */
.cython .nc { color: #0000FF; font-weight: bold } /* Name.Class */
.cython .no { color: #880000 } /* Name.Constant */
.cython .nd { color: #AA22FF } /* Name.Decorator */
.cython .ni { color: #999999; font-weight: bold } /* Name.Entity */
.cython .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.cython .nf { color: #0000FF } /* Name.Function */
.cython .nl { color: #A0A000 } /* Name.Label */
.cython .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.cython .nt { color: #008000; font-weight: bold } /* Name.Tag */
.cython .nv { color: #19177C } /* Name.Variable */
.cython .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.cython .w { color: #bbbbbb } /* Text.Whitespace */
.cython .mb { color: #666666 } /* Literal.Number.Bin */
.cython .mf { color: #666666 } /* Literal.Number.Float */
.cython .mh { color: #666666 } /* Literal.Number.Hex */
.cython .mi { color: #666666 } /* Literal.Number.Integer */
.cython .mo { color: #666666 } /* Literal.Number.Oct */
.cython .sb { color: #BA2121 } /* Literal.String.Backtick */
.cython .sc { color: #BA2121 } /* Literal.String.Char */
.cython .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.cython .s2 { color: #BA2121 } /* Literal.String.Double */
.cython .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
.cython .sh { color: #BA2121 } /* Literal.String.Heredoc */
.cython .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
.cython .sx { color: #008000 } /* Literal.String.Other */
.cython .sr { color: #BB6688 } /* Literal.String.Regex */
.cython .s1 { color: #BA2121 } /* Literal.String.Single */
.cython .ss { color: #19177C } /* Literal.String.Symbol */
.cython .bp { color: #008000 } /* Name.Builtin.Pseudo */
.cython .vc { color: #19177C } /* Name.Variable.Class */
.cython .vg { color: #19177C } /* Name.Variable.Global */
.cython .vi { color: #19177C } /* Name.Variable.Instance */
.cython .il { color: #666666 } /* Literal.Number.Integer.Long */
</style>
<script>
function toggleDiv(id) {
theDiv = id.nextElementSibling
if (theDiv.style.display != 'block') theDiv.style.display = 'block';
else theDiv.style.display = 'none';
}
</script>
</head>
<body class="cython">
<p><span style="border-bottom: solid 1px grey;">Generated by Cython 0.23.4</span></p>
<p>
<span style="background-color: #FFFF00">Yellow lines</span> hint at Python interaction.<br />
Click on a line that starts with a "<code>+</code>" to see the C code that Cython generated for it.
</p>
<p>Raw output: <a href="python35_header.pxi">python35_header.pxi</a></p>
<div class="cython"><pre class="cython line score-0">&#xA0;<span class="">1</span>: <span class="k">cdef</span> <span class="kr">extern</span> <span class="k">from</span> <span class="s">&quot;Python.h&quot;</span><span class="p">:</span></pre>
<pre class="cython line score-0">&#xA0;<span class="">2</span>: <span class="k">ctypedef</span> <span class="n">extern</span> <span class="k">class</span> <span class="nc">builtins</span><span class="o">.</span><span class="n">Exception</span><span class="p">[</span><span class="nb">object</span> <span class="n">PyBaseExceptionObject</span><span class="p">]:</span></pre>
<pre class="cython line score-0">&#xA0;<span class="">3</span>: <span class="k">pass</span></pre>
</div></body></html>

3
python35_header.pxi Normal file
View File

@@ -0,0 +1,3 @@
cdef extern from "Python.h":
ctypedef extern class builtins.Exception[object PyBaseExceptionObject]:
pass

13
python3z_header.pxi Normal file
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__

43
setup_py35.py Normal file
View File

@@ -0,0 +1,43 @@
import os
import sys
from distutils.core import setup
from distutils.extension import Extension
from Cython.Compiler.Main import default_options
default_options['emit_linenums'] = True
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',
os.environ['EPICS'] + '/base/include',
os.environ['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/cpp/cafe-1.13.0-py35-gcc-7.3.0/include',
'.', get_include()],
library_dirs=[ os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
'/opt/gfa/cafe/cpp/cafe-1.13.0-py35-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
'/opt/gfa/python-3.5/latest/lib',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
],
runtime_library_dirs=[os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
'/opt/gfa/cafe/cpp/cafe-1.13.0-py35-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
'/opt/gfa/python-3.5/latest/lib',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
],
libraries=['ca','Com','dl','cafe'])
], annotate=True,
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}
)
)

51
setup_py35_sf.py Normal file
View File

@@ -0,0 +1,51 @@
import os
import sys
from distutils.core import setup
from distutils.extension import Extension
from Cython.Compiler.Main import default_options
default_options['emit_linenums'] = True
from Cython.Build import cythonize
from numpy import get_include
setup(
ext_modules = cythonize([Extension('PyCafe',['PyCafe_sf.pyx'],
language="c++",
include_dirs=[ '/opt/gfa/python-3.5/latest/include/python3.5m',
os.environ['EPICS'] + '/base/include',
os.environ['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/cpp/cafe-1.13.0-sf-py35-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=[ os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
'/opt/gfa/cafe/cpp/cafe-1.13.0-sf-py35-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
'/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',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
],
runtime_library_dirs=[
os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
'/opt/gfa/cafe/cpp/cafe-1.13.0-sf-py35-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
'/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',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
],
libraries=['ca','Com','dl','cafe'])
], annotate=True,
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, 'BS_CAFE': True }
)
)

43
setup_py37.py Normal file
View File

@@ -0,0 +1,43 @@
import os
import sys
from distutils.core import setup
from distutils.extension import Extension
from Cython.Compiler.Main import default_options
default_options['emit_linenums'] = True
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',
os.environ['EPICS'] + '/base/include',
os.environ['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/cpp/cafe-1.13.0-py37-gcc-7.3.0/include',
'.', get_include()],
library_dirs=[ os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
'/opt/gfa/cafe/cpp/cafe-1.13.0-py37-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
'/opt/gfa/python-3.7/latest/lib',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
],
runtime_library_dirs=[os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
'/opt/gfa/cafe/cpp/cafe-1.13.0-py37-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
'/opt/gfa/python-3.7/latest/lib',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
],
libraries=['ca','Com','dl','cafe'])
], annotate=True,
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}
)
)

51
setup_py37_sf.py Normal file
View File

@@ -0,0 +1,51 @@
import os
import sys
from distutils.core import setup
from distutils.extension import Extension
from Cython.Compiler.Main import default_options
default_options['emit_linenums'] = True
from Cython.Build import cythonize
from numpy import get_include
setup(
ext_modules = cythonize([Extension('PyCafe',['PyCafe_sf.pyx'],
language="c++",
include_dirs=[ '/opt/gfa/python-3.7/latest/include/python3.7m',
os.environ['EPICS'] + '/base/include',
os.environ['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/cpp/cafe-1.13.0-sf-py37-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=[ os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
'/opt/gfa/cafe/cpp/cafe-1.13.0-sf-py37-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
'/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',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
],
runtime_library_dirs=[
os.environ['EPICS'] + '/base/lib/' + os.environ['EPICS_HOST_ARCH'],
'/opt/gfa/cafe/cpp/cafe-1.13.0-sf-py37-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
'/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',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
],
libraries=['ca','Com','dl','cafe'])
], annotate=True,
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, 'BS_CAFE': True }
)
)

43
setup_py37_sls2.py Normal file
View File

@@ -0,0 +1,43 @@
import os
import sys
from distutils.core import setup
from distutils.extension import Extension
from Cython.Compiler.Main import default_options
default_options['emit_linenums'] = True
from Cython.Build import cythonize
from numpy import get_include
setup(
ext_modules = cythonize([Extension('PyCafe',['PyCafe.pyx'],
language="c++",
include_dirs=[ '/opt/gfa/python-3.7/latest/include/python3.7m',
os.environ['EPICS'] + '/base-7.0.4.1/include',
os.environ['EPICS'] + '/base-7.0.4.1/include/os/Linux',
os.environ['EPICS'] + '/base-7.0.4.1/include/compiler/gcc',
'/opt/gfa/cafe/boost/boost_1_61_0/include',
'/opt/gfa/cafe/boost/boost_1_61_0/include/boost',
'/opt/gfa/cafe/cpp/cafe-1.13.0-sls2-py37-gcc-7.3.0/include',
'.', get_include()],
library_dirs=[ os.environ['EPICS'] + '/base-7.0.4.1/lib/' + os.environ['EPICS_HOST_ARCH'],
'/opt/gfa/cafe/cpp/cafe-1.13.0-sls2-py37-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
'/opt/gfa/python-3.7/latest/lib',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
],
runtime_library_dirs=[
os.environ['EPICS'] + '/base-7.0.4.1/lib/' + os.environ['EPICS_HOST_ARCH'],
'/opt/gfa/cafe/cpp/cafe-1.13.0-sls2-py37-gcc-7.3.0/lib/' + os.environ['EPICS_HOST_ARCH'],
'/opt/gfa/python-3.7/latest/lib',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib64',
os.environ['PSI_PREFIX'] + '/Programming/gcc/7.3.0/lib'
],
libraries=['ca','Com','dl','cafe'])
], annotate=True,
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, 'BS_CAFE': False }
)
)