44{% set ver2 = '.'.join(version.split('.')[0:2]) %}
55{% set ver2nd = ''.join(version.split('.')[0:2]) %}
66{% set ver3nd = ''.join(version.split('.')[0:3]) %}
7- {% set build_number = "0" %}
7+ {% set build_number = 1 %}
88{% set channel_targets = ('abc', 'def') %}
99# this is just for the initial build, to break dependencies with python -> pip -> libpython-static
1010{% set bootstrap = "false" %}
3939 {% set py_interp_debug = "no" %}
4040{% endif %}
4141
42+ {% set rl_string = "" %} # [win or readline_mode == 'readline']
43+ {% set rl_string = "el_" %} # [not win and readline_mode == 'editline']
44+ {% set rl_string = "norl_" %} # [not win and readline_mode == 'none']
45+
4246package :
4347 name : python-split
4448 version : {{ version }}{{ dev }}
@@ -88,9 +92,11 @@ source:
8892 {% if (openssl | string).startswith('1.1.1') %}
8993 - patches/0026-Use-OpenSSL-1_1-instead-of-3.patch
9094 {% endif %}
95+ - patches/0027-Fix-build-with-newer-editline.patch
9196
9297build :
93- number : {{ build_number }}
98+ number : {{ build_number + 100 }} # [win or readline_mode == 'readline']
99+ number : {{ build_number }} # [not(win or readline_mode == 'readline')]
94100
95101requirements :
96102 build :
@@ -107,7 +113,9 @@ outputs:
107113 script : build_base.sh # [unix]
108114 script : build_base.bat # [win]
109115 build :
110- number : {{ build_number }}
116+ number : {{ build_number + 200 }} # [win or readline_mode == 'readline']
117+ number : {{ build_number + 100 }} # [not win and readline_mode == 'editline']
118+ number : {{ build_number }} # [not win and readline_mode == 'none']
111119 activate_in_script : true
112120 # Windows has issues updating python if conda is using files itself.
113121 # Copy rather than link.
@@ -128,13 +136,13 @@ outputs:
128136 # - lib/python{{ ver2 }}/lib-dynload/_hashlib.cpython-{{ ver2nd }}-x86_64-linux-gnu.so # [linux]
129137 # - lib/libpython3.dylib # [osx]
130138 # match python.org compiler standard
131- skip : true # [win and int(float(vc)) < 14]
139+ skip : true # [win and ( int(float(vc)) < 14 or readline_mode != 'none') ]
132140{% if 'conda-forge' in channel_targets %}
133141 skip_compile_pyc :
134142 - ' *.py' # [build_platform != target_platform]
135143{% endif %}
136- string : {{ dev_ }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython # ["conda-forge" in (channel_targets or "")]
137- string : h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }} # ["conda-forge" not in (channel_targets or "")]
144+ string : {{ dev_ }}h{{ PKG_HASH }}_{{ rl_string }}{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython # ["conda-forge" in (channel_targets or "")]
145+ string : h{{ PKG_HASH }}_{{ rl_string }}{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }} # ["conda-forge" not in (channel_targets or "")]
138146{% if 'conda-forge' in channel_targets %}
139147 run_exports :
140148 noarch :
@@ -145,6 +153,7 @@ outputs:
145153 script_env :
146154 - PY_INTERP_LINKAGE_NATURE={{ linkage_nature_env }}
147155 - PY_INTERP_DEBUG={{ py_interp_debug }}
156+ - READLINE_MODE={{ readline_mode }}
148157 # Putting these here means they get emitted to build_env_setup.{sh,bat} meaning we can launch IDEs
149158 # after sourcing or calling that script without examine the contents of conda_build.{sh,bat} for
150159 # important env. vars.
@@ -192,7 +201,8 @@ outputs:
192201 - xz
193202 - zlib
194203 - openssl
195- - readline # [not win]
204+ - readline {{ readline }} # [readline_mode == 'readline']
205+ - libedit # [readline_mode == 'editline']
196206 - tk
197207 - ncurses # [unix]
198208 - libffi 3.4
@@ -291,15 +301,17 @@ outputs:
291301 script : build_static.sh # [unix]
292302 script : build_static.bat # [win]
293303 build :
294- number : {{ build_number }}
304+ number : {{ build_number + 100 }} # [win or readline_mode == 'readline']
305+ number : {{ build_number }} # [not(win or readline_mode == 'readline')]
295306 activate_in_script : true
296307{% if 'conda-forge' in channel_targets %}
297308 ignore_run_exports :
298309 - python_abi
299- string : h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython
310+ string : h{{ PKG_HASH }}_{{ rl_string }}{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython
300311{% else %}
301- string : h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}
302- {% endif %}
312+ string : h{{ PKG_HASH }}_{{ rl_string }}{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}
313+ {% endif %}mv
314+ skip : true # [win and readline_mode != 'none']
303315 requirements :
304316 build :
305317 - {{ compiler('c') }}
0 commit comments