@@ -18,27 +18,32 @@ datasheet.
1818KiPlot lets you do this.
1919
2020As a side effect of providing a scriptable plot driver for KiCad, KiPlot also
21- allows functional testing of KiCad plot functions, which would otherwise be
21+ allows functional testing of KiCad plot functions, which would otherwise be
2222somewhat unwieldy to write.
2323
2424## Developing
2525
26- Set up a virtualenv:
26+ ### Set up a virtualenv (if you installed KiCad normally)
27+
28+ If you installed KiCad from a package manager, or you used ` make install ` ,
29+ you probably have the packages and libraries on you system paths.
2730
2831```
29- virtualenv --python /usr/bin/python2.7 ~/venv/kiplot
30- source ~/venv/kiplot/bin/activate
32+ virtualenv --python /usr/bin/python2.7 --system-site-packages ~/venv/kiplot
3133```
3234
33- Install ` kiplot ` with ` pip -e ` :
35+ ### Set up a virtualenv (if you installed KiCad locally)
36+
37+
38+ If the ` pcbnew ` Python package is * not* installed at a system level (e.g. if
39+ you are building locally and not installing to the system, you should not
40+ need any system packages:
3441
3542```
36- cd path/to/kiplot
37- pip install -e .
43+ virtualenv --python /usr/bin/python2.7 ~/venv/kiplot
3844```
39-
40- This doesn't include the ` pcbnew ` Python package - that is assumed to
41- be accessible to the program. You might need to add it to the ` PYTHONPATH ` .
45+ However, you must make sure ` pcbnew ` is accessible to KiPlot.
46+ You might need to add it to the ` PYTHONPATH ` .
4247
4348You might also need to set ` LD_LIBRARY_PATH ` (you need to be able to load
4449` libkicad_3dsg.so ` ).
@@ -50,7 +55,20 @@ export PYTHONPATH=~/local/kicad/lib/python2.7/site-packages
5055export LD_LIBRARY_PATH=~/local/kicad/lib64
5156```
5257
53- If you've installed "normally", you should not need to do this.
58+ ### Install KiPlot to the virtualenv
59+
60+ Activate the virtualenv:
61+
62+ ```
63+ source ~/venv/kiplot/bin/activate
64+ ```
65+
66+ Install ` kiplot ` with ` pip -e ` :
67+
68+ ```
69+ cd path/to/kiplot
70+ pip install -e .
71+ ```
5472
5573## Testing
5674
0 commit comments