File tree 5 files changed +23
-3
lines changed
5 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ coverage/
27
27
venv /
28
28
/pyvenv.cfg
29
29
/pip-selfcheck.json
30
- .python-version
31
30
32
31
# Node
33
32
node_modules /
Original file line number Diff line number Diff line change
1
+ 3.11.6
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ VIRTUAL_ENV ?= venv
2
2
NODE_BIN = node_modules/.bin
3
3
SOURCE_DIRS = adhocracy-plus apps tests
4
4
ARGUMENTS =$(filter-out $(firstword $(MAKECMDGOALS ) ) , $(MAKECMDGOALS ) )
5
+ PYTHON_MIN_VERSION = 3.11
6
+ PYTHON_MAX_VERSION = 3.13
5
7
6
8
# for mac os gsed is needed (brew install gnu-sed and brew install gsed)
7
9
SED = sed
57
59
58
60
.PHONY : install
59
61
install :
62
+ if [ ! -f $( VIRTUAL_ENV) /bin/python3 ]; then python3 -m venv $( VIRTUAL_ENV) ; fi
63
+ @python_version=` $( VIRTUAL_ENV) /bin/python3 -c ' import sys; print(".".join(map(str, sys.version_info[:2])))' ` ; \
64
+ if echo " $$ python_version" | awk -F. -v min=" $( PYTHON_MIN_VERSION) " -v max=" $( PYTHON_MAX_VERSION) " \
65
+ ' { if ($$1 == 3 && $$2 >= min && $$2 < max) print "yes" }' | grep -q yes; then \
66
+ echo " Python version $$ python_version is compatible" ; \
67
+ else \
68
+ echo " Warning: Python version $$ python_version detected. This project requires Python >= $( PYTHON_MIN_VERSION) and < $( PYTHON_MAX_VERSION) " ; \
69
+ fi
60
70
npm install --no-save
61
71
npm run build
62
- if [ ! -f $( VIRTUAL_ENV) /bin/python3 ]; then python3 -m venv $( VIRTUAL_ENV) ; fi
63
72
$(VIRTUAL_ENV ) /bin/python -m pip install --upgrade -r requirements/dev.txt
64
73
$(VIRTUAL_ENV ) /bin/python manage.py migrate
65
74
Original file line number Diff line number Diff line change @@ -14,11 +14,14 @@ adhocracy+ is designed to make online participation easy and accessible to every
14
14
### Requirements
15
15
16
16
* nodejs (+ npm)
17
- * python 3.x (+ venv + pip)
17
+ * python>=3.11,<3.13
18
+ * We recommend using pyenv or similar to run a supported python version.
19
+ * The latest supported version is listed in ` .python-version ` , which pyenv will automatically follow.
18
20
* libpq (only if postgres should be used)
19
21
* sqlite3 [ with JSON1 enabled] ( https://code.djangoproject.com/wiki/JSON1Extension )
20
22
* redis (in production, not needed for development)
21
23
* pillow-heif (required for macOS M1 Monterey and newer versions)
24
+ * libmagic (macOS users will need to install, for example with ` brew install libmagic ` )
22
25
23
26
### Installation
24
27
Original file line number Diff line number Diff line change
1
+ ### Added
2
+
3
+ - Specify python version in new .python-version file, which pyenv ingests
4
+
5
+ ### Changed
6
+
7
+ - README mentions supported python versions
8
+ - ` make install ` will now output a warning if the dev user is running a non-supported python version
You can’t perform that action at this time.
0 commit comments