CPython 3.7.0 (the latest stable release).
Virtualenv is optional.
pip3 install -r requirements.txt
Copy git_hooks/pre-push
to .git/hooks/
.
Edit it as neccessary to match how you invoke Python in your environment.
Root of this repository should be in PYTHONPATH
, because we use absolute imports (from production import utils
). There are several ways to achieve that:
PYTHONPATH
<python installation or venv>/lib/python3.7/site-packages/tbd.pth
whose content is a single line /path/to/icfpc2018-tbd
python3 -m production.some_script
instead of python3 production/some_script.py
cd icfpc2018-tbd/
python3 -m production.test_all
# or simply
cd icfpc2018-tbd/
pytest
You'll need C++ compiler to build C++ extensions. Most likely Visual Studio 2017 would work.
Most Python packages could be installed simply with pip3 install whatever_package
nowadays,
but sometimes it does not work (e.g. for psycopg2
).
In such cases, download the package from https://www.lfd.uci.edu/~gohlke/pythonlibs/
and install it manually (pip install whatever_package.wheel
).
Python:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.7
Then use python3.7
to invoke Python,
python3.7 -m pip
to invoke pip
,
python3.7 -m pytest
to invoke pytest
,
you get the idea.
GCC:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-8
Then set environment variable CC
to g++-8
.