fix(community): move psycopg2 to optional community extra, lazy-import in __init__
This commit is contained in:
parent
56fb6be4b1
commit
433207d3c5
2 changed files with 9 additions and 4 deletions
|
|
@ -1,5 +1,8 @@
|
||||||
__version__ = "0.10.0"
|
__version__ = "0.10.0"
|
||||||
|
|
||||||
|
try:
|
||||||
from circuitforge_core.community import CommunityDB, CommunityPost, SharedStore
|
from circuitforge_core.community import CommunityDB, CommunityPost, SharedStore
|
||||||
|
|
||||||
__all__ = ["CommunityDB", "CommunityPost", "SharedStore"]
|
__all__ = ["CommunityDB", "CommunityPost", "SharedStore"]
|
||||||
|
except ImportError:
|
||||||
|
# psycopg2 not installed — install with: pip install circuitforge-core[community]
|
||||||
|
pass
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,12 @@ dependencies = [
|
||||||
"pyyaml>=6.0",
|
"pyyaml>=6.0",
|
||||||
"requests>=2.31",
|
"requests>=2.31",
|
||||||
"openai>=1.0",
|
"openai>=1.0",
|
||||||
"psycopg2>=2.9",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
|
community = [
|
||||||
|
"psycopg2>=2.9",
|
||||||
|
]
|
||||||
manage = [
|
manage = [
|
||||||
"platformdirs>=4.0",
|
"platformdirs>=4.0",
|
||||||
"typer[all]>=0.12",
|
"typer[all]>=0.12",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue