Closed ss4adam closed 11 months ago
You are correct, this is a bug.. I had discovered this recently and made the following change to that line in my local environment:
- os.environ['METIS_DIR'] = git_clone('metis')
+ metis_dir = git_clone('metis')
+ os.environ['METIS_DIR'] = metis_dir if isinstance(metis_dir, str) else metis_dir.name
I will get this fix into the repository shortly.
I'm new to build_pyoptsparse and encountered an error that may be a bug or improper use by the user. When running build_pyoptsparse I get a Python TypeError where a "str" expected, not "TemporaryDirectory". It looks like
os.environ['METIS_DIR'] = git_clone('metis')
is attempting to set an environment variable (METIS_DIR) to a TemporaryDirectory object instead of a string path.Ubuntu 20.04 Python 3.10.13 (using venv) git version 2.25.1
$ build_pyoptsparse