@@ -9,21 +9,41 @@ interface](https://github.com/faasm/faasm/blob/master/docs/host_interface.md).
99
1010## Set-up and development
1111
12- We recommend using Docker for developing this repo. Start the container with:
12+ This repo is developed using the Faasm development environment, set up according
13+ to [ the docs] ( https://github.com/faasm/faasm/blob/master/docs/development.md ) .
1314
14- ```
15- ./bin/cli.sh
16- ```
17-
18- To show the list of available tasks (inside the container):
15+ To set up your local environment, run the ` python ` CLI as per the Faasm docs,
16+ then:
1917
2018``` bash
21- inv -l
22- ```
19+ # Install a local dev version of the cpp tools
20+ pip3 uninstall faasmtools
21+ pip3 install -e third-party/cpp
22+
23+ # Install the matching native python in your local env
24+ ./bin/install_build_python.sh
25+
26+ # Compile CPython to wasm
27+ inv cpython
28+
29+ # Set up and activate cross-env
30+ ./bin/crossenv_setup.sh
31+
32+ # Activate cross-env
33+ . cross_venv/bin/activate
34+
35+ # Build Python libraries
36+ inv libs.install
2337
24- The build uses the [ Faasm
25- toolchain] ( https://github.com/faasm/faasm-toolchain ) to cross-compile both
26- CPython and C-extensions to WebAssembly.
38+ # Copy runtime files into place
39+ inv runtime
40+
41+ # Build the Faasm function to wrap CPython
42+ inv func
43+
44+ # Copy the actual Python functions into place
45+ inv func.uploadpy --local
46+ ```
2747
2848## Code changes
2949
@@ -47,11 +67,11 @@ Several of the code changes to CPython and numpy were borrowed from
4767This repo gets built as a container, ` faasm/cpython ` . If you want to release a
4868new version, you can:
4969
50- - Update the version in ` VERSION ` and ` .github `
70+ - Update the version in ` VERSION ` and ` .github/workflows/tests.yml `
5171- Commit to your branch
52- - Check that the normal build works in CI
5372- Run ` inv git.tag `
54- - Let the Github action do the rest
73+ - Check the release build has run
74+ - Create a pull request
5575
5676## PyFaasm
5777
@@ -113,26 +133,7 @@ Setuptools and distutils both interrogate the Python system environment during
113133the build process. This makes it quite difficult to cross-compile libraries, so
114134we use [ crossenv] ( https://github.com/benfogle/crossenv ) .
115135
116- To set up crossenv:
117-
118- ```
119- ./bin/crossenv_setup.sh
120- ```
121-
122- You can then activate with:
123-
124- ```
125- . cross_venv/bin/activate
126- ```
127-
128- From inside the virtual environment, you can inspect the set-up with:
129-
130- ```
131- python bin/sanity_check.py | less
132- ```
133-
134- This will display the environment used to install Python modules (including the
135- relevant cross-compilation variables, e.g. ` CC ` , ` CFLAGS ` etc.).
136+ See the dev instructions above for set-up.
136137
137138### Changing the crossenv environment
138139
@@ -215,13 +216,8 @@ inv mxnet --clean
215216inv mxnet.uninstall
216217```
217218
218- ## Running in Faasm
219-
220- See the [ Faasm python
221- docs] ( https://github.com/faasm/faasm/blob/master/docs/python.md ) .
222-
223219## BLAS and LAPACK
224220
225221Faasm's normal BLAS and LAPACK support using CLAPACK should be picked up by
226222numpy due to the addition of the [ site.cfg] ( ../third-party/numpy/site.cfg ) .
227-
223+ (note 19/03/21 this has been temporarily disabled).
0 commit comments