mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-05 15:27:53 +10:00
include sonic-client by default and allow ldap to be installed at runtime
This commit is contained in:
@@ -155,6 +155,7 @@ class ConstantsDict(Mapping):
|
||||
".DS_Store",
|
||||
".env",
|
||||
"Dockerfile",
|
||||
".ArchiveBox.conf.bak",
|
||||
))
|
||||
PIP_RELATED_NAMES: frozenset[str] = frozenset((
|
||||
".venv",
|
||||
|
||||
@@ -30,10 +30,12 @@ class LdapBinary(BaseBinary):
|
||||
VENV_PIP_BINPROVIDER.name: {
|
||||
"abspath": lambda: LDAP_LIB() and Path(inspect.getfile(LDAP_LIB())), # type: ignore
|
||||
"version": lambda: LDAP_LIB() and SemVer(LDAP_LIB().__version__), # type: ignore
|
||||
"packages": lambda: ['archivebox[ldap]'],
|
||||
},
|
||||
SYS_PIP_BINPROVIDER.name: {
|
||||
"abspath": lambda: LDAP_LIB() and Path(inspect.getfile(LDAP_LIB())), # type: ignore
|
||||
"version": lambda: LDAP_LIB() and SemVer(LDAP_LIB().__version__), # type: ignore
|
||||
"packages": lambda: ['archivebox[ldap]'],
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -73,6 +73,11 @@ VENV_PIP_BINPROVIDER = VenvPipBinProvider()
|
||||
LIB_PIP_BINPROVIDER = LibPipBinProvider()
|
||||
pip = LIB_PIP_BINPROVIDER
|
||||
|
||||
# ensure python libraries are importable from these locations (if archivebox wasnt executed from one of these then they wont already be in sys.path)
|
||||
site_packages_dir = 'lib/python{}.{}/site-packages'.format(*sys.version_info[:2])
|
||||
sys.path.append(str(VENV_PIP_BINPROVIDER.pip_venv / site_packages_dir))
|
||||
sys.path.append(str(LIB_PIP_BINPROVIDER.pip_venv / site_packages_dir))
|
||||
|
||||
|
||||
class ArchiveboxBinary(BaseBinary):
|
||||
name: BinName = 'archivebox'
|
||||
|
||||
Reference in New Issue
Block a user