refactor!: drop python2

This commit is contained in:
Eisuke Kawashima
2025-06-09 15:18:17 +09:00
parent 7d017f1cb1
commit 0975c8ddde
6 changed files with 6 additions and 18 deletions

View File

@ -255,17 +255,6 @@ ifeq "$(PYTHON_INCLUDE)" ""
endif
endif
# Old Ubuntu and others dont have python/python2-config so we hardcode 2.7
ifeq "$(PYTHON_INCLUDE)" ""
ifneq "$(shell command -v python2.7 2>/dev/null)" ""
ifneq "$(shell command -v python2.7-config 2>/dev/null)" ""
PYTHON_INCLUDE := $(shell python2.7-config --includes)
PYTHON_LIB := $(shell python2.7-config --ldflags)
PYTHON_VERSION := $(strip $(shell python2.7 --version 2>&1))
endif
endif
endif
ifdef SOURCE_DATE_EPOCH
BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+%Y-%m-%d" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+%Y-%m-%d" 2>/dev/null || date -u "+%Y-%m-%d")
else

View File

@ -3,8 +3,7 @@
These are example and helper files for the custom mutator feature.
See [docs/custom_mutators.md](../../docs/custom_mutators.md) for more information
Note that if you compile with python3.7 you must use python3 scripts, and if
you use python2.7 to compile python2 scripts!
Note that if you compile with python3.7 you must use python3 scripts.
simple_example.c - most simplest example. generates a random sized buffer
filled with 'A'

View File

@ -56,7 +56,7 @@ if [ ! -f "../../src/afl-performance.o" ]; then
fi
PYTHONBIN=`command -v python3 || command -v python || command -v python2 || echo python3`
PYTHONBIN=`command -v python3 || command -v python || echo python3`
MAKECMD=make
TARCMD=tar

View File

@ -52,7 +52,7 @@ if [ ! -f "../../config.h" ]; then
fi
PYTHONBIN=`command -v python3 || command -v python || command -v python2 || echo python3`
PYTHONBIN=`command -v python3 || command -v python || echo python3`
MAKECMD=make
TARCMD=tar

View File

@ -10,7 +10,7 @@ test -s ../unicorn_mode/unicornafl/build/libunicornafl.a && {
export AFL_DEBUG_CHILD=1
# some python version should be available now
PYTHONS="`command -v python3` `command -v python` `command -v python2`"
PYTHONS="`command -v python3` `command -v python`"
EASY_INSTALL_FOUND=0
for PYTHON in $PYTHONS ; do

View File

@ -65,7 +65,7 @@ if [ ! -f "../afl-showmap" ]; then
fi
PYTHONBIN=`command -v python3 || command -v python || command -v python2 || echo python3`
PYTHONBIN=`command -v python3 || command -v python || echo python3`
MAKECMD=make
TARCMD=tar
@ -116,7 +116,7 @@ for i in $PYTHONBIN automake autoconf git $MAKECMD $TARCMD; do
done
# some python version should be available now
PYTHONS="`command -v python3` `command -v python` `command -v python2`"
PYTHONS="`command -v python3` `command -v python`"
PIP_FOUND=0
for PYTHON in $PYTHONS ; do