Skip to content

Commit

Permalink
Rebuild with latest changes to mypy stubgen
Browse files Browse the repository at this point in the history
  • Loading branch information
chadrik committed Jul 26, 2023
1 parent 9721e58 commit 37c17c4
Show file tree
Hide file tree
Showing 111 changed files with 2,172 additions and 2,177 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ pip install types-usd types-houdini types-katana types-mari types-nuke types-ope

## Generating the stubs

(replace ocio with the package to generate)
(replace ocio with your desired package to generate)

First, look at `ocio/stubgen_ocio.sh` to see if there are any env vars to set in the `# Custom variables` section.

Next, build it:

```
python3 -m venv .venv
Expand Down
2 changes: 1 addition & 1 deletion katana/stubgen_katana.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def main(outdir: str, katana_site_dir: str) -> None:
"PyOpenColorIO",
]

args = ["-v", "--no-parse", "-o", outdir]
args = ["-v", "--inspect-mode", "-o", outdir]
for module in modules:
args.append(f"-p={module}")

Expand Down
6 changes: 5 additions & 1 deletion ocio/stubgen_ocio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ PY_SITE_DIR=$(python -c "import site,os;print(os.pathsep.join(site.getsitepackag
REPO_PATH=$(git rev-parse --show-toplevel)
outdir=$REPO_PATH/ocio/stubs/

export PYTHONPATH=$REPO_PATH:$REPO_PATH/ocio:$REPO_PATH/../mypy/:$PY_SITE_DIR
# Custom variables --
MYPY_ROOT=$REPO_PATH/../mypy
# End custom variables --

export PYTHONPATH=$REPO_PATH:$REPO_PATH/ocio:$MYPY_ROOT:$PY_SITE_DIR

#python -m mypy.stubgen -m PyOpenColorIO -o $outdir
python -m stubgen_ocio -m PyOpenColorIO -o $outdir
Loading

0 comments on commit 37c17c4

Please sign in to comment.