update packaging and test
This commit is contained in:
@ -2,7 +2,9 @@ import json
|
||||
import cppyy
|
||||
import os.path
|
||||
from pathlib import Path
|
||||
from sysconfig import get_paths
|
||||
import sys
|
||||
import re
|
||||
import tempfile
|
||||
import conans.client.conan_api as conan
|
||||
from contextlib import (redirect_stdout, redirect_stderr)
|
||||
@ -122,12 +124,13 @@ def _load_systemc_cci():
|
||||
return False
|
||||
|
||||
def _load_pythonization_lib():
|
||||
import pysysc
|
||||
path = os.path.dirname(os.path.dirname(pysysc.__file__))
|
||||
for file in os.listdir(path):
|
||||
if file.endswith(".so"):
|
||||
cppyy.load_library(os.path.join(path, file))
|
||||
cppyy.include(os.path.join(path, "PyScModule.h"))
|
||||
info = get_paths()
|
||||
for file in os.listdir(info['platlib']):
|
||||
if re.match(r'pysyscsc.*\.so', file):
|
||||
cppyy.load_library(os.path.join(info['platlib'], file))
|
||||
full_path = os.path.join(info['data'], 'include/site/python%d.%d/PySysC/PyScModule.h' % sys.version_info[:2])
|
||||
if os.path.isfile(full_path):
|
||||
cppyy.include(full_path)
|
||||
return
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user