Skip to content

Commit 07faac5

Browse files
committed
Moved scripts to scripts dir
1 parent 324902a commit 07faac5

File tree

6 files changed

+20
-16
lines changed

6 files changed

+20
-16
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ we use [crossenv](https://github.com/benfogle/crossenv).
6565
To set up crossenv:
6666

6767
```
68-
./crossenv_setup.sh
68+
./scripts/crossenv_setup.sh
6969
```
7070

7171
You can then activate with:
@@ -77,7 +77,7 @@ You can then activate with:
7777
From inside the virtual environment, you can inspect the set-up with:
7878

7979
```
80-
python sanity_check.py | less
80+
python scripts/sanity_check.py | less
8181
```
8282

8383
This will display the environment used to install Python modules (including the
@@ -91,8 +91,8 @@ environment:
9191

9292
- Modify the CPython build (see `tasks.py`)
9393
- Rerun the CPython build (`inv cpython --clean`)
94-
- Rebuild the crossenv (`./crossenv_setup.sh`)
95-
- Enter the crossenv and inspect the environment with `sanity_check.py`
94+
- Rebuild the crossenv (`./scripts/crossenv_setup.sh`)
95+
- Enter the crossenv and inspect the environment with `scripts/sanity_check.py`
9696

9797
## Modules
9898

@@ -101,7 +101,7 @@ With the crossenv activated, we can build modules with normal `pip`.
101101
To install all the modules, you can run:
102102

103103
```
104-
./install_modules.sh
104+
./scripts/install_modules.sh
105105
```
106106

107107
Libraries will then be installed to
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44

55
from crossenv import CrossEnvBuilder
66

7-
THIS_DIR = dirname(abspath(__file__))
7+
PROJ_ROOT = dirname(dirname(abspath(__file__)))
88

9-
WASM_CPYTHON = join(THIS_DIR, "third-party", "cpython", "install", "wasm",
9+
WASM_CPYTHON = join(PROJ_ROOT, "third-party", "cpython", "install", "wasm",
1010
"bin", "python3.8")
1111

12-
CROSSENV_VENV_DIR = join(THIS_DIR, "cross_venv")
13-
14-
# TODO - should this be the actual sysroot, or the Python install dir?
12+
CROSSENV_VENV_DIR = join(PROJ_ROOT, "cross_venv")
1513
CROSSENV_SYSROOT = "/usr/local/faasm/llvm-sysroot"
1614

1715

@@ -38,3 +36,4 @@ def main():
3836

3937
if __name__ == "__main__":
4038
main()
39+
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
set -e
44

55
THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
6+
PROJ_ROOT=${THIS_DIR}/..
67

78
# NOTE - all the commands must use the specially-installed python
89
# on the build machine.
@@ -11,7 +12,7 @@ BUILD_PYTHON=${BUILD_PYTHON_BIN}/python3.8
1112
BUILD_PIP=${BUILD_PYTHON_BIN}/pip3.8
1213

1314
# Install the build machine python dependencies
14-
CROSSENV_SRC_DIR=${THIS_DIR}/third-party/crossenv
15+
CROSSENV_SRC_DIR=${PROJ_ROOT}/third-party/crossenv
1516
echo "Installing crossenv from ${CROSSENV_SRC_DIR}"
1617
pushd ${CROSSENV_SRC_DIR} >> /dev/null
1718
${BUILD_PIP} install -e .
@@ -20,10 +21,10 @@ echo "Installing cython"
2021
${BUILD_PIP} install cython
2122
popd >> /dev/null
2223

23-
pushd ${THIS_DIR} >> /dev/null
24+
pushd ${PROJ_ROOT} >> /dev/null
2425

2526
# Run the set-up script
26-
${BUILD_PYTHON} crossenv_setup.py
27+
${BUILD_PYTHON} scripts/crossenv_setup.py
2728

2829
# Enter the env and print details
2930
source cross_venv/bin/activate
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,23 @@
33
set -e
44

55
THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
6+
PROJ_ROOT=${THIS_DIR}/..
7+
SITE_PACKAGES=${PROJ_ROOT}/cross_venv/cross/lib/python3.8/site-packages
68

79
# Start the cross-env
10+
pushd ${PROJ_ROOT} >> /dev/null
811
source cross_venv/bin/activate
12+
popd >> /dev/null
913

1014
# Numpy (parallel build https://numpy.org/devdocs/user/building.html)
1115
export NPY_NUM_BUILD_JOBS=$(nproc --ignore 1)
1216
echo "Numpy using ${NPY_NUM_BUILD_JOBS} cores"
13-
pushd ${THIS_DIR}/third-party/numpy >> /dev/null
17+
pushd ${PROJ_ROOT}/third-party/numpy >> /dev/null
1418
pip install .
1519
popd >> /dev/null
1620

1721
# Pyfaasm
18-
pushd ${THIS_DIR}/third-party/pyfaasm >> /dev/null
22+
pushd ${PROJ_ROOT}/third-party/pyfaasm >> /dev/null
1923
pip install .
2024
popd >> /dev/null
2125

File renamed without changes.

third-party/numpy

Submodule numpy updated from 97825be to 2cb7a69

0 commit comments

Comments
 (0)