Skip to content

Commit 2788726

Browse files
committed
Merge branch 'kasbah-patch-1'
With some modifications to retain the instructions when KiCad is not installed.
2 parents c4778e3 + f09f253 commit 2788726

File tree

1 file changed

+29
-11
lines changed

1 file changed

+29
-11
lines changed

README.md

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,32 @@ datasheet.
1818
KiPlot lets you do this.
1919

2020
As 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
2222
somewhat 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

4348
You 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
5055
export 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

Comments
 (0)