浏览代码

Added new python executable for mac

/pyrception-integration
leopoldo-zugasti 4 年前
当前提交
70f43750
共有 4 个文件被更改,包括 14 次插入3 次删除
  1. 4
      com.unity.perception/Editor/Pyrception/PyrceptionInstaller.cs
  2. 1
      com.unity.perception/Editor/Pyrception/pyrception-utils/pyrception_utils/cli.py
  3. 2
      com.unity.perception/Editor/Pyrception/pyrception-utils/pyrception_utils/cli.py.meta
  4. 10
      com.unity.perception/Editor/Pyrception/pyrception-utils/pyrception-utils.py

4
com.unity.perception/Editor/Pyrception/PyrceptionInstaller.cs


command = $"cd \"{pathToData}\\..\" && \"{packagesPath}\\pyrception-utils.exe\" preview --data=\".\"";
#elif (UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX)
//command = $"cd \"{path}/DataInsightsEnv/bin\";source activate;cd \"{pathToData}/..\";\"{path}/DataInsightsEnv/bin/pyrception-utils\" preview --data=\".\"";
command = $"cd \'{packagesPath}\' ;./pyrception-utils preview --data=\'{pathToData}\'";
command = $"cd \'{packagesPath}\' ;./python3.7 ./pyrception-utils.py preview --data=\'{pathToData}/..\'";
#endif
int ExitCode = 0;
ExecuteCMD(command, ref ExitCode, waitForExit: true, displayWindow: true);

#elif (UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX)
//ExecuteCMD($"source \"{path}/DataInsightsEnv/bin/activate\"; cd \"{path}/DataInsightsEnv/pyrception-util\"; pip3 --no-cache-dir install -e .; deactivate", ref ExitCode);
ExecuteCMD($"cd \'{packagesPath}\'; ./pip3 install -e \'../pyrception-util/.\'", ref ExitCode);
ExecuteCMD($"cd \'{packagesPath}\'; ./python3.7 -m pip install -e \'../pyrception-util/.\'", ref ExitCode);
#endif
if (ExitCode != 0) {
EditorUtility.ClearProgressBar();

1
com.unity.perception/Editor/Pyrception/pyrception-utils/pyrception_utils/cli.py


def main():
print('reached-main')
args = cli.parse_args()
if args.subcommand is None:
cli.print_help()

2
com.unity.perception/Editor/Pyrception/pyrception-utils/pyrception_utils/cli.py.meta


fileFormatVersion: 2
guid: e85c6e72c61fdc84db1888b18f4394de
guid: 89b661e1f265a49889bd13534f224bdb
DefaultImporter:
externalObjects: {}
userData:

10
com.unity.perception/Editor/Pyrception/pyrception-utils/pyrception-utils.py


__requires__ = 'pyrception-utils'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(
load_entry_point('pyrception-utils', 'console_scripts', 'pyrception-utils')()
)
正在加载...
取消
保存