Skip to content

Commit

Permalink
pip wheel update
Browse files Browse the repository at this point in the history
  • Loading branch information
romainthomas committed Sep 30, 2023
1 parent b4c2f47 commit dd96f01
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 15 deletions.
4 changes: 2 additions & 2 deletions api/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,9 @@ def _fix_platform(self):

def build_extension(self, ext):
if build_dir := cmake_conf.build_root_dir():
self.build_temp = (Path(build_dir) / "tmp").as_posix()
self.build_temp = (Path(build_dir) / "temp").as_posix()
else:
self.build_temp = TemporaryDirectory(prefix="lief-tmp-").name
self.build_temp = TemporaryDirectory(prefix="lief-temp-").name


if build_dir := cmake_conf.build_root_dir():
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/manylinux2014-aarch64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ git config --global --add safe.directory /work
BUILD_DIR=/tmp/lief-build
export LIEF_BUILD_DIR="${BUILD_DIR}"

$PYTHON_BINARY -m pip install tomli
$PYTHON_BINARY -m pip install tomli pip wheel

pushd /work/api/python
export PYLIEF_CONF=/work/scripts/docker/pylinux-aarch64.toml
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/run_archlinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set -ex
export LIEF_SAMPLES_DIR=/tmp/samples
export PYTHONPATH="/src/tests:$PYTHONPATH"

python -m pip install --upgrade pip
python -m pip install --upgrade pip wheel
python -m pip install pytest

python -m pip install --no-index --find-links /src/dist lief
Expand Down
6 changes: 2 additions & 4 deletions scripts/docker/run_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ export CXXFLAGS='-ffunction-sections -fdata-sections -fvisibility-inlines-hidden
export CFLAGS='-ffunction-sections -fdata-sections -static-libgcc'
export LDFLAGS='-Wl,--gc-sections -Wl,--strip-all'

BUILD_DIR=/tmp/lief-build
export LIEF_BUILD_DIR="${BUILD_DIR}"
export LIEF_BUILD_DIR="/tmp/lief-build"

$PYTHON_BINARY -m pip install tomli
$PYTHON_BINARY -m pip install tomli pip wheel

pushd /src/api/python

export PYLIEF_CONF=/src/scripts/docker/pylinux-x64.toml \

$PYTHON_BINARY -m pip -vvv wheel --no-build-isolation --wheel-dir=/src/wheel_stage .
Expand Down
14 changes: 7 additions & 7 deletions scripts/docker/run_linux_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ export CXXFLAGS='-ffunction-sections -fdata-sections -fvisibility-inlines-hidden
export CFLAGS='-ffunction-sections -fdata-sections -static-libgcc'
export LDFLAGS='-Wl,--gc-sections'

BUILD_DIR=/tmp/lief-build
export LIEF_BUILD_DIR="${BUILD_DIR}"
export LIEF_BUILD_DIR="/tmp/lief-build"

$PYTHON_BINARY -m pip install -r /src/tests/requirements.txt
$PYTHON_BINARY -m pip install tomli pip wheel

mkdir -p ${LIEF_SAMPLES_DIR}

Expand All @@ -23,21 +23,21 @@ popd

# Run the Python test suite
$PYTHON_BINARY tests/run_pytest.py
$PYTHON_BINARY tests/run_tools_check.py ${BUILD_DIR}/temp
$PYTHON_BINARY tests/run_tools_check.py ${LIEF_BUILD_DIR}/temp

ctest --output-on-failure --test-dir ${BUILD_DIR}/temp
ctest --output-on-failure --test-dir ${LIEF_BUILD_DIR}/temp

# Fuzzing
PYTHONPATH=tests/ $PYTHON_BINARY tests/elf/fuzzing.py \
${BUILD_DIR}/temp/tests/Melkor/src/MELKOR/melkor \
${LIEF_BUILD_DIR}/temp/tests/Melkor/src/MELKOR/melkor \
--input-seed ${LIEF_SAMPLES_DIR}/ELF/ELF64_x86-64_binary_ls.bin -n 100

PYTHONPATH=tests/ $PYTHON_BINARY tests/elf/fuzzing.py \
${BUILD_DIR}/temp/tests/Melkor/src/MELKOR/melkor \
${LIEF_BUILD_DIR}/temp/tests/Melkor/src/MELKOR/melkor \
--input-seed ${LIEF_SAMPLES_DIR}/ELF/ELF64_x86-64_binary_openssl.bin -n 100

PYTHONPATH=tests/ $PYTHON_BINARY tests/elf/fuzzing.py \
${BUILD_DIR}/temp/tests/Melkor/src/MELKOR/melkor \
${LIEF_BUILD_DIR}/temp/tests/Melkor/src/MELKOR/melkor \
--input-seed ${LIEF_SAMPLES_DIR}/ELF/ELF64_x86-64_binary_nm.bin -n 100

find /src/wheel_stage -iname "*-cp${PYTHON_VERSION}-*" -exec auditwheel repair -w /src/dist {} \;
Expand Down

0 comments on commit dd96f01

Please sign in to comment.