mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-29 14:05:21 -04:00
make sure monkey patches and vendor libs come before first constants import
Some checks failed
CodeQL / Analyze (python) (push) Has been cancelled
Build Debian package / build (push) Has been cancelled
Build Docker image / buildx (push) Has been cancelled
Deploy static content to Pages / deploy (push) Has been cancelled
Build Homebrew package / build (push) Has been cancelled
Run linters / lint (push) Has been cancelled
Build Pip package / build (push) Has been cancelled
Run tests / python_tests (ubuntu-22.04, 3.11) (push) Has been cancelled
Run tests / docker_tests (push) Has been cancelled
Some checks failed
CodeQL / Analyze (python) (push) Has been cancelled
Build Debian package / build (push) Has been cancelled
Build Docker image / buildx (push) Has been cancelled
Deploy static content to Pages / deploy (push) Has been cancelled
Build Homebrew package / build (push) Has been cancelled
Run linters / lint (push) Has been cancelled
Build Pip package / build (push) Has been cancelled
Run tests / python_tests (ubuntu-22.04, 3.11) (push) Has been cancelled
Run tests / docker_tests (push) Has been cancelled
This commit is contained in:
parent
430e974719
commit
7a895d9285
1 changed files with 5 additions and 3 deletions
|
@ -28,6 +28,7 @@ ASCII_LOGO = """
|
||||||
SYSTEM_TMP_DIR = Path(tempfile.gettempdir()) / 'archivebox'
|
SYSTEM_TMP_DIR = Path(tempfile.gettempdir()) / 'archivebox'
|
||||||
SYSTEM_TMP_DIR.mkdir(parents=True, exist_ok=True)
|
SYSTEM_TMP_DIR.mkdir(parents=True, exist_ok=True)
|
||||||
os.environ['SYSTEM_TMP_DIR'] = str(SYSTEM_TMP_DIR)
|
os.environ['SYSTEM_TMP_DIR'] = str(SYSTEM_TMP_DIR)
|
||||||
|
os.environ['DJANGO_SETTINGS_MODULE'] = 'core.settings'
|
||||||
|
|
||||||
# if we are outside a data dir, cd into an ephemeral tmp dir so that
|
# if we are outside a data dir, cd into an ephemeral tmp dir so that
|
||||||
# we can run version/help without polluting cwd with an index.sqlite3
|
# we can run version/help without polluting cwd with an index.sqlite3
|
||||||
|
@ -42,19 +43,20 @@ PACKAGE_DIR = Path(__file__).resolve().parent
|
||||||
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))
|
||||||
|
|
||||||
from .config.constants import CONSTANTS, DATA_DIR, PACKAGE_DIR, ARCHIVE_DIR, VERSION # noqa
|
|
||||||
|
|
||||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'core.settings'
|
|
||||||
|
|
||||||
# print('INSTALLING MONKEY PATCHES')
|
# print('INSTALLING MONKEY PATCHES')
|
||||||
from .monkey_patches import * # noqa
|
from .monkey_patches import * # noqa
|
||||||
# print('DONE INSTALLING MONKEY PATCHES')
|
# print('DONE INSTALLING MONKEY PATCHES')
|
||||||
|
|
||||||
|
|
||||||
# print('LOADING VENDORED LIBRARIES')
|
# print('LOADING VENDORED LIBRARIES')
|
||||||
from .vendor import load_vendored_libs # noqa
|
from .vendor import load_vendored_libs # noqa
|
||||||
load_vendored_libs()
|
load_vendored_libs()
|
||||||
# print('DONE LOADING VENDORED LIBRARIES')
|
# print('DONE LOADING VENDORED LIBRARIES')
|
||||||
|
|
||||||
|
|
||||||
|
from .config.constants import CONSTANTS, DATA_DIR, PACKAGE_DIR, ARCHIVE_DIR, VERSION # noqa
|
||||||
|
|
||||||
__version__ = VERSION
|
__version__ = VERSION
|
||||||
__author__ = 'Nick Sweeting'
|
__author__ = 'Nick Sweeting'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue