From 465beffc5344e936ceceb2782a2388623c3caf20 Mon Sep 17 00:00:00 2001 From: Mike Kershaw / Dragorn Date: Mon, 23 Sep 2019 15:23:54 -0400 Subject: [PATCH] Require python3 The new python module asyncio code requires python3, remove option for python2 in autoconf and set it as a dep in setup.py --- capture_sdr_rtl433/setup.py | 1 + capture_sdr_rtladsb/setup.py | 1 + configure | 41 ------------------------------------ configure.ac | 18 ---------------- 4 files changed, 2 insertions(+), 59 deletions(-) diff --git a/capture_sdr_rtl433/setup.py b/capture_sdr_rtl433/setup.py index a38d0bb00..f8f579977 100755 --- a/capture_sdr_rtl433/setup.py +++ b/capture_sdr_rtl433/setup.py @@ -7,6 +7,7 @@ author_email='dragorn@kismetwireless.net', url='https://www.kismetwireless.net/', install_requires=['protobuf'], + python_requires='>=3.2', packages=find_packages(), entry_points={ 'console_scripts': [ diff --git a/capture_sdr_rtladsb/setup.py b/capture_sdr_rtladsb/setup.py index 7badc41e8..f0a4f0ec7 100755 --- a/capture_sdr_rtladsb/setup.py +++ b/capture_sdr_rtladsb/setup.py @@ -7,6 +7,7 @@ author_email='russell@handorf.com', url='https://www.handorf.com/', install_requires=['numpy', 'protobuf'], + python_requires='>=3.2', packages=find_packages(), entry_points={ 'console_scripts': [ diff --git a/configure b/configure index 84fa88ef8..5e3ba0c49 100755 --- a/configure +++ b/configure @@ -775,7 +775,6 @@ enable_capture_tools_only enable_element_typesafety enable_protobuflite enable_python_tools -enable_python2 with_python_interpreter enable_largefile enable_mutextimeout @@ -1458,8 +1457,6 @@ Optional Features: protobuf --disable-python-tools Disable building Python modules and Python-only data sources - --enable-python2 Force building with python2 instead of the modern - python3 --disable-largefile omit support for large files --disable-mutextimeout Disable failsafe thread mutex timer, use with caution @@ -8424,15 +8421,6 @@ fi PYTHON=python3 PYTHON_VERSION=3 -# Check whether --enable-python2 was given. -if test "${enable_python2+set}" = set; then : - enableval=$enable_python2; case "${enableval}" in - yes) PYTHON_INTERPRETER=python2; - PYTHON=python2 ; - PYTHON_VERSION=2 ;; - esac -fi - # Check whether --with-python-interpreter was given. @@ -8478,28 +8466,6 @@ $as_echo "no" >&6; } fi fi - else - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking python module: setuptools" >&5 -$as_echo_n "checking python module: setuptools... " >&6; } - python2 -c "import setuptools" 2>/dev/null - if test $? -eq 0; - then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - eval HAVE_PYMOD_SETUPTOOLS=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - eval HAVE_PYMOD_SETUPTOOLS=no - # - if test -n "" - then - as_fn_error $? "failed to find required module setuptools" "$LINENO" 5 - exit 1 - fi - fi - fi if test "$HAVE_PYMOD_SETUPTOOLS" == "no"; then @@ -13776,13 +13742,6 @@ if test "$havelibnm" != "yes" -a "$linux" = "yes"; then echo "disable NetworkManager or manually tell it to ignore specific interaces." fi -if test "$PYTHON_VERSION" != 3; then - echo - echo "*** WARNING ***" - echo "Building for python2; you may need to provide your own python packages of some " - echo "modules like numpy, which now require python3." -fi - if test "$want_asan" = "yes" -a "$want_tsan" = "yes"; then echo echo "*** WARNING ***" diff --git a/configure.ac b/configure.ac index b9e3d431c..bc391edef 100644 --- a/configure.ac +++ b/configure.ac @@ -327,15 +327,6 @@ AC_ARG_ENABLE([python-tools], PYTHON=python3 PYTHON_VERSION=3 -AC_ARG_ENABLE([python2], - AS_HELP_STRING([--enable-python2], [Force building with python2 instead of the modern python3]), - [case "${enableval}" in - yes) PYTHON_INTERPRETER=python2; - PYTHON=python2 ; - PYTHON_VERSION=2 ;; - esac], - [] -) AC_ARG_WITH([python-interpreter], AS_HELP_STRING([--with-python-interpreter=PATH], [Custom location of python interpreter if not in normal PATH])) @@ -357,8 +348,6 @@ if test "$want_python"x == "no"x; then else if test "$PYTHON_VERSION" == 3; then AC_PYTHON3_MODULE(setuptools) - else - AC_PYTHON_MODULE(setuptools) fi if test "$HAVE_PYMOD_SETUPTOOLS" == "no"; then @@ -1731,13 +1720,6 @@ if test "$havelibnm" != "yes" -a "$linux" = "yes"; then echo "disable NetworkManager or manually tell it to ignore specific interaces." fi -if test "$PYTHON_VERSION" != 3; then - echo - echo "*** WARNING ***" - echo "Building for python2; you may need to provide your own python packages of some " - echo "modules like numpy, which now require python3." -fi - if test "$want_asan" = "yes" -a "$want_tsan" = "yes"; then echo echo "*** WARNING ***"