Skip to content

Commit 98a4a7d

Browse files
committed
Break requirements.txt into environment specific modules
Our previous approach to dependencies was creating a high barrier to entry for new contributors (and new Pythonistas/Djangonauts) since it required them to have a production environment installed locally just to install the requirements files. This change moves production-specific dependencies to a separate module, simplifies local setup, and opens the possiblity of having development specific dependencies in the future. closes psf#37
1 parent 7df7d2e commit 98a4a7d

File tree

5 files changed

+21
-22
lines changed

5 files changed

+21
-22
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ git clone https://github.com/psf/python-in-edu.git
1515
cd python-in-edu
1616
python3 -m venv .venv
1717
source .venv/bin/activate
18-
pip install -r requirements.txt
18+
pip install -r requirements/dev.txt
1919
```
2020

2121
You can then change directories into the python-in-edu folder and build the database:

requirements.txt

+4-21
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,4 @@
1-
asgiref==3.3.1
2-
confusable-homoglyphs==3.2.0
3-
dj-database-url==0.5.0
4-
Django==3.1.6
5-
django-djconfig==0.10.0
6-
django-haystack==3.0
7-
django-heroku==0.3.1
8-
django-infinite-scroll-pagination==1.1.0
9-
django-multiselectfield==0.1.12
10-
django-registration==3.1.1
11-
django-spirit==0.12.2
12-
gunicorn==20.0.4
13-
mistune==0.8.4
14-
olefile==0.46
15-
Pillow==8.0.1
16-
psycopg2==2.8.6
17-
python-dotenv==0.15.0
18-
pytz==2021.1
19-
sqlparse==0.4.1
20-
whitenoise==5.2.0
21-
Whoosh==2.7.4
1+
# This file is required by Heroku and should not be installed locally
2+
#
3+
# See our README for getting started locally.
4+
-r requirements/prod.txt

requirements/base.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Django==3.1.6
2+
django-djconfig==0.10.0
3+
django-haystack==3.0
4+
django-multiselectfield==0.1.12
5+
django-registration==3.1.1
6+
django-spirit==0.12.2
7+
dj-database-url==0.5.0
8+
gunicorn==20.0.4
9+
python-dotenv==0.15.0
10+
whitenoise==5.2.0

requirements/dev.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-r base.txt
2+
3+
# Add dependencies specific to development below

requirements/prod.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-r base.txt
2+
3+
psycopg2==2.8.6

0 commit comments

Comments
 (0)