Skip to content

Commit

Permalink
jump to python 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Changaco committed Jan 25, 2019
1 parent f357eb5 commit 9af0302
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
python := "$(shell { command -v python2.7 || command -v python; } 2>/dev/null)"
python := "$(shell { command -v python3.6 || command -v python; } 2>/dev/null)"
install_where := $(shell $(python) -c "import sys; print('' if hasattr(sys, 'real_prefix') else '--user')")

# Set the relative path to installed binaries under the project virtualenv.
Expand Down Expand Up @@ -27,7 +27,7 @@ env: requirements*.txt

rehash-requirements:
for f in requirements*.txt; do \
sed -r -e '/^ +--hash/d' -e 's/\\$$//' $$f | xargs ./env/bin/hashin -r $$f -p 2.7 -p 3.6; \
sed -r -e '/^ +--hash/d' -e 's/\\$$//' $$f | xargs ./env/bin/hashin -r $$f -p 3.4 -p 3.6; \
done

clean:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The python code inside simplates is only for request-specific logic, common back

Firstly, make sure you have the following dependencies installed:

- python ≥ 2.7.12 (the code is compatible with python 3, but production still runs on python 2 for now)
- python ≥ 3.6
- including the C headers of python and libffi, which are packaged separately in many Linux distributions
- postgresql 9.6 (see [the official download & install docs](https://www.postgresql.org/download/))
- make
Expand Down Expand Up @@ -178,7 +178,7 @@ All new dependencies need to be audited to check that they don't contain malicio
We use [pip's Hash-Checking Mode](https://pip.pypa.io/en/stable/reference/pip_install/#hash-checking-mode) to protect ourselves from dependency tampering. Thus when adding or upgrading a dependency the new hashes need to computed and put in the requirements file. For that you can use [hashin](https://github.com/peterbe/hashin):

pip install hashin
hashin package==x.y -r requirements_base.txt -p 2.7 -p 3.4 -p 3.6
hashin package==x.y -r requirements_base.txt -p 3.4 -p 3.6
# note: we have several requirements files, use the right one

If for some reason you need to rehash all requirements, run `make rehash-requirements`.
Expand Down

0 comments on commit 9af0302

Please sign in to comment.