-
-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathmeta.yaml
More file actions
399 lines (373 loc) · 14.7 KB
/
Copy pathmeta.yaml
File metadata and controls
399 lines (373 loc) · 14.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
{% set version = "3.13.1" %}
{% 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 = 3 %}
# this makes the linter happy
{% set channel_targets = channel_targets or 'conda-forge main' %}
# Sanitize build system env. var tweak parameters
# (passed to the build scripts via script_env).
{% if freethreading is not defined %}
{% set freethreading = "yes" %}
{% endif %}
{% set abi_tag = "cp" + ver2nd %}
# freethreading, set using conda_build_config.yaml
{% if freethreading == "yes" %}
{% set abi_tag = abi_tag + "t" %}
{% else %}
{% set build_number = build_number + 100 %}
{% endif %}
{% if build_type == "debug" %}
{% set py_interp_debug = "yes" %}
{% set debug = "_debug" %}
{% else %}
{% set py_interp_debug = "no" %}
{% set debug = "" %}
{% endif %}
package:
name: python-split
version: {{ version }}{{ dev }}
source:
- url: https://www.python.org/ftp/python/{{ version }}/Python-{{ version }}{{ dev }}.tar.xz
# md5 from: https://www.python.org/downloads/release/python-{{ ver3nd }}{{ dev }}/
md5: 80c16badb94ffe235280d4d9a099b8bc
patches:
- patches/0001-Win32-Change-FD_SETSIZE-from-512-to-2048.patch
- patches/0002-Win32-Do-not-download-externals.patch
- patches/0003-Fix-find_library-so-that-it-looks-in-sys.prefix-lib-.patch
- patches/0004-Disable-registry-lookup-unless-CONDA_PY_ALLOW_REG_PA.patch
- patches/0005-Unvendor-openssl.patch
- patches/0006-Unvendor-sqlite3.patch
- patches/0007-Add-CondaEcosystemModifyDllSearchPath.patch
- patches/0008-Doing-d1trimfile.patch
# https://github.com/python/cpython/pull/23523
- patches/0009-cross-compile-darwin.patch
- patches/0010-Fix-TZPATH-on-windows.patch
# https://github.com/python/cpython/pull/24324
- patches/0011-Make-dyld-search-work-with-SYSTEM_VERSION_COMPAT-1.patch
- patches/0012-Unvendor-bzip2.patch
- patches/0013-Unvendor-libffi.patch
- patches/0014-Unvendor-tcltk.patch
- patches/0015-unvendor-xz.patch
- patches/0016-unvendor-zlib.patch
- patches/0017-Do-not-pass-g-to-GCC-when-not-Py_DEBUG.patch
- patches/0018-Unvendor-expat.patch
- patches/0019-Remove-unused-readelf.patch
- patches/0020-Don-t-checksharedmods-if-cross-compiling.patch
- patches/0021-Override-configure-LIBFFI.patch
- patches/0022-Unvendor-libmpdec.patch
{% if 'conda-forge' in channel_targets %}
- patches/0023-Brand-conda-forge.patch
{% endif %}
build:
number: {{ build_number }}
requirements:
build:
- patch # [not win]
- m2-patch # [win]
- m2-gcc-libs # [win]
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_from:
# C++ only installed so CXX is defined for distutils/sysconfig.
- {{ compiler('cxx') }} # [unix]
# These two are just to get the headers needed for tk.h, but is unused
- xorg-libx11
- xorg-xorgproto
# 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' # [build_platform != target_platform]
string: {{ dev_ }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ debug }}_{{ abi_tag }}
run_exports:
noarch:
- python
weak:
- python_abi {{ ver2 }}.* *_{{ abi_tag }}
{% if py_interp_debug == "yes" %}
- python {{ ver2 }}.* *_debug_{{ abi_tag }}
{% endif %}
track_features:
{% if freethreading == "yes" %}
- py_freethreading
{% endif %}
script_env:
- PY_INTERP_DEBUG={{ py_interp_debug }}
- PY_FREETHREADING={{ freethreading }}
# 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.
missing_dso_whitelist: # [win]
- '**/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]
requirements:
build:
- {{ compiler('c') }}
- {{ stdlib('c') }}
- {{ compiler('cxx') }}
- 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]
- binutils_impl_{{ target_platform }} # [linux]
- clang-18 # [not win]
- llvm-tools-18 # [not win]
- clang 18.* # [win]
- llvm-tools 18.* # [win]
- bzip2 # [build_platform != target_platform]
- sqlite # [build_platform != target_platform]
- liblzma-devel # [build_platform != target_platform]
- zlib # [build_platform != target_platform]
- openssl # [build_platform != target_platform]
- readline # [not win and build_platform != target_platform]
- tk # [build_platform != target_platform]
- ncurses # [unix and build_platform != target_platform]
- libffi # [build_platform != target_platform]
- libuuid # [linux and build_platform != target_platform]
- libxcrypt # [linux and build_platform != target_platform]
- expat # [build_platform != target_platform]
host:
- bzip2
- sqlite
- liblzma-devel
- zlib
- openssl
- readline # [not win]
- tk
# These two are just to get the headers needed for tk.h, but is unused
- xorg-libx11
- xorg-xorgproto
- ncurses # [unix]
- libffi
- ld_impl_{{ target_platform }} >=2.36.1 # [linux]
- libuuid # [linux]
- libmpdec-devel
- expat
run:
- ld_impl_{{ target_platform }} >=2.36.1 # [linux]
- tzdata
{% if dev != '' %}
- _python_rc
{% endif %}
- python_abi {{ ver2 }}.* *_{{ abi_tag }}
test:
downstreams:
{% if freethreading == "yes" %}
- cython >=3.1.0.a0
{% else %}
- cython
{% endif %}
- setuptools
requires:
- ripgrep
- cmake
- ninja
- {{ compiler('c') }}
# Tried to use enable_language(C) to avoid needing this. It does not work.
- {{ compiler('cxx') }}
files:
- tests/cmake/*
- tests/cython/*
- tests/prefix-replacement/*
- run_test.py
commands:
- echo on # [win]
- set # [win]
- python -V
- python3 -V # [not win]
- pydoc -h
- python3-config --help # [not win]
- 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
- test-venv\\Scripts\\python.exe -c "import ctypes" # [win]
- test-venv/bin/python -c "import ctypes" # [unix]
- python -c "import sysconfig; print(sysconfig.get_config_var('CC'))" # [not win]
- _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, excluding e.g. '"$@".lto'
- 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]
{% if freethreading == "yes" %}
- if not exist %PREFIX%\\libs\\python3t.lib exit 1 # [win]
- if not exist %PREFIX%\\libs\\python{{ ver2nd }}t.lib exit 1 # [win]
{% else %}
- if not exist %PREFIX%\\libs\\python3.lib exit 1 # [win]
- if not exist %PREFIX%\\libs\\python{{ ver2nd }}.lib exit 1 # [win]
{% endif %}
# 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 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\\idle.exe exit 1 # [win]
- if not exist %PREFIX%\\Scripts\\pydoc.exe exit 1 # [win]
- if not exist %PREFIX%\\include\\pyconfig.h exit 1 # [win]
- pushd tests
- pushd prefix-replacement # [unix]
- bash build-and-test.sh # [unix]
- popd # [unix]
- pushd cmake
{% if freethreading == "no" %}
# TODO: use the new FindPython3 which supports freethreading
- cmake -GNinja -DPY_VER={{ version }} --debug-find --trace --debug-output --debug-trycompile .
{% endif %}
- popd
- popd
- python run_test.py
- test ! -f default.profraw # [osx]
- python3.1 --version # [unix]
# Test for segfault on osx-64 with libffi=3.4, see https://bugs.python.org/issue44556
- python -c "from ctypes import CFUNCTYPE; CFUNCTYPE(None)(id)"
# Test for wide character supported via ncursesw
- TERM=xterm >/dev/null python -c "import curses; scr = curses.initscr(); curses.unget_wch('x'); assert 'x' == scr.get_wch()" # [unix]
# Test for https://docs.python.org/3/howto/perf_profiling.html#how-to-obtain-the-best-results
- python -m sysconfig | grep 'no-omit-frame-pointer' # [linux]
- name: libpython-static
script: build_static.sh # [unix]
script: build_static.bat # [win]
build:
number: {{ build_number }}
activate_in_script: true
ignore_run_exports:
- python_abi
script_env:
- PY_INTERP_DEBUG={{ py_interp_debug }}
- PY_FREETHREADING={{ freethreading }}
string: h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ debug }}_{{ abi_tag }}
requirements:
build:
- {{ compiler('c') }}
- {{ stdlib('c') }}
- {{ compiler('cxx') }}
host:
- {{ pin_subpackage('python', exact=True) }}
run:
- {{ pin_subpackage('python', exact=True) }}
test:
files:
- tests/prefix-replacement/*
requires:
- {{ compiler('c') }}
commands:
- VER=${PKG_VERSION%.*} # [not win]
- VERABI=${VER} # [not win]
{% if freethreading == "yes" %}
- VERABI=${VERABI}t # [not win]
{% endif %}
- VERABI_NO_DBG=${VERABI} # [not win]
{% if py_interp_debug == "yes" %}
- VERABI=${VERABI}d # [not win]
{% endif %}
- test -f ${PREFIX}/lib/libpython${VERABI}.a # [unix]
- test -f ${PREFIX}/lib/libpython${VERABI_NO_DBG}.nolto.a # [unix]
- test -f ${PREFIX}/lib/python${VERABI_NO_DBG}/config-${VERABI}-darwin/libpython${VERABI}.a # [osx]
- pushd tests/prefix-replacement # [unix]
- bash build-and-test.sh # [unix]
- popd # [unix]
- name: cpython
build:
noarch: generic
requirements:
- python {{ version }}.*
- python_abi * *_{{ abi_tag }}
- name: python-freethreading
build:
noarch: generic
{% if freethreading != "yes" %}
skip: True
{% endif %}
requirements:
- cpython {{ version }}.*
- python_abi * *_{{ abi_tag }}
- name: python-gil
build:
noarch: generic
{% if freethreading == "yes" %}
skip: True
{% endif %}
requirements:
- cpython {{ version }}.*
- python_abi * *_{{ abi_tag }}
- name: python-jit
script: install_jit_activation.sh # [not win]
script: install_jit_activation.bat # [win]
build:
noarch: generic
requirements:
- cpython {{ version }}.*
- __unix # [unix]
- __win # [win]
about:
home: https://www.python.org/
license: Python-2.0
license_file: LICENSE
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.
We provide some meta packages for convenience.
To get a CPython flavour, use:
conda install cpython
To get the freethreading build (i.e. without the Global Interpreter Lock - GIL):
conda install python-freethreading
To get the default build (i.e. with the GIL):
conda install python-gil
To enable the use of the experimental JIT compiler in CPython:
conda install python-jit
or set the environment variable PYTHON_JIT=1. Note that the JIT support
is available for x86_64 builds only.
doc_url: https://www.python.org/doc/versions/
doc_source_url: https://github.com/python/pythondotorg/blob/master/docs/source/index.rst
dev_url: https://docs.python.org/devguide/
extra:
feedstock-name: python
recipe-maintainers:
- chrisburr
- isuruf
- jakirkham
- mbargull
- msarahan
- pelson
- ocefpaf
- scopatz
- katietz
- xhochy