1- # Faasm Python Environment [ ![ Tests] ( https://github.com/faasm/python/workflows/Tests/badge.svg?branch=master )] ( https://github.com/faasm/python/actions ) [ ![ License] ( https://img.shields.io/github/license/faasm/python.svg )] ( https://github.com/faasm/python/blob/master/LICENSE.md )
1+ # Faasm Python Environment [ ![ Tests] ( https://github.com/faasm/python/workflows/Tests/badge.svg?branch=master )] ( https://github.com/faasm/python/actions ) [ ![ License] ( https://img.shields.io/github/license/faasm/python.svg )] ( https://github.com/faasm/python/blob/master/LICENSE.md )
22
33This build cross-compiles CPython and a number of Python modules to WebAssembly
44for use in [ Faasm] ( https://github.com/faasm/faasm ) .
@@ -10,9 +10,9 @@ interface](https://github.com/faasm/faasm/blob/master/docs/host_interface.md).
1010## Set-up and development
1111
1212This 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 ) .
13+ to [ the docs] ( https://github.com/faasm/faasm/blob/master/docs/development.md ) .
1414
15- To set up your local environment, run the ` python ` CLI as per the Faasm docs,
15+ To set up your local environment, run the ` python ` CLI as per the Faasm docs,
1616then:
1717
1818``` bash
@@ -42,7 +42,7 @@ inv runtime
4242inv func
4343
4444# Copy the actual Python functions into place
45- inv func.uploadpy --local
45+ inv func.upload-all --local
4646```
4747
4848## Code changes
@@ -56,10 +56,10 @@ compare](https://github.com/python/cpython/compare/v3.8.2...faasm:faasm).
5656A similar (small) list of changes for numpy can be seen
5757[ here] ( https://github.com/numpy/numpy/compare/v1.19.2...faasm:faasm ) .
5858
59- CPython is built statically, some notes on this process can be found
60- [ here] ( https://wiki.python.org/moin/BuildStatically ) .
59+ CPython is built statically, some notes on this process can be found
60+ [ here] ( https://wiki.python.org/moin/BuildStatically ) .
6161
62- Several of the code changes to CPython and numpy were borrowed from
62+ Several of the code changes to CPython and numpy were borrowed from
6363[ pyodide] ( https://github.com/iodide-project/pyodide ) .
6464
6565## Releasing
@@ -107,7 +107,7 @@ scripts on the build machine (not any other Python that might be installed).
107107
108108Do ** not** upgrade Pip in the build machine copy of Python.
109109
110- The versions of Pip and Python for wasm and the build machine must match
110+ The versions of Pip and Python for wasm and the build machine must match
111111exactly.
112112
113113### Building CPython to WebAssembly
@@ -121,10 +121,10 @@ inv cpython
121121The result is installed at ` third-party/cpython/install/wasm ` .
122122
123123We provide a [ Setup.local] ( third-party/cpython/Modules/Setup.local ) file, which
124- specifies which standard CPython modules will be built statically.
124+ specifies which standard CPython modules will be built statically.
125125
126126At the end of the CPython build, it will print out a list of which modules have
127- been successfully built and which have failed. Note that many of the standard
127+ been successfully built and which have failed. Note that many of the standard
128128library modules will fail in this build, but the ones we need should succeed.
129129
130130## Cross-compilation set-up
@@ -137,13 +137,13 @@ See the dev instructions above for set-up.
137137
138138### Changing the crossenv environment
139139
140- Crossenv picks up the cross-compilation environment from the CPython
141- build artifacts. Therefore, to make changes to the cross-compilation
140+ Crossenv picks up the cross-compilation environment from the CPython
141+ build artifacts. Therefore, to make changes to the cross-compilation
142142environment:
143143
144144- Modify the CPython build (see ` tasks.py ` )
145- - Rerun the CPython build (` inv cpython --clean ` )
146- - Rebuild the crossenv (` ./bin/crossenv_setup.sh ` )
145+ - Rerun the CPython build (` inv cpython --clean ` )
146+ - Rebuild the crossenv (` ./bin/crossenv_setup.sh ` )
147147- Enter the crossenv and inspect the environment with ` bin/sanity_check.py `
148148
149149## Modules
@@ -155,7 +155,7 @@ To run this you must first have the cross-env activated as described above.
155155
156156``` bash
157157# Install all supported modules
158- inv libs.install
158+ inv libs.install
159159
160160# Install experimental modules
161161inv libs.install --experimental
@@ -167,7 +167,7 @@ inv libs.install --name numpy
167167inv libs.install --name < module_name>
168168```
169169
170- Libraries will then be installed to
170+ Libraries will then be installed to
171171` cross_venv/cross/lib/python3.8/site-packages ` .
172172
173173### Debugging module builds
@@ -206,7 +206,7 @@ inv libs.install --name mxnet
206206inv libs.install --name horovod
207207```
208208
209- ### Cleaning and uninstalling
209+ ### Cleaning and uninstalling
210210
211211```
212212# Clean then rebuild
0 commit comments