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
3 changes: 2 additions & 1 deletion src/python/epicscorelibs/ca/cadef.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@


import ctypes
import platform

from epicscorelibs import path

from . import py23

if path.OS_CLASS == "WIN32":
if platform.system() == "Windows":
# On windows, use stdcall calling convention for libca
libca = ctypes.WinDLL(path.get_lib("ca"), ctypes.RTLD_GLOBAL)
else:
Expand Down
3 changes: 2 additions & 1 deletion src/python/epicscorelibs/ioc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import ctypes
import code
import argparse
import platform
import sys
import os
import atexit
Expand All @@ -15,7 +16,7 @@


# The libraries we need to run up a soft IOC, don't load dbCore twice
if path.OS_CLASS == "WIN32":
if platform.system() == "Windows":
Com = ctypes.WinDLL(path.get_lib("Com"), mode=ctypes.RTLD_GLOBAL)
else:
Com = ctypes.CDLL(path.get_lib("Com"), mode=ctypes.RTLD_GLOBAL)
Expand Down
13 changes: 0 additions & 13 deletions src/python/epicscorelibs/path/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

import os
from glob import glob

from ..config import get_config_var
from setuptools_dso.runtime import dylink_prepare_dso, find_dso

__all__ = (
Expand All @@ -12,17 +10,6 @@
)

base_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))


# parts of library file names
OS_CLASS = get_config_var("OS_CLASS")
if OS_CLASS=='WIN32':
_prefix, _suffix = '', '.dll'
elif OS_CLASS=='Darwin':
_prefix, _suffix = 'lib', '.dylib'
else:
_prefix, _suffix = 'lib', '.so'

include_path = os.path.join(base_path, 'include')
lib_path = os.path.join(base_path, 'lib')

Expand Down
3 changes: 2 additions & 1 deletion src/python/epicscorelibs/test/test_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import os
import ctypes
import platform

from .. import path

Expand All @@ -14,7 +15,7 @@ def test_loading():

ca = ctypes.CDLL(path.get_lib('ca'), mode=ctypes.RTLD_GLOBAL)

if path.OS_CLASS=='WIN32':
if platform.system() == "Windows":
# Base libs contain functions using a mixture of cdecl and stdcall calling conventions
# make WinDLL w/o actually loading again
ca_s = ctypes.WinDLL(ca._name, handle=ca._handle)
Expand Down
Loading