Convert Blender-Purge
to a more generic Blender-Crawl
Tool
#42
@ -130,21 +130,13 @@ def get_purge_path(purge: bool):
|
|||||||
# Cancel function if user has not supplied purge arg
|
# Cancel function if user has not supplied purge arg
|
||||||
if not purge:
|
if not purge:
|
||||||
return
|
return
|
||||||
purge_script = os.path.join(
|
scripts_directory = Path((os.path.dirname(__file__))).joinpath("default_scripts/")
|
||||||
Path(__file__).parent.resolve(), "default_scripts", "purge.py"
|
purge_script = os.path.join(scripts_directory.resolve(), "purge.py")
|
||||||
)
|
return check_file_exists(str(purge_script), "Default scripts location may be invalid")
|
||||||
return check_file_exists(str(purge_script), "no purge found")
|
|
||||||
|
|
||||||
|
|
||||||
def main() -> int:
|
def main() -> int:
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# TODO Safely get 'default_purge' path set by setup.py, Debug why this doesn't work
|
|
||||||
# module = sys.modules['__main__']
|
|
||||||
# https://stackoverflow.com/questions/6028000/how-to-read-a-static-file-from-inside-a-python-package
|
|
||||||
# print(pkg_resources.resource_stream("blender-crawl", 'default_purge'))
|
|
||||||
# print(module)
|
|
||||||
|
|
||||||
"""Crawl blender files in a directory and run a provided scripts"""
|
"""Crawl blender files in a directory and run a provided scripts"""
|
||||||
# Parse arguments.
|
# Parse arguments.
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
@ -36,7 +36,7 @@ setup(
|
|||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
keywords="blender_crawl",
|
keywords="blender_crawl",
|
||||||
name="blender_crawl",
|
name="blender_crawl",
|
||||||
packages=find_packages(include=["blender_crawl", "blender_crawl.*"]),
|
packages=["blender_crawl",],
|
||||||
setup_requires=setup_requirements,
|
setup_requires=setup_requirements,
|
||||||
test_suite="tests",
|
test_suite="tests",
|
||||||
tests_require=test_requirements,
|
tests_require=test_requirements,
|
||||||
|
Loading…
Reference in New Issue
Block a user