Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions abs.yaml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 9 additions & 1 deletion recipe/build_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
31 changes: 21 additions & 10 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" %}
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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:
Expand All @@ -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.
Expand All @@ -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:
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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') }}
Expand Down
3 changes: 2 additions & 1 deletion recipe/run_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down