Skip to content

Commit

Permalink
Merge pull request #8 from stevebrownlee/feature/ensure-python-versio…
Browse files Browse the repository at this point in the history
…n-using-pipenv

Ensure version 3.9.1 of Python is specified everywhere it needs to be
  • Loading branch information
stevebrownlee authored Apr 11, 2024
2 parents 538f1ec + cb4eea8 commit 50982d8
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pip-selfcheck.json
learningenv
.secrets
socialaccount.json
superuser.json
db.local.json
debug.log
.ubuntusetup
Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ wheel = "*"
openai = "*"

[requires]
python_version = "*"
python_version = "3.9.1"

[scripts]
migrate = "python3 manage.py migrate"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Do not do step 5... only steps 1-4.

Once you are done, you will be working in an Ubuntu terminal during all setup and developing on the API.

### If WSL Already Exists
### If WSL and Postgres Already Exists

If you already have Postgres installed in Ubuntu, then you need to uninstall it and kill the existing cluser.
If you already have Postgres installed in Ubuntu, then you need to uninstall it and kill the existing cluster.

```sh
sudo apt remove postgresql
Expand Down
2 changes: 2 additions & 0 deletions setup_mac_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ function generateSuperuserFixture() {
}

function initializeProject() {
pipenv --python 3.9.1

# Install project requirements
pipenv install

Expand Down
2 changes: 1 addition & 1 deletion setup_mac_python.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

PYTHON_VERSION=3.9
PYTHON_VERSION=3.9.1

function installPyenv() {
if [ $(brew list | grep -c pyenv) != 1 ]; then
Expand Down
3 changes: 2 additions & 1 deletion setup_ubuntu_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ if ! command -v psql &>/dev/null; then
sudo apt install postgresql postgresql-contrib -y
fi


# Check if systemd is running by examining the presence of systemd's runtime directory
echo "Restarting Postgresql"
if [ -d /run/systemd/system ]; then
echo "Systemd is enabled"
Expand All @@ -23,7 +25,6 @@ else
sudo service postgresql start >> /dev/null
fi


#####
# Get Postgres version
#####
Expand Down

0 comments on commit 50982d8

Please sign in to comment.