Skip to content

Commit 3cea53f

Browse files
authored
Merge pull request #65 from mwcraig/install-instructions
Add dev install instructions and release instructions
2 parents d5efeb1 + fef4d1d commit 3cea53f

File tree

2 files changed

+65
-1
lines changed

2 files changed

+65
-1
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,33 @@ controls available to zoom and rotate the camera:
4040
Shift-drag to pan left/right and up/down.
4141
Touch screen: pinch/extend to zoom, swipe or two-finger rotate.
4242

43-
Currently, to re-run a VPython program in a Jupyter notebook you need to click the circular arrow icon to "restart the kernel" and then click the red-highlighted button, then click in the first cell, then click the run icon. Alternatively, if you insert "scene = canvas()" at the start of your program, you can rerun the program without restarting the kernel.
43+
Currently, to re-run a VPython program in a Jupyter notebook you need to click the circular arrow icon to "restart the kernel" and then click the red-highlighted button, then click in the first cell, then click the run icon. Alternatively, if you insert `scene = canvas()`` at the start of your program, you can rerun the program without restarting the kernel.
4444

4545
Run example VPython programs: [![Binder](http://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/BruceSherwood/vpython-jupyter/7.4.7?filepath=index.ipynb)
4646

47+
## Installation for developers from package source
48+
49+
You should install Cython (`conda install cython` or `pip install cython`) so
50+
that the fast version of the vector class can be generated and compiled. You
51+
may also need to install a compiler (command line tools on Mac, community
52+
edition on Visual Studio on Windows).
53+
54+
If you don't have a compilier vpython should still work, but code that
55+
generates a lot of vectors may run a little slower.
56+
57+
To install vpython from source run this command from the source directory
58+
after you have downloaded it:
59+
60+
```
61+
pip install -e .
62+
```
63+
64+
The `-e` option installs the code with symbolic links so that change you make
65+
show up without needing to reinstall.
66+
67+
If you also need the JupyterLab extension, please see the instructions
68+
in the `labextension` folder.
69+
4770
## vpython build status (for the vpython developers)
4871

4972
[![Build Status](https://travis-ci.com/vpython/vpython-jupyter.svg?branch=master)](https://travis-ci.com/vpython/vpython-jupyter) [![Build status](https://ci.appveyor.com/api/projects/status/mb3y238y1eae7xnh?svg=true)](https://ci.appveyor.com/project/vpython/vpython-jupyter)

RELEASE.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# How to do a vpython release
2+
3+
There are two things that need to be released:
4+
5+
+ The Python package `vpython-jupyter`
6+
+ The JupyterLab extension called `vpython`
7+
8+
## Releasing the Python package
9+
10+
Versions for the Python package are generated using
11+
[`versioneer`](https://github.com/warner/python-versioneer). That means that
12+
to make a new release the first step is to generate a git tag with the release
13+
numbers.
14+
15+
Release numbers should be in the format `X.Y.Z`, e.g. `7.4.2` or `7.5.0`.
16+
17+
Currently, all of the build/upload of the releases is handled on Travis-CI and
18+
Appveyor, but in principle one could build the packages on local machines and
19+
upload them.
20+
21+
Tagging the commit in GitHub or doing the tag locally and pushing it to GitHub
22+
will trigger the builds without any further action.
23+
24+
If you want to build locally:
25+
26+
+ Build and upload the source distribution (once per release)
27+
* `python setup.py sdist` -- generate the source distribution
28+
* `twine upload dist/*.tar.gz` -- upload the generated distribution
29+
+ Build and upload binary wheels (once per release *per platform*)
30+
* `python setup.py wheel` -- generate binary distribution on the platform
31+
on which you are running.
32+
* `twine upload dist/*.whl` -- upload the generated distribution
33+
+ Build the conda package (once per release *per platform*)
34+
* `conda build vpython.recipe`
35+
* `anaconda upload `*recipe_location* -- replace *recipe_location* with
36+
the directory output by conda build.
37+
38+
## Releasing the JupyterLab Extension
39+
40+
Please see the instructions in the `labextension` folder for building and
41+
releasing the JupyterLab extension.

0 commit comments

Comments
 (0)