import os
import sys
from pathlib import Path

if "pytest" in sys.modules:
	_test_auth_config = Path(os.environ.get("TEMP", "/tmp")) / "pygitweb-test-auth.json"
	_test_settings_config = Path(os.environ.get("TEMP", "/tmp")) / "pygitweb-test-settings.json"
	os.environ.setdefault("PYGITWEB_AUTH", "0")
	os.environ.setdefault("PYGITWEB_AUTH_CONFIG", str(_test_auth_config))
	os.environ.setdefault("PYGITWEB_SETTINGS_CONFIG", str(_test_settings_config))

import pygitweb.__meta__
from pygitweb.main import app as app

"""
Git Repo Browser built with FastAPI + Pygit2
"""
__version__ = pygitweb.__meta__.__version__
__author__ = pygitweb.__meta__.__author__
__description__ = pygitweb.__meta__.__description__
__url__ = pygitweb.__meta__.__url__
__license__ = pygitweb.__meta__.__license__