2018-10-25 09:19:22 -05:00
|
|
|
import os
|
|
|
|
import sys
|
2024-10-09 04:44:52 -05:00
|
|
|
|
2018-10-25 09:19:22 -05:00
|
|
|
sys.setdlopenflags(os.RTLD_NOW | os.RTLD_GLOBAL)
|
2018-10-25 09:32:28 -05:00
|
|
|
|
2024-10-09 04:44:52 -05:00
|
|
|
__dir__ = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
sys._pyosys_dir = os.path.abspath(__dir__)
|
|
|
|
|
|
|
|
bin_ext = ".exe" if os.name == "nt" else ""
|
|
|
|
|
|
|
|
_share_candidate = os.path.join(__dir__, "share")
|
|
|
|
if os.path.isdir(_share_candidate):
|
|
|
|
sys._pyosys_share_dirname = _share_candidate + os.path.sep
|
|
|
|
|
|
|
|
_abc_candidate = os.path.join(__dir__, f"yosys-abc{bin_ext}")
|
|
|
|
if os.path.isfile(_abc_candidate):
|
|
|
|
sys._pyosys_abc = _abc_candidate
|
|
|
|
|
2018-10-25 09:32:28 -05:00
|
|
|
__all__ = ["libyosys"]
|