Skip to content

Commit 2678a39

Browse files
author
Parashara Shamaprasad
committed
Make plugin_dir reference the directory instead of a file.
1 parent e8cc67a commit 2678a39

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

foyer/plugins.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import foyer
22
import glob
3+
import os
34

45
def collect_plugins(plugin_names=None):
56
"""
@@ -25,6 +26,7 @@ def collect_plugins(plugin_names=None):
2526
plugin_name = "_".join(plugin_func.split("_")[1:])
2627
# TODO: plugin_version = get_version_info
2728
plugin_dir = eval("foyer.forcefields.{}.__globals__['__file__']".format(plugin_func))
29+
plugin_dir = os.path.dirname(plugin_dir)
2830
# TODO: plugin_xml_path = get_xml_path
2931
# This assumes that plugin directory tree is consistent.
3032
# Does not consider versioned FFs.

0 commit comments

Comments
 (0)