diff --git a/abs.yaml b/abs.yaml new file mode 100644 index 000000000..420fde0b0 --- /dev/null +++ b/abs.yaml @@ -0,0 +1,13 @@ +# the conda-build parameters to use for disabling --skip-existing +build_parameters: + - "--suppress-variables" + #- "--skip-existing" + - "--error-overlinking" + - "--error-overdepending" + +aggregate_check: false + +channels: + - norl + +upload_without_merge: true diff --git a/recipe/build_base.sh b/recipe/build_base.sh index c0a2333cb..ab82a4890 100644 --- a/recipe/build_base.sh +++ b/recipe/build_base.sh @@ -254,6 +254,14 @@ _common_configure_args+=(--with-tcltk-includes="-I${PREFIX}/include") _common_configure_args+=("--with-tcltk-libs=-L${PREFIX}/lib -ltcl8.6 -ltk8.6") _common_configure_args+=(--with-platlibdir=lib) +if [[ "${READLINE_MODE}" = readline ]]; then + _common_configure_args+=(--with-readline=readline) +elif [[ "${READLINE_MODE}" = editline ]]; then + _common_configure_args+=(--with-readline=editline) +elif [[ "${READLINE_MODE}" = none ]]; then + _common_configure_args+=(--without-readline) +fi + # Add more optimization flags for the static Python interpreter: declare -a PROFILE_TASK=() if [[ ${_OPTIMIZED} == yes ]]; then @@ -457,7 +465,7 @@ pushd "${PREFIX}"/lib/python${VER} # Remove osx sysroot as it depends on the build machine sed -i.bak "s@-isysroot @@g" sysconfigfile # make sure $CONDA_BUILD_SYSROOT is not empty ... - if [[ ${HOST} =~ .*darwin.* ]] && [[ -n ${CONDA_BUILD_SYSROOT} ]]; then + if [[ ${HOST} =~ .*darwin.* ]] && [[ -n ${CONDA_BUILD_SYSROOT} ]]; then sed -i.bak "s@$CONDA_BUILD_SYSROOT @@g" sysconfigfile fi # Remove unfilled config option diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index 769054307..c590ce542 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -3,9 +3,13 @@ python: python_impl: - cpython libffi: # [win] - - 3.4 # [win] + - 3.4 # [win] numpy: - 1.21 +readline_mode: + - readline + - editline + - none MACOSX_SDK_VERSION: # [osx and x86_64] - 10.14 # [osx and x86_64] CONDA_BUILD_SYSROOT: # [osx and x86_64] diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 26107ec5c..f77158809 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -4,7 +4,7 @@ {% set ver2 = '.'.join(version.split('.')[0:2]) %} {% set ver2nd = ''.join(version.split('.')[0:2]) %} {% set ver3nd = ''.join(version.split('.')[0:3]) %} -{% set build_number = "0" %} +{% set build_number = 1 %} {% set channel_targets = ('abc', 'def') %} # this is just for the initial build, to break dependencies with python -> pip -> libpython-static {% set bootstrap = "false" %} @@ -39,6 +39,10 @@ {% set py_interp_debug = "no" %} {% endif %} +{% set rl_string = "" %} # [win or readline_mode == 'readline'] +{% set rl_string = "el_" %} # [not win and readline_mode == 'editline'] +{% set rl_string = "norl_" %} # [not win and readline_mode == 'none'] + package: name: python-split version: {{ version }}{{ dev }} @@ -90,7 +94,8 @@ source: {% endif %} build: - number: {{ build_number }} + number: {{ build_number + 100 }} # [win or readline_mode == 'readline'] + number: {{ build_number }} # [not(win or readline_mode == 'readline')] requirements: build: @@ -107,7 +112,9 @@ outputs: script: build_base.sh # [unix] script: build_base.bat # [win] build: - number: {{ build_number }} + number: {{ build_number + 200 }} # [win or readline_mode == 'readline'] + number: {{ build_number + 100 }} # [not win and readline_mode == 'editline'] + number: {{ build_number }} # [not win and readline_mode == 'none'] activate_in_script: true # Windows has issues updating python if conda is using files itself. # Copy rather than link. @@ -128,13 +135,13 @@ outputs: # - lib/python{{ ver2 }}/lib-dynload/_hashlib.cpython-{{ ver2nd }}-x86_64-linux-gnu.so # [linux] # - lib/libpython3.dylib # [osx] # match python.org compiler standard - skip: true # [win and int(float(vc)) < 14] + skip: true # [win and (int(float(vc)) < 14 or readline_mode != 'none')] {% if 'conda-forge' in channel_targets %} skip_compile_pyc: - '*.py' # [build_platform != target_platform] {% endif %} - string: {{ dev_ }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython # ["conda-forge" in (channel_targets or "")] - string: h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }} # ["conda-forge" not in (channel_targets or "")] + string: {{ dev_ }}h{{ PKG_HASH }}_{{ rl_string }}{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython # ["conda-forge" in (channel_targets or "")] + string: h{{ PKG_HASH }}_{{ rl_string }}{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }} # ["conda-forge" not in (channel_targets or "")] {% if 'conda-forge' in channel_targets %} run_exports: noarch: @@ -145,6 +152,7 @@ outputs: script_env: - PY_INTERP_LINKAGE_NATURE={{ linkage_nature_env }} - PY_INTERP_DEBUG={{ py_interp_debug }} + - READLINE_MODE={{ readline_mode }} # Putting these here means they get emitted to build_env_setup.{sh,bat} meaning we can launch IDEs # after sourcing or calling that script without examine the contents of conda_build.{sh,bat} for # important env. vars. @@ -192,7 +200,8 @@ outputs: - xz - zlib - openssl - - readline # [not win] + - readline {{ readline }} # [readline_mode == 'readline'] + - libedit # [readline_mode == 'editline'] - tk - ncurses # [unix] - libffi 3.4 @@ -291,15 +300,17 @@ outputs: script: build_static.sh # [unix] script: build_static.bat # [win] build: - number: {{ build_number }} + number: {{ build_number + 100 }} # [win or readline_mode == 'readline'] + number: {{ build_number }} # [not(win or readline_mode == 'readline')] activate_in_script: true {% if 'conda-forge' in channel_targets %} ignore_run_exports: - python_abi - string: h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython + string: h{{ PKG_HASH }}_{{ rl_string }}{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython {% else %} - string: h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }} + string: h{{ PKG_HASH }}_{{ rl_string }}{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }} {% endif %} + skip: true # [win and readline_mode != 'none'] requirements: build: - {{ compiler('c') }} diff --git a/recipe/run_test.py b/recipe/run_test.py index b3140a17f..4925ca730 100644 --- a/recipe/run_test.py +++ b/recipe/run_test.py @@ -82,11 +82,12 @@ import fcntl import grp import nis - import readline import resource import syslog import termios +if os.environ["READLINE_MODE"] != 'none': + import readline if not (armv6l or armv7l or ppc64le or osx105 or arm64): import tkinter