Skip to content

Commit bdfd088

Browse files
Merge pull request Farama-Foundation#56 from Farama-Foundation/Fix_Manifest
Update MANIFEST.in
2 parents b2ddd49 + 764b0d4 commit bdfd088

4 files changed

Lines changed: 7 additions & 1 deletion

File tree

.gitattributes

29 Bytes
Binary file not shown.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ dist/
1919
_build/*
2020
docs/environments/*.md
2121
!docs/environments/index.md
22+
Parallel_Demo.py

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ recursive-include src *
88
recursive-include magent2/environments *
99
recursive-include magent2/config *
1010
recursive-include magent2/scenarios *
11+
include magent2/__init__.py
1112

1213
# Include dynamic library files
1314
include *.dylib

magent2/c_lib.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
def _load_lib():
1111
"""Load library in local."""
1212
cur_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
13-
lib_path = cur_path
13+
lib_path = os.path.join(cur_path, "..", "venv", "Lib", "site-packages", "magent2")
1414
if platform.system() == "Darwin":
1515
path_to_so_file = os.path.join(lib_path, "libmagent.dylib")
1616
elif platform.system() == "Linux":
@@ -19,6 +19,10 @@ def _load_lib():
1919
path_to_so_file = os.path.join(lib_path, "magent.dll")
2020
else:
2121
raise BaseException("unsupported system: " + platform.system())
22+
23+
if not os.path.exists(path_to_so_file):
24+
raise FileNotFoundError(f"Could not find the DLL file at: {path_to_so_file}")
25+
2226
lib = ctypes.CDLL(path_to_so_file, ctypes.RTLD_GLOBAL)
2327
return lib
2428

0 commit comments

Comments
 (0)