Add python build
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import os
|
||||
from setuptools_dso import dylink_prepare_dso
|
||||
|
||||
__all__ = (
|
||||
'include_path',
|
||||
)
|
||||
|
||||
include_path = os.path.join(os.path.dirname(__file__), 'include')
|
||||
|
||||
dylink_prepare_dso("pvxslibs.lib.pvxs")
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
import os
|
||||
import ctypes
|
||||
import unittest
|
||||
|
||||
class TestLoad(unittest.TestCase):
|
||||
def test_load(self):
|
||||
from setuptools_dso.runtime import find_dso
|
||||
from ..path import include_path
|
||||
self.assertTrue(os.path.isdir(include_path))
|
||||
|
||||
lib = ctypes.CDLL(find_dso('...lib.pvxs'), ctypes.RTLD_GLOBAL)
|
||||
pvxs_version_int = lib.pvxs_version_int
|
||||
pvxs_version_int.argtypes = []
|
||||
pvxs_version_int.restype = ctypes.c_ulong
|
||||
|
||||
self.assertNotEqual(0, pvxs_version_int())
|
||||
Reference in New Issue
Block a user