mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-23 11:17:02 -04:00
move loading of vendor libs import archivebox init
This commit is contained in:
parent
bba022169e
commit
0589ff2b5d
1 changed files with 9 additions and 5 deletions
|
@ -20,6 +20,15 @@ ARCHIVE_DIR = DATA_DIR / 'archive'
|
||||||
if str(PACKAGE_DIR) not in sys.path:
|
if str(PACKAGE_DIR) not in sys.path:
|
||||||
sys.path.append(str(PACKAGE_DIR))
|
sys.path.append(str(PACKAGE_DIR))
|
||||||
|
|
||||||
|
# load fallback libraries from vendor dir
|
||||||
|
from .vendor import load_vendored_libs
|
||||||
|
load_vendored_libs()
|
||||||
|
|
||||||
|
|
||||||
|
os.environ['OUTPUT_DIR'] = str(DATA_DIR)
|
||||||
|
os.environ['DJANGO_SETTINGS_MODULE'] = 'core.settings'
|
||||||
|
|
||||||
|
|
||||||
def _detect_installed_version():
|
def _detect_installed_version():
|
||||||
try:
|
try:
|
||||||
return importlib.metadata.version(__package__ or 'archivebox')
|
return importlib.metadata.version(__package__ or 'archivebox')
|
||||||
|
@ -41,8 +50,3 @@ __version__ = VERSION
|
||||||
|
|
||||||
|
|
||||||
from .constants import CONSTANTS
|
from .constants import CONSTANTS
|
||||||
|
|
||||||
|
|
||||||
# load fallback libraries from vendor dir
|
|
||||||
from .vendor import load_vendored_libs
|
|
||||||
load_vendored_libs()
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue