Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow snopt module to be loaded non-relatively #337

Closed
whophil opened this issue Apr 26, 2023 · 1 comment
Closed

Allow snopt module to be loaded non-relatively #337

whophil opened this issue Apr 26, 2023 · 1 comment

Comments

@whophil
Copy link
Contributor

whophil commented Apr 26, 2023

Description of feature

Currently the snopt.*.so binding module is loaded relatively to pySNOPT.py - it is expected to live in the same folder.

from . import snopt # isort: skip

This is a problem when installing pyoptsparse from conda-forge, because the snopt module is not included in the conda-forge release, due to license restrictions.

Consider the case where a user wishes to:

  1. Install pyoptsparse from conda-forge
  2. Provide their own pre-compiled snopt.*.so binding module

As currently implemented, the user would have to copy it into the environment's site-packages folder to allow snopt to be imported correctly. This is not desirable.

Potential solution

An environment variable which allows the snopt module to be loaded non-relatively should do the trick, as a user can put whatever path onto their module search path with PYTHONPATH.

@whophil
Copy link
Contributor Author

whophil commented May 2, 2023

Closed by #338

@whophil whophil closed this as completed May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant