put angr in the default venv
This commit is contained in:
parent
faaa550daa
commit
dd17d29d2a
|
@ -5,7 +5,7 @@
|
||||||
LD_LIBRARY_PATH: '/home/{{ ansible_user }}/.local/lib:{{ ansible_env.get("LD_LIBRARY_PATH", "") }}'
|
LD_LIBRARY_PATH: '/home/{{ ansible_user }}/.local/lib:{{ ansible_env.get("LD_LIBRARY_PATH", "") }}'
|
||||||
vars:
|
vars:
|
||||||
python_version: 3.9.5
|
python_version: 3.9.5
|
||||||
z3_version: 4.8.11
|
# z3_version: 4.8.11
|
||||||
base_packages:
|
base_packages:
|
||||||
- dask
|
- dask
|
||||||
- distributed
|
- distributed
|
||||||
|
@ -25,6 +25,7 @@
|
||||||
- sqlalchemy
|
- sqlalchemy
|
||||||
- toolz
|
- toolz
|
||||||
- xxhash
|
- xxhash
|
||||||
|
- angr
|
||||||
scheduler_packages:
|
scheduler_packages:
|
||||||
- bokeh
|
- bokeh
|
||||||
- jupyter-server-proxy
|
- jupyter-server-proxy
|
||||||
|
@ -75,38 +76,38 @@
|
||||||
make -j$(nproc) EXTRA_CFLAGS="$CFLAGS"
|
make -j$(nproc) EXTRA_CFLAGS="$CFLAGS"
|
||||||
make EXTRA_CFLAGS="$CFLAGS" install
|
make EXTRA_CFLAGS="$CFLAGS" install
|
||||||
|
|
||||||
- name: build and install z3 (workers)
|
# - name: build and install z3 (workers)
|
||||||
when: leylines_is_server == "no"
|
# when: leylines_is_server == "no"
|
||||||
register: z3install
|
# register: z3install
|
||||||
changed_when: "'NO_COMPILE_NEEDED' not in pyinstall.stdout"
|
# changed_when: "'NO_COMPILE_NEEDED' not in pyinstall.stdout"
|
||||||
args:
|
# args:
|
||||||
executable: "/bin/bash"
|
# executable: "/bin/bash"
|
||||||
shell: |
|
# shell: |
|
||||||
set -eo pipefail
|
# set -eo pipefail
|
||||||
existing_ver="$(python3 -c "import z3; print(z3.get_version_string())" || true)"
|
# existing_ver="$(python3 -c "import z3; print(z3.get_version_string())" || true)"
|
||||||
if [ "$existing_ver" == "{{ z3_version }}" ]; then
|
# if [ "$existing_ver" == "{{ z3_version }}" ]; then
|
||||||
echo "NO_COMPILE_NEEDED"
|
# echo "NO_COMPILE_NEEDED"
|
||||||
exit
|
# exit
|
||||||
fi
|
# fi
|
||||||
cd $HOME/python
|
# cd $HOME/python
|
||||||
wget -O z3.tgz https://github.com/Z3Prover/z3/archive/z3-{{ z3_version }}.tar.gz
|
# wget -O z3.tgz https://github.com/Z3Prover/z3/archive/z3-{{ z3_version }}.tar.gz
|
||||||
tar xf z3.tgz
|
# tar xf z3.tgz
|
||||||
# microsoft why are you like this
|
# # microsoft why are you like this
|
||||||
cd z3-z3-{{ z3_version }}
|
# cd z3-z3-{{ z3_version }}
|
||||||
mkdir -p build
|
# mkdir -p build
|
||||||
cd build
|
# cd build
|
||||||
cmake .. \
|
# cmake .. \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
# -DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_INSTALL_PREFIX=$HOME/.local \
|
# -DCMAKE_INSTALL_PREFIX=$HOME/.local \
|
||||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
# -DCMAKE_INSTALL_LIBDIR=lib \
|
||||||
-DZ3_LINK_TIME_OPTIMIZATION=1 \
|
# -DZ3_LINK_TIME_OPTIMIZATION=1 \
|
||||||
-DZ3_BUILD_PYTHON_BINDINGS=1 \
|
# -DZ3_BUILD_PYTHON_BINDINGS=1 \
|
||||||
-DPYTHON_EXECUTABLE=$HOME/.local/bin/python3
|
# -DPYTHON_EXECUTABLE=$HOME/.local/bin/python3
|
||||||
make -j$(nproc)
|
# make -j$(nproc)
|
||||||
make install
|
# make install
|
||||||
cd $HOME/.local/lib/python*/site-packages/z3
|
# cd $HOME/.local/lib/python*/site-packages/z3
|
||||||
python3 -m compileall .
|
# python3 -m compileall .
|
||||||
python3 -O -m compileall .
|
# python3 -O -m compileall .
|
||||||
|
|
||||||
- name: create dask dir
|
- name: create dask dir
|
||||||
file:
|
file:
|
||||||
|
@ -120,26 +121,25 @@
|
||||||
pip:
|
pip:
|
||||||
virtualenv: /home/{{ ansible_user }}/dask/dask-venv
|
virtualenv: /home/{{ ansible_user }}/dask/dask-venv
|
||||||
virtualenv_command: python3 -m venv
|
virtualenv_command: python3 -m venv
|
||||||
virtualenv_site_packages: True
|
|
||||||
state: latest
|
state: latest
|
||||||
name: "{{ python_packages }}"
|
name: "{{ python_packages }}"
|
||||||
|
|
||||||
- name: create alternate venv for angr
|
# - name: create alternate venv for angr
|
||||||
when: leylines_is_server == "no"
|
# when: leylines_is_server == "no"
|
||||||
pip:
|
# pip:
|
||||||
virtualenv: /home/{{ ansible_user }}/dask/angr-venv
|
# virtualenv: /home/{{ ansible_user }}/dask/angr-venv
|
||||||
virtualenv_command: python3 -m venv
|
# virtualenv_command: python3 -m venv
|
||||||
state: latest
|
# state: latest
|
||||||
name: ["angr", "cloudpickle"]
|
# name: ["angr", "cloudpickle"]
|
||||||
|
#
|
||||||
- name: copy weird packages
|
# - name: copy weird packages
|
||||||
when: leylines_is_server == "no"
|
# when: leylines_is_server == "no"
|
||||||
changed_when: true
|
# changed_when: true
|
||||||
args:
|
# args:
|
||||||
executable: "/bin/bash"
|
# executable: "/bin/bash"
|
||||||
shell: |
|
# shell: |
|
||||||
set -eo pipefail
|
# set -eo pipefail
|
||||||
cp -r $HOME/.local/lib/python*/site-packages/z3/ $HOME/dask/dask-venv/lib/python*/site-packages/
|
# cp -r $HOME/.local/lib/python*/site-packages/z3/ $HOME/dask/dask-venv/lib/python*/site-packages/
|
||||||
|
|
||||||
- name: install systemd user dir
|
- name: install systemd user dir
|
||||||
file:
|
file:
|
||||||
|
|
Loading…
Reference in New Issue