control metadata update.
[open-adventure.git] / INSTALL.adoc
1 = Installing Open Adventure =
2
3 The instructions below assume your system uses Python 3 by default,
4 but the actual Python code in Open Adventure is 2/3-agnostic. Adjust
5 the example commands below accordingly.
6
7 1. Install PyYAML for Python 3 (which requires Python 3) and libedit
8 from http://thrysoee.dk/editline/ (aka: editline) on your system.
9 +
10 On Debian and Ubuntu: `apt-get install python3-yaml libedit-dev`.
11 +
12 On Fedora: `dnf install python3-PyYAML libedit-devel`.
13 +
14 If you are using MacPorts on OS X: `port install py3{5,6}-yaml`, as
15 appropriate for your Python 3 version.
16 +
17 You can also use pip to install PyYAML: `pip3 install PyYAML`.
18
19 2. Change to the top-level directory of the source code (e.g., `cd open-adventure`).
20
21 3. Build with `make`.
22 +
23 If make returns the following message:
24 +
25 ------------------------------------------------
26 Traceback (most recent call last):
27   File "./make_dungeon.py", line 13, in <module>
28     import sys, yaml
29 ImportError: No module named yaml
30 ------------------------------------------------
31 +
32 try editing make_dungeon.py to change `#!/usr/bin/env python` to
33 read `#!/usr/bin/env python3`
34
35 If you still get the error, use the following command to install yaml with pip:
36
37 `pip install pyyaml`
38
39 Make sure you have `pip` installed on your system.  If not, you should install it first:
40
41 https://pip.pypa.io/en/stable/installing/
42
43
44 4. Optionally run a regression test on the code with `make check`.
45
46 5. Run `./advent` to play.