Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def _write_version_files():
print("INFO: Didn't find sha. Is this a git repo?")

with open(_ROOT_DIR / "src/torchcodec/version.py", "w") as f:
f.write("# Note that this file is generated during install.\n")
f.write(f"__version__ = '{version}'\n")


Expand Down
1 change: 1 addition & 0 deletions src/torchcodec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from . import decoders, samplers # noqa

try:
# Note that version.py is generated during install.
from .version import __version__ # noqa: F401
except Exception:
pass
Loading