Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert default psycopg2 back to psycopg2-binary #41

Merged
merged 4 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20240328-133507.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Dependencies
body: add "no-binary" install option
time: 2024-03-28T13:35:07.300121-07:00
custom:
Author: colin-rogers-dbt
Issue: "6"
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ classifiers = [
]
dependencies = [
"dbt-adapters>=0.1.0a1,<2.0",
"psycopg2>=2.9,<3.0",
"psycopg2-binary>=2.9,<3.0",
# installed via dbt-adapters but used directly
"dbt-common>=0.1.0a1,<2.0",
"agate>=1.0,<2.0",
]
[project.optional-dependencies]
no-binary = ["psycopg2>=2.9,<3.0"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this locally and I wind up with both psycopg2 and psycopg2-binary instead of just psycopg2.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now works.

pip install -e .
  • Installs psycopg2-binary and does not install psycopg2
DBT_PSYCOPG2_NAME=psycopg2 pip install -e .
  • Installs psycopg2 and does not install psycopg2-binary

[project.urls]
Homepage = "https://github.com/dbt-labs/dbt-postgres"
Documentation = "https://docs.getdbt.com"
Expand Down Expand Up @@ -119,6 +121,8 @@ dependencies = [
"twine",
"check-wheel-contents",
]


[tool.hatch.envs.build.scripts]
check-all = [
"- check-wheel",
Expand Down Expand Up @@ -166,4 +170,4 @@ env_files = ["test.env"]
testpaths = [
"tests/functional",
"tests/unit",
]
]
Loading