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
|
||||
if not purge:
|
||||
return
|
||||
purge_script = os.path.join(
|
||||
Path(__file__).parent.resolve(), "default_scripts", "purge.py"
|
||||
)
|
||||
return check_file_exists(str(purge_script), "no purge found")
|
||||
scripts_directory = Path((os.path.dirname(__file__))).joinpath("default_scripts/")
|
||||
purge_script = os.path.join(scripts_directory.resolve(), "purge.py")
|
||||
return check_file_exists(str(purge_script), "Default scripts location may be invalid")
|
||||
|
||||
|
||||
def main() -> int:
|
||||
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"""
|
||||
# Parse arguments.
|
||||
args = parser.parse_args()
|
||||
|
@ -36,7 +36,7 @@ setup(
|
||||
include_package_data=True,
|
||||
keywords="blender_crawl",
|
||||
name="blender_crawl",
|
||||
packages=find_packages(include=["blender_crawl", "blender_crawl.*"]),
|
||||
packages=["blender_crawl",],
|
||||
setup_requires=setup_requirements,
|
||||
test_suite="tests",
|
||||
tests_require=test_requirements,
|
||||
|
Loading…
Reference in New Issue
Block a user