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
1010# this makes the linter happy
3737 {% set py_interp_debug = "no" %}
3838{% endif %}
3939
40+ {% set rl_string = "" %} # [win or readline_mode == 'readline']
41+ {% set rl_string = "el_" %} # [not win and readline_mode == 'editline']
42+ {% set rl_string = "norl_" %} # [not win and readline_mode == 'none']
43+
4044package :
4145 name : python-split
4246 version : {{ version }}{{ dev }}
@@ -87,9 +91,11 @@ source:
8791 {% if (openssl | string).startswith('3.0') %}
8892 - patches/0026-Use-OpenSSL-3-instead-of-1_1.patch
8993 {% endif %}
94+ - patches/0027-Fix-build-with-newer-editline.patch
9095
9196build :
92- number : {{ build_number }}
97+ number : {{ build_number + 100 }} # [win or readline_mode == 'readline']
98+ number : {{ build_number }} # [not(win or readline_mode == 'readline')]
9399
94100requirements :
95101 build :
@@ -106,7 +112,9 @@ outputs:
106112 script : build_base.sh # [unix]
107113 script : build_base.bat # [win]
108114 build :
109- number : {{ build_number }}
115+ number : {{ build_number + 200 }} # [win or readline_mode == 'readline']
116+ number : {{ build_number + 100 }} # [not win and readline_mode == 'editline']
117+ number : {{ build_number }} # [not win and readline_mode == 'none']
110118 activate_in_script : true
111119 # Windows has issues updating python if conda is using files itself.
112120 # Copy rather than link.
@@ -127,13 +135,13 @@ outputs:
127135 # - lib/python{{ ver2 }}/lib-dynload/_hashlib.cpython-{{ ver2nd }}-x86_64-linux-gnu.so # [linux]
128136 # - lib/libpython3.dylib # [osx]
129137 # match python.org compiler standard
130- skip : true # [win and int(float(vc)) < 14]
138+ skip : true # [win and ( int(float(vc)) < 14 or readline_mode != 'none') ]
131139{% if 'conda-forge' in channel_targets %}
132140 skip_compile_pyc :
133141 - ' *.py' # [build_platform != target_platform]
134142{% endif %}
135- string : {{ dev_ }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython # ["conda-forge" in (channel_targets or "")]
136- string : h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }} # ["conda-forge" not in (channel_targets or "")]
143+ string : {{ dev_ }}h{{ PKG_HASH }}_{{ rl_string }}{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython # ["conda-forge" in (channel_targets or "")]
144+ string : h{{ PKG_HASH }}_{{ rl_string }}{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }} # ["conda-forge" not in (channel_targets or "")]
137145{% if 'conda-forge' in channel_targets %}
138146 run_exports :
139147 noarch :
@@ -144,6 +152,7 @@ outputs:
144152 script_env :
145153 - PY_INTERP_LINKAGE_NATURE={{ linkage_nature_env }}
146154 - PY_INTERP_DEBUG={{ py_interp_debug }}
155+ - READLINE_MODE={{ readline_mode }}
147156 # Putting these here means they get emitted to build_env_setup.{sh,bat} meaning we can launch IDEs
148157 # after sourcing or calling that script without examine the contents of conda_build.{sh,bat} for
149158 # important env. vars.
@@ -193,7 +202,8 @@ outputs:
193202 - xz
194203 - zlib
195204 - openssl
196- - readline # [not win]
205+ - readline {{ readline }} # [readline_mode == 'readline']
206+ - libedit # [readline_mode == 'editline']
197207 - tk
198208 - ncurses # [unix]
199209 - libffi 3.4
@@ -290,15 +300,17 @@ outputs:
290300 script : build_static.sh # [unix]
291301 script : build_static.bat # [win]
292302 build :
293- number : {{ build_number }}
303+ number : {{ build_number + 100 }} # [win or readline_mode == 'readline']
304+ number : {{ build_number }} # [not(win or readline_mode == 'readline')]
294305 activate_in_script : true
295306{% if 'conda-forge' in channel_targets %}
296307 ignore_run_exports :
297308 - python_abi
298- string : h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython
309+ string : h{{ PKG_HASH }}_{{ rl_string }}{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython
299310{% else %}
300- string : h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}
311+ string : h{{ PKG_HASH }}_{{ rl_string }}{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}
301312{% endif %}
313+ skip : true # [win and readline_mode != 'none']
302314 requirements :
303315 build :
304316 - {{ compiler('c') }}
0 commit comments