Skip to content

Commit

Permalink
chore: use psycopg[binary] in development (#653)
Browse files Browse the repository at this point in the history
On the MacOS the dev environment was causing the postgresql to be
installed if we use the psycopg[c].
This PR makes the psycopg[binary] in development and uses psycopg[c] in
production.
  • Loading branch information
mkanoor authored Mar 7, 2024
1 parent 524da44 commit 0c5b709
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ runs:

- name: Install package
shell: bash
run: python -m pip install .
run: python -m pip install .[production]

- name: Install test dependencies
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN pip install -U pip \
RUN bash -c "if [ $DEVEL_COLLECTION_LIBRARY -ne 0 ]; then \
ansible-galaxy collection install ${DEVEL_COLLECTION_REPO} --force; fi"

RUN pip install .
RUN pip install .[production]

RUN chmod -R 0775 $APP_DIR
RUN chmod -x $APP_DIR/tests/e2e/files/passwords/*.*
2 changes: 1 addition & 1 deletion docs/development_environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Ready to contribute? Here's how to set up `ansible_rulebook` for local developme
cd ansible_rulebook/
python3.9 -m venv venv
source venv/bin/activate
pip install -e .
pip install -e .[development]
pip install -r requirements_dev.txt
ansible-galaxy collection install ansible.eda
npm install commitlint
Expand Down
7 changes: 6 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ install_requires =
websockets
drools_jpy == 0.3.9
watchdog
psycopg[c]
xxhash

[options.packages.find]
Expand All @@ -57,3 +56,9 @@ replace = __version__ = '{new_version}'
extend-exclude = docs, venv, .venv
extend-ignore =
E203, # Whitespace before ':' (false positive in slices, handled by black.

[options.extras_require]
production =
psycopg[c]
development =
psycopg[binary]

0 comments on commit 0c5b709

Please sign in to comment.