Leek/src/leek/__main__.py
Toast 6061590270 Move source code to src/leek
This makes the package work again
2025-05-23 00:31:14 +02:00

14 lines
415 B
Python

# https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/#running-a-command-line-interface-from-source-with-src-layout
import os
import sys
if not __package__:
# Make CLI runnable from source tree with
# python src/package
package_source_path = os.path.dirname(os.path.dirname(__file__))
sys.path.insert(0, package_source_path)
from leek import leek_app
leek_app.main()