You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Allow custom overrides for package resolving and optional sys.path support (#601)
# Motivation
Certain build systems or configurations have Python packages located in
a non-default path. Those are not found by _Codegen_ per default.
# Content
_Codegen_ now considers the `PYTHONPATH` environment variable when
resolving packages.
# Testing
Added unit tests which resolve packages only when the `PYTHONPATH` is
set in a correct way.
# Please check the following before marking your PR as ready for review
- [x] I have added tests for my changes
- [x] I have updated the documentation or added new documentation as
needed
---------
Co-authored-by: Matthias Bartelt <[email protected]>
Co-authored-by: Matthias Bartelt <[email protected]>
Co-authored-by: tomcodgen <[email protected]>
Co-authored-by: Christine Wang <[email protected]>
With Python one can specify the `PYTHONPATH` environment variable which is then considered when resolving
74
+
packages.
75
+
</Note>
76
+
72
77
## Working with External Modules
73
78
74
79
You can determine if an import references an [ExternalModule](/api-reference/core/ExternalModule) by checking the type of [Import.imported_symbol](/api-reference/core/Import#imported-symbol), like so:
With Python one can specify the `PYTHONPATH` environment variable which is then considered when resolving
2863
+
packages.
2864
+
</Note>
2865
+
2861
2866
## Working with External Modules
2862
2867
2863
2868
You can determine if an import references an [ExternalModule](/api-reference/core/ExternalModule) by checking the type of [Import.imported_symbol](/api-reference/core/Import#imported-symbol), like so:
With Python one can specify the `PYTHONPATH` environment variable which is then considered when resolving
2884
+
packages.
2885
+
</Note>
2886
+
2882
2887
## Working with External Modules
2883
2888
2884
2889
You can determine if an import references an [ExternalModule](/api-reference/core/ExternalModule) by checking the type of [Import.imported_symbol](/api-reference/core/Import#imported-symbol), like so:
0 commit comments