Support calling BAM pack via 'python -m bam.pack'.
This allows us to run "setup.py bdist_wheel", put the wheel on the PYTHONPATH, and run BAM pack without having to install it on a virtualenv. The main purpose is to be able to ship this wheel with Blender. Updating Blender's version of BAM thus requires only putting in a new wheel file, rather than the old error-prone approach of copy-and-edit.
This commit is contained in:
8
bam/__main__.py
Normal file
8
bam/__main__.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
"""Main module for running python -m bam.
|
||||||
|
|
||||||
|
Doesn't do much, except for printing general usage information.
|
||||||
|
"""
|
||||||
|
|
||||||
|
print("The 'bam' module cannot be run directly. The following subcommand is available:")
|
||||||
|
print()
|
||||||
|
print("python -m bam.pack")
|
10
bam/pack.py
Normal file
10
bam/pack.py
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
"""CLI interface to BAM-pack.
|
||||||
|
|
||||||
|
Run this using:
|
||||||
|
|
||||||
|
python -m bam.pack
|
||||||
|
"""
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
from bam.blend import blendfile_pack
|
||||||
|
blendfile_pack.main()
|
Reference in New Issue
Block a user