-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
98a19d2
commit 27d840d
Showing
5 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ bazel-* | |
|
||
venv/ | ||
.venv/ | ||
|
||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
examples/typical/site_packages_extra/lib/python/hello/hello.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def hello() -> None: | ||
print("Hello") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This file is loaded by the Python interpreter and can alter the Python module loading process. | ||
# We use it to inject lib/python into our PYTHON_PATH so that we can import modules relative to this directory. | ||
import os | ||
import sys | ||
|
||
dirname = os.path.dirname(__file__) | ||
# Add site_packages_extra/lib/python to path so we can import `hello`` without the site_packages_extra.lib.python prefix | ||
sys.path.append( | ||
os.path.abspath(os.path.join(dirname, "../../../../site_packages_extra/lib/python")) | ||
) | ||
# Add repo root to the path | ||
sys.path.append(os.path.abspath(os.path.join(dirname, "../../../.."))) |
This file was deleted.
Oops, something went wrong.