123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410 |
- {% set version = "3.9.17" %}
- {% set dev = "" %}
- {% set dev_ = "" %}
- {% 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 channel_targets = ('abc', 'def') %}
- # Sanitize build system env. var tweak parameters
- # (passed to the build scripts via script_env).
- {% set from_source_control = os.environ.get('CONDA_BUILD_FROM_SOURCE_CONTROL', '') %}
- {% if from_source_control == '' or from_source_control == 'no' %}
- {% set from_source_control = 'no' %}
- {% else %}
- {% set from_source_control = 'yes' %}
- {% endif %}
- {% set linkage_nature = os.environ.get('PY_INTERP_LINKAGE_NATURE', '') %}
- {% if linkage_nature != '' %}
- {% set linkage_nature = "_" ~ linkage_nature %}
- {% endif %}
- {% if linkage_nature == 'shared' %}
- {% set linkage_nature_env = 'shared' %}
- {% else %}
- {% set linkage_nature_env = 'static' %}
- {% endif %}
- {% set dbg_abi = '' %}
- {% set debug = os.environ.get('PY_INTERP_DEBUG', '') %}
- {% if debug != '' and debug != 'no' %}
- {% set py_interp_debug = "yes" %}
- {% set debug = "_dbg" %}
- {% set dbg_abi = "d" %} # [win]
- {% else %}
- {% set py_interp_debug = "no" %}
- {% endif %}
- package:
- name: python-split
- version: {{ version }}{{ dev }}
- source:
- {% if from_source_control == 'yes' %}
- - git_url: https://github.com/python/CPython.git
- git_tag: v{{ version }}{{ dev }}
- {% else %}
- - url: https://www.python.org/ftp/python/{{ version }}/Python-{{ version }}{{ dev }}.tar.xz
- sha256: 30ce057c44f283f8ed93606ccbdb8d51dd526bdc4c62cce5e0dc217bfa3e8cee
- {% endif %}
- patches:
- ## - patches/0000-Fix-off-by-one-error-in-_winapi_WaitForMultipleObjec.patch
- - patches/0001-Darwin-Add-arch-x86_64-to-UnicCCompiler-ld_args.patch
- - patches/0002-Win32-Change-FD_SETSIZE-from-512-to-2048.patch
- - patches/0003-Win32-distutils-Add-support-to-cygwinccompiler-for-V.patch
- - patches/0004-Do-not-pass-g-to-GCC-when-not-Py_DEBUG.patch
- - patches/0005-Support-cross-compiling-byte-code.patch
- - patches/0006-Win32-Fixes-for-Windows-GCC-interop-needed-by-RPy2-a.patch
- - patches/0007-Darwin-Look-in-sysroot-usr-lib-include-if-sysroot-is.patch
- - patches/0008-runtime_library_dir_option-Use-1st-word-of-CC-as-com.patch
- - patches/0009-Win32-Do-not-download-externals.patch
- - patches/0010-Add-support-for-_CONDA_PYTHON_SYSCONFIGDATA_NAME-if-.patch
- - patches/0011-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch
- - patches/0012-Disable-new-dtags-in-unixccompiler.py.patch
- - patches/0013-Fix-cross-compilation-on-Debian-based-distros.patch
- - patches/0013-Add-CondaEcosystemModifyDllSearchPath.patch # [win]
- - patches/0014-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch
- - patches/0015-Unvendor-openssl.patch
- - patches/0016-Unvendor-sqlite3.patch
- - patches/0017-venv-Revert-a-change-from-https-github.com-python-cp.patch
- - patches/0018-Win-Add-back-the-DLLSuffix-used-to-find-the-openssl-.patch
- - patches/0019-Use-ranlib-from-env-if-env-variable-is-set.patch
- - patches/0020-Add-CondaEcosystemModifyDllSearchPath.patch # [not win]
- - patches/0021-Add-d1trimfile-SRC_DIR-to-make-pdbs-more-relocatable.patch
- - patches/0022-Doing-d1trimfile.patch
- # May be causing PGO to fail?
- - patches/0023-egg-debugging-with-Windows-debug-builds.patch
- # - patches/0024-Add-CONDA_DLL_SEARCH_MODIFICATION_KEEP_GIL-to-aid-de.patch
- - patches/0025-cross-compile-darwin.patch
- - patches/0032-Fix-TZPATH-on-windows.patch
- - patches/0033-gh24324.patch
- - patches/0034-have-pyunicode-decodeunicodeescape.patch
- # MailCap CVE (CVE-2015-20107) was fixed in 3.9.16
- # - patches/0035-py39-mailcap-CVE-2015-20107.patch
- {% if (openssl | string).startswith('3.0') %}
- - patches/0036-openssl3.patch
- {% endif %}
- {% if 'conda-forge' not in channel_targets %}
- - patches/9999-Add-Anaconda-Distribution-version-logic.patch # [not win]
- {% endif %}
- # TODO :: Depend on our own packages for these:
- - url: https://github.com/python/cpython-source-deps/archive/xz-5.2.5.zip # [win]
- folder: externals/xz-5.2.5 # [win]
- sha256: 6a4389cc05143beb2679b1299cecee71b02baa55e70f68a88b44dc01ad495424 # [win]
- # Not used as of 3.7b3 (tcltk from cpython-bin- is), but kept for archival and license reasons.
- - url: https://github.com/python/cpython-source-deps/archive/tcl-core-8.6.12.0.zip # [win]
- folder: externals/tcl-core-8.6.12.0 # [win]
- sha256: 0682e059dd2ec77b16384a98a65b93e5e719958863506b37235a3a26e9f47773 # [win]
- # Not used as of 3.7b3 (tcltk from cpython-bin- is), but kept for archival and license reasons.
- - url: https://github.com/python/cpython-source-deps/archive/tk-8.6.12.0.zip # [win]
- folder: externals/tk-8.6.12.0 # [win]
- sha256: 7d61434b941b395526b09f65273212df86681afc835b36494ca7c5bd9d8d3d50 # [win]
- - url: https://github.com/python/cpython-bin-deps/archive/tcltk-8.6.12.0.zip # [win]
- folder: externals/tcltk-8.6.12.0 # [win]
- sha256: 3a55e9e9fcb754b5a484a22d54841153f7624dd30f7b0c81b1cb05f38e2b5216 # [win]
- - url: https://github.com/python/cpython-source-deps/archive/tix-8.4.3.6.zip # [win]
- folder: externals/tix-8.4.3.6 # [win]
- sha256: e558e3dc5e67ac0942f8fceafce00ca46b177da9ebeaf38ec7fafd9b9913ac56 # [win]
- - url: https://github.com/python/cpython-source-deps/archive/bzip2-1.0.8.zip # [win]
- folder: externals/bzip2-1.0.8 # [win]
- sha256: 12c17d15f99e27235529574a722fb484a4e8fdf2427cef53b1b68bdf07e404a9 # [win]
- - url: https://github.com/python/cpython-source-deps/archive/zlib-1.2.12.zip # [win]
- folder: externals/zlib-1.2.12 # [win]
- sha256: 92197502951ac8414ece9f2d9fa2cc010c51d610e6b2ed9833ba4a35d65f222b # [win]
- - url: https://github.com/python/cpython-bin-deps/archive/nasm-2.11.06.zip # [win]
- folder: externals/nasm-2.11.06 # [win]
- sha256: de3c87b26a80e789986d8e6950c6304175d3829afe9c6c7211eb7257266ab0ac # [win]
- - url: https://github.com/python/cpython-bin-deps/archive/libffi-3.3.0.zip # [win]
- folder: externals/libffi-3.3.0 # [win]
- sha256: 69e3f7235108a75033cb9325a0a3535ba271d144ec66fccefe134eda27d7bcfe # [win]
- build:
- number: {{ build_number }}
- requirements:
- build:
- {% if from_source_control == 'yes' %}
- - git
- {% else %}
- - patch # [not win]
- - m2-patch # [win]
- - m2-gcc-libs # [win]
- {% endif %}
- host:
- outputs:
- - name: python
- script: build_base.sh # [unix]
- script: build_base.bat # [win]
- build:
- number: {{ build_number }}
- activate_in_script: true
- # Windows has issues updating python if conda is using files itself.
- # Copy rather than link.
- no_link:
- - DLLs/_ctypes.pyd # [win]
- ignore_run_exports: # [unix]
- # We delete the shared bzip2 library
- - bzip2 # [unix]
- # C++ only installed so CXX is defined for distutils/sysconfig.
- # It would be nice to split ignore_run_exports into two:
- # ignore_run_exports/from and ignore_run_exports/of, that way
- # we could just use ignore_run_exports/from: {{ compiler('cxx') }}
- # here instead of this nonsense:
- - clangxx_osx-64 # [osx]
- - clangxx_osx-aarch64 # [osxaarch64]
- - gxx_linux-64 # [linux64]
- - gxx_linux-aarch64 # [linux and aarch64]
- - gxx_linux-ppc64le # [linuxppc64le]
- - gxx_linux-s390x # [linuxs390x]
- - libstdcxx-ng # [linux and aarch64]
- # Disabled until verified to work correctly
- detect_binary_files_with_prefix: true
- # detect_binary_files_with_prefix: False
- # binary_has_prefix_files:
- # - lib/libpython{{ ver2 }}.*.1.0
- # - bin/python{{ ver2 }} # [linux]
- # - lib/libpython{{ ver2 }}.a # [linux]
- # - lib/libpython{{ ver2 }}.nolto.a # [linux]
- # - lib/libpython3.so # [linux]
- # - 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_compile_pyc:
- # - '*.py' # [osx and arm64]
- {% if 'conda-forge' in channel_targets %}
- string: {{ dev_ }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython
- {% else %}
- string: h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}
- {% endif %}
- {% if 'conda-forge' in channel_targets %}
- run_exports:
- noarch:
- - python
- weak:
- - python_abi {{ ver2 }}.* *_cp{{ ver2nd }}
- {% endif %}
- script_env:
- - PY_INTERP_LINKAGE_NATURE={{ linkage_nature_env }}
- - PY_INTERP_DEBUG={{ py_interp_debug }}
- # 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.
- - OPENSSL_DIR=%PREFIX%\Library # [win]
- - SQLITE3_DIR=%PREFIX%\Library # [win]
- {% if 'conda-forge' in channel_targets %}
- - CONDA_FORGE=yes
- {% else %}
- - CONDA_FORGE=no
- {% endif %}
- missing_dso_whitelist:
- - '**/MSVCR71.dll' # [win]
- - '**/MSVCR80.dll' # [win]
- # I have no idea why this is not in C:\Windows\System32\downlevel
- - '**/api-ms-win-core-path-l1-1-0.dll' # [win]
- # -=- libs that come from the sysroot.
- - '$RPATH/libc.so.6' # [linux64 or ppc64le]
- - '$RPATH/libcrypt.so.1' # [linux64 or ppc64le]
- - '$RPATH/libdl.so.2' # [linux64 or ppc64le]
- - '$RPATH/libm.so.6' # [linux64 or ppc64le]
- - '$RPATH/libnsl.so.1' # [linux64 or ppc64le]
- - '$RPATH/libpthread.so.0' # [linux64 or ppc64le]
- - '$RPATH/librt.so.1' # [linux64 or ppc64le]
- - '$RPATH/libutil.so.1' # [linux64 or ppc64le]
- requirements:
- build:
- - {{ compiler('c') }}
- - {{ compiler('cxx') }}
- - {{ ccache('native') }} # [unix]
- - ripgrep
- - sed # [unix]
- - {{ cdt('xorg-x11-proto-devel') }} # [linux]
- - {{ cdt('libx11-devel') }} # [linux]
- - {{ cdt('libuuid-devel') }} # [linux and not (ppc64le or aarch64)]
- - make # [not win]
- - libtool # [unix]
- - pkg-config # [not win]
- # configure script looks for llvm-ar for lto
- - llvm-tools # [osx]
- - ld_impl_{{ target_platform }} # [linux]
- {% if 'conda-forge' in channel_targets %}
- - binutils_impl_{{ target_platform }} # [linux]
- {% endif %}
- host:
- - bzip2 # [not win]
- - sqlite
- - xz # [not win]
- - unzip # [not win]
- - zlib # [not win]
- - openssl
- - readline # [not win]
- - tk # [not win]
- - ncurses # [unix]
- - libffi 3.4 # [not win]
- - ld_impl_{{ target_platform }} # [linux]
- run:
- - libffi >=3.4,<3.5 # [not win]
- - ld_impl_{{ target_platform }} # [linux]
- - tzdata
- {% if 'conda-forge' in channel_targets %}
- - ncurses # [unix]
- run_constrained:
- - python_abi {{ ver2 }}.* *_cp{{ ver2nd }}
- {% endif %}
- test:
- downstreams:
- - cython
- - setuptools
- requires:
- - ripgrep
- - cmake-no-system # [not (linux and ppc64le)] changed from cmake to support OpenSSL 3 bootstrap build
- - make # [unix]
- - ninja-base # changed from ninja to support OpenSSL 3 bootstrap build
- - {{ compiler('c') }}
- # Tried to use enable_language(C) to avoid needing this. It does not work.
- - {{ compiler('cxx') }}
- files:
- - tests/distutils/*
- - tests/cmake/*
- - tests/cython/*
- - tests/embedding-interpreter/*
- - tests/processpoolexecutor-max_workers-61/*
- - run_test.py
- commands:
- - echo on # [win]
- - set # [win]
- - python -V
- - python3 -V # [not win]
- - 2to3 -h
- - pydoc -h
- - python3-config --help # [not win]
- - python run_test.py
- - set "PIP_NO_BUILD_ISOLATION=False" # [win]
- - set "PIP_NO_DEPENDENCIES=True" # [win]
- - set "PIP_IGNORE_INSTALLED=True" # [win]
- - set "PIP_NO_INDEX=True" # [win]
- - set "PIP_CACHE_DIR=%CONDA_PREFIX%/pip_cache" # [win]
- - set "TEMP=%CONDA_PREFIX%/tmp" # [win]
- - mkdir "%TEMP%" # [win]
- - python -Im ensurepip --upgrade --default-pip # [win]
- # tzdata/zoneinfo test that will need the tzdata package to pass
- - python -c "from zoneinfo import ZoneInfo; from datetime import datetime; dt = datetime(2020, 10, 31, 12, tzinfo=ZoneInfo('America/Los_Angeles')); print(dt.tzname())"
- - python -m venv test-venv
- - python -c "import sysconfig; print(sysconfig.get_config_var('CC'))" # [not win]
- # disabled due this test has issues with updated operating system version
- # - _CONDA_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_x86_64_conda_cos6_linux_gnu python -c "import sysconfig; print(sysconfig.get_config_var('CC'))" # [linux64]
- # check for unreplaced @ symbols in sysconfig files
- - for f in ${CONDA_PREFIX}/lib/python*/_sysconfig*.py; do echo "Checking $f:"; if [[ `rg @ $f` ]]; then echo "FAILED ON $f"; cat $f; exit 1; fi; done # [linux64 or osx]
- - test ! -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.a # [unix]
- - test ! -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.nolto.a # [unix]
- # https://github.com/conda-forge/python-feedstock/issues/384
- - if exist %PREFIX%\\Scripts\\pydoc exit 1 # [win]
- - if exist %PREFIX%\\Scripts\\idle exit 1 # [win]
- - if exist %PREFIX%\\Scripts\\2to3 exit 1 # [win]
- - if not exist %PREFIX%\\Scripts\\pydoc-script.py exit 1 # [win]
- - if not exist %PREFIX%\\Scripts\\idle-script.py exit 1 # [win]
- - if not exist %PREFIX%\\Scripts\\2to3-script.py exit 1 # [win]
- - if not exist %PREFIX%\\Scripts\\idle.exe exit 1 # [win]
- - if not exist %PREFIX%\\Scripts\\2to3.exe exit 1 # [win]
- - if not exist %PREFIX%\\Scripts\\pydoc.exe exit 1 # [win]
- - pushd tests
- - pushd distutils
- - python setup.py install -v -v
- - python -c "import foobar"
- - popd
- - pushd embedding-interpreter # [unix]
- - bash build-and-test.sh # [unix and not (linux and aarch64)]
- - popd # [unix]
- - pushd cmake # [not (linux and ppc64le)]
- - run_cmake_test.bat {{ version }} # [win]
- - bash run_cmake_test.sh {{ version }} # [not win and not (linux and ppc64le)]
- - popd # [not (linux and ppc64le)]
- - pushd processpoolexecutor-max_workers-61
- - python ppe.py
- - popd
- - popd
- - test ! -f default.profraw # [osx]
- - python -c "import ssl; assert ' {{ openssl }}' in ssl.OPENSSL_VERSION"
- - name: python-regr-testsuite
- requirements:
- host:
- - {{ pin_subpackage('python', exact=True) }}
- script: install_regr_testsuite.sh # [unix]
- - name: libpython-static
- noarch: python # [unix]
- script: build_static.sh # [unix]
- script: build_static.bat # [win]
- skip: true # [win]
- build:
- number: {{ build_number }}
- activate_in_script: true
- ignore_run_exports:
- - python_abi
- {% if 'conda-forge' in channel_targets %}
- string: h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}_cpython
- {% else %}
- string: h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ linkage_nature }}{{ debug }}
- {% endif %}
- requirements:
- build:
- - {{ compiler('c') }}
- - {{ compiler('cxx') }}
- {% if from_source_control == 'yes' %}
- - git
- {% endif %}
- - {{ ccache('native') }} # [unix]
- host:
- - {{ pin_subpackage('python', exact=True) }}
- run:
- - {{ pin_subpackage('python', exact=True) }}
- test:
- files:
- - tests/embedding-interpreter/*
- requires:
- - ripgrep
- - cmake # [not (linux and ppc64le)]
- - make # [unix]
- - {{ compiler('c') }}
- # Tried to use enable_language(C) to avoid needing this. It does not work.
- - {{ compiler('cxx') }}
- commands:
- - test -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.a # [unix]
- - test -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.nolto.a # [unix]
- - test -f ${PREFIX}/lib/python${PKG_VERSION%.*}/config-${PKG_VERSION%.*}-darwin/libpython${PKG_VERSION%.*}.a # [osx]
- - pushd tests # [unix]
- - pushd embedding-interpreter # [unix]
- - bash build-and-test.sh # [unix]
- - popd # [unix]
- - popd # [unix]
- about:
- home: https://www.python.org/
- license: PSF-2.0
- license_family: PSF
- license_file: LICENSE
- license_url: https://docs.python.org/3.9/license.html
- summary: General purpose programming language
- description: |
- Python is a widely used high-level, general-purpose, interpreted, dynamic
- programming language. Its design philosophy emphasizes code
- readability, and its syntax allows programmers to express concepts in
- fewer lines of code than would be possible in languages such as C++ or
- Java. The language provides constructs intended to enable clear programs
- on both a small and large scale.
- doc_url: https://www.python.org/doc/versions/
- dev_url: https://devguide.python.org/
- extra:
- feedstock-name: python
- recipe-maintainers:
- - isuruf
- - jakirkham
- - mbargull
- - mingwandroid
- - msarahan
- - pelson
- - ocefpaf
- - scopatz
|