Skip to content

Commit

Permalink
(#22599) CPython: Condense patching, update patch versions, and add 3…
Browse files Browse the repository at this point in the history
….11/3.12

* wip

* cpython: migrate to Conan v2

* cpython: fix autotools install step

* cpython: fix libuuid requirement

* cpython: update test_package

* cpython: temporarily disable FindPythonX tests

* cpython: package_type should be "library"

* cpython: tidy

* cpython: ncurses is required transitively

* cpython: fix shared test

* cpython: use cpp_info.aggregated_components() for deps

* cpython: bsddb has been remove in Python 3

* cpython: fix openssl support

* Fix package layout

* Fix new generators in test package

* Misc fixes

* Remove redundant test

* Add FIXMEs

* Fix running test package multiple times in a row

* Handle conan 1/2 differences in test_package

* Fix MSBuild

* Misc Conan 2.0 fixes

* cpython: minor tweaks, bump deps

* cpython: use altinstall

Fixed modules standard library modules not being found in test_package.

* Comment out versions with broken patches for now

* Fix Autotools build

* Restore old versions, temp remove 2.7.18

* Temp remove CPython 2.7.18

* Temp remove 2.7.18

* Misc MSVC fixes

* Fix Windows/static build

* Readd old test_package as test_v1_package

* Add conanrun env to test package self.runs

* Fix Linux shared build

* Shared by default, don't delete compiler in package ID

* Misc Mac fixes/cleanup

* libxcrypt is transitive

* Static by default for now

* Attempt to fix 3.7 on Mac

* Remove ssl module FIXME

* self.settings.arch

* Try using vendored libffi for mac on <3.9

* Fix PYTHONHOME on Linux, always set PYTHONHOME for test

* Try vendored libffi on mac in debug mode

* Remove "dynamic" check

* Remove force on versions

* Use Version() when comparing versions

* Use a virtualrunenv in build, revert ffi changes

* Bandaid fix for Linux

* Use virtualrunenvs in v1 test package also

* Skip 3.7 build on M1 macs

* Set platform toolset directly on <3.8

* Fix issue with pip installed cmake

* Python 2 compat in test_package.py

* Re-add Python 2.7 + workarounds for MSVC

* Misc pre-3.8 msvc fixes

* Fix python 2 on Linux

* Add 2.7.18 to config.yml

* Remove includedirs for all components other than the main one

* Use msvc_runtime_flag

* Misc MSVC fixes

* Skip building _freeze_importlib, fix 3.7.12 in msvc Debug MDd

* Shot in the dark attempt at fixing Mac issue

* Unconditionally generate VCVars in test package

* Print config.log if autotools configure fails

* Skip spam module test in 2.7 (debug, MDd) as well

* Remove unnecessary removals from pcbuild.sln

* Inject _bz2 programmatically

* Also programattically patch bz2 in python 2.7

* Dynamically patch _elementtree, _ctypes, and _decimal projects

* Patch pyexpat project programmatically

* Inject libdb programmatically

* Inject openssl into hashlib programmatically

* Inject xz_utils programattically

* Programattically inject sqlite

* Programmatically inject openssl into _ssl project

* Programmatically inject tk into _tkinter project

* Programmatically inject zlib into pythoncore project

* Remove/simplify redundant patching code

* Minor cleanup

* Refactor into _regex_replace_in_file

* Refactoring of injection of conan props files

* More refactoring for props file injecting

* Programmatically remove parts of _ctypes project

* Programmatically remove parts of _ctypes (patches)

* Patch _decimal project programmatically

* Remove sqlite project programmatically

* Remove sqlite project programatically (patches)

* Remove lzma project include programmatically

* Remove openssl props import programmatically

* Programmatically patch pyexpat project

* Patch _elementtree project programmatically

* Allow MSVC/Debug/dynamic with newer libffi

* Test package cleanup

* Fix Debug MSVC test package

* Use test_package/test_package.py in test_v1_package

* Fix conditional _d in debug mode

* Add -Wl,--as-needed

* Use extra_ldflags instead

* Don't use -Wl,--as-needed on Apple OSs

* Programmatically patch pythoncore project

* Remove pythoncore patches

* Remove unnecessary(?) patch

* Programmatically patch _tkinter project

* Programmatically patch _lzma project

* Manually inject platform toolset on 3.8.x

* Programmatically patch python project

* Programmatically patch _freeze_importlib

* Programmatically patch _ssl project, remove empty MSVC patches

* Misc python 2 fixes

* Programmatically patch setup py to skip tkinter detection

* Programmatically patch ini CFLAGS and CPPFLAGS

* Update 3.8.12 to 3.8.18

* Don't use use_2to3 after it is deprecated

* Update 3.9.7 to 3.9.18

* Update 3.10.0 to 3.10.13

* Always manually specify the platform toolset

* Fix MSVC static

* Fix 3.7 patching

* Update 3.7.12 to 3.7.17

* Add 3.11.7 (likely only MSVC works for now)

* Add 3.12.1 (likely only working on Windows for now)

* Update config.yml

* Remove Py_SetProgramName (deprecated in 3.11)

* Fix 3.12 on Linux

* Fix 3.11 on Linux

* Disable GCC 9 build

* Cleanup test_v1_package

* Only disable 3.12.1 GCC 9 build

* Use pkgconfig tool requirement

* Another shot in the dark attempt at fixing MacOS sporadic failure

* Update to 3.12.2 and 3.11.8

* Update dependencies

* Add patch descriptions

* Enable short paths

* Add link to nis system library

* nis -> nsl

* Add final newline

* Simplify pkg-config info

* Check for Linux or FreeBSD

* Fix disabling sqlite3 (on Linux at least)

* Simplify some file removing

* rm unnecessary rm

* Simplify pkg-config info

* Check for Linux or FreeBSD

* Fix disabling sqlite3 (on Linux at least)

* Simplify some file removing

* rm unnecessary rm

* Disable GCC 9 build on 3.12 as a whole

* Misc configure variable cleanup

* Point test_v1_package to test_package sources

* Fix lint warning

* Diff cleanup

* Conditionally add --with-system-ffi

* Misc test package cleanup

* Bump xz_utils

* Bump xz_utils

* Fix pymalloc argument

* Don't read SSL config file

Co-authored-by: Jordan Williams <[email protected]>

* xcrypt is not transitive in newer versions

* Bandaid fix for test package overflowing Windows max path length

* Fix some lints

* Remove EOL versions

* Remove <3.8 logic

* Fix more <3.8 logic

* Small fix

* Remove calculated Python major version

* Use autotools.install() directly

Co-authored-by: Uilian Ries <[email protected]>

* Remove outdated configure flags and some hacks

* Add 2.0 versions of env variables

* Remove PYTHONHOME from env info for now

* Bump patch versions of 3.8/9/10

* Remove unused import

* Fix running test package with spaces in path

* Only link to ncursesw and tinfo

Co-authored-by: Martin Valgur <[email protected]>

* Fix typo

* Add context comments to most MSVC replace_in_files

* Merge branch 'master' into update-cpython

* Update to 3.11.9

* Add workaround for multithreaded install bug

* Remove useless MSVC patch

* Convert pkgconfig aliases to list

---------

Co-authored-by: memsharded <[email protected]>
Co-authored-by: Martin Valgur <[email protected]>
Co-authored-by: Rubén Rincón Blanco <[email protected]>
Co-authored-by: Jordan Williams <[email protected]>
Co-authored-by: Uilian Ries <[email protected]>
  • Loading branch information
6 people authored Apr 9, 2024
1 parent 5565c18 commit 0b768ea
Show file tree
Hide file tree
Showing 19 changed files with 434 additions and 1,494 deletions.
86 changes: 50 additions & 36 deletions recipes/cpython/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,79 @@
sources:
"3.10.0":
url: "https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz"
sha256: "c4e0cbad57c90690cb813fb4663ef670b4d0f587d8171e2c42bd4c9245bd2758"
"3.9.7":
url: "https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tgz"
sha256: "a838d3f9360d157040142b715db34f0218e535333696a5569dc6f854604eb9d1"
"3.8.12":
url: "https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz"
sha256: "316aa33f3b7707d041e73f246efedb297a70898c4b91f127f66dc8d80c596f1a"
"3.12.2":
url: "https://www.python.org/ftp/python/3.12.2/Python-3.12.2.tgz"
sha256: "a7c4f6a9dc423d8c328003254ab0c9338b83037bd787d680826a5bf84308116e"
"3.11.9":
url: "https://www.python.org/ftp/python/3.11.9/Python-3.11.9.tgz"
sha256: "e7de3240a8bc2b1e1ba5c81bf943f06861ff494b69fda990ce2722a504c6153d"
"3.10.14":
url: "https://www.python.org/ftp/python/3.10.14/Python-3.10.14.tgz"
sha256: "cefea32d3be89c02436711c95a45c7f8e880105514b78680c14fe76f5709a0f6"
"3.9.19":
url: "https://www.python.org/ftp/python/3.9.19/Python-3.9.19.tgz"
sha256: "f5f9ec8088abca9e399c3b62fd8ef31dbd2e1472c0ccb35070d4d136821aaf71"
"3.8.19":
url: "https://www.python.org/ftp/python/3.8.19/Python-3.8.19.tgz"
sha256: "c7fa55a36e5c7a19ec37d8f90f60a2197548908c9ac8b31e7c0dbffdd470eeac"
patches:
"3.10.0":
- patch_file: "patches/3.10/3.10.0-0001-msvc.patch"
patch_description: "Version specific patches to MSVC projects to allow injection of dependencies"
"3.12.2":
- patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch"
patch_description: "Fix ARM/ARM64 mismatch in project file"
patch_type: "bugfix"
- patch_file: "patches/3.12/3.12.1-0001-_ctypes-ffi.patch"
patch_description: "Support shared libffi"
patch_type: "portability"
- patch_file: "patches/3.x-0001-relocatable-python-config.patch"
patch_description: "Allow package to be relocatable"
patch_type: "conan"
- patch_file: "patches/3.12/3.12.1-0002-remove-module-deps.patch"
patch_description: "Remove section of solution file forcing projects to be built that might not be used for this recipe"
patch_type: "conan"
"3.11.8":
- patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch"
patch_description: "Fix ARM/ARM64 mismatch in project file"
patch_type: "bugfix"
- patch_file: "patches/3.11/3.11.7-0001-_ctypes-ffi.patch"
patch_description: "Support shared libffi"
patch_type: "portability"
- patch_file: "patches/3.x-0001-relocatable-python-config.patch"
patch_description: "Allow package to be relocatable"
patch_type: "conan"
- patch_file: "patches/3.x-0002-remove-module-deps.patch"
patch_description: "Remove section of solution file forcing projects to be built that might not be used for this recipe"
patch_type: "conan"
"3.10.14":
- patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch"
patch_description: "Fix ARM/ARM64 mismatch in project file"
patch_type: "bugfix"
- patch_file: "patches/3.10/3.10.0-0003-_ctypes-ffi.patch"
patch_description: "Remove duplicate libffi symbols and support shared libffi"
patch_type: "portability"
- patch_file: "patches/3.10/3.10.0-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch"
patch_description: "Pass C and CPP flags from configure script to setup.py"
patch_type: "bugfix"
- patch_file: "patches/3.10/3.10.0-0005-disable-macos-tcltk.patch"
patch_description: "Unconditionally enable tcl/tk on Mac"
patch_type: "conan"
- patch_file: "patches/3.x-0001-relocatable-python-config.patch"
patch_description: "Allow package to be relocatable"
patch_type: "conan"
"3.9.7":
- patch_file: "patches/3.9/3.9.7-0001-msvc.patch"
patch_description: "Version specific patches to MSVC projects to allow injection of dependencies"
- patch_file: "patches/3.x-0002-remove-module-deps.patch"
patch_description: "Remove section of solution file forcing projects to be built that might not be used for this recipe"
patch_type: "conan"
"3.9.19":
- patch_file: "patches/3.9/3.9.7-0002-_msi-vcxproj.patch"
patch_description: "Fix ARM/ARM64 mismatch in project file"
patch_type: "bugfix"
- patch_file: "patches/3.9/3.9.7-0003-_ctypes-ffi.patch"
patch_description: "Remove duplicate libffi symbols and support shared libffi"
patch_type: "portability"
- patch_file: "patches/3.9/3.9.7-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch"
patch_description: "Pass C and CPP flags from configure script to setup.py"
patch_type: "bugfix"
- patch_file: "patches/3.9/3.9.7-0005-disable-macos-tcltk.patch"
patch_description: "Unconditionally enable tcl/tk on Mac"
patch_type: "conan"
- patch_file: "patches/3.x-0001-relocatable-python-config.patch"
patch_description: "Allow package to be relocatable"
patch_type: "conan"
"3.8.12":
- patch_file: "patches/3.8/3.8.12-0001-msvc.patch"
patch_description: "Version specific patches to MSVC projects to allow injection of dependencies"
- patch_file: "patches/3.x-0002-remove-module-deps.patch"
patch_description: "Remove section of solution file forcing projects to be built that might not be used for this recipe"
patch_type: "conan"
"3.8.19":
- patch_file: "patches/3.8/3.8.12-0002-_ctypes-ffi.patch"
patch_description: "Remove duplicate libffi symbols and support shared libffi"
patch_type: "portability"
- patch_file: "patches/3.8/3.8.12-0003-setup.py-pass-CFLAGS-CPPFLAGS.patch"
patch_description: "Pass C and CPP flags from configure script to setup.py"
patch_type: "bugfix"
- patch_file: "patches/3.8/3.8.12-0004-disable-macos-tcltk.patch"
patch_description: "Unconditionally enable tcl/tk on Mac"
patch_type: "conan"
- patch_file: "patches/3.x-0001-relocatable-python-config.patch"
patch_description: "Allow package to be relocatable"
patch_type: "conan"
- patch_file: "patches/3.x-0002-remove-module-deps.patch"
patch_description: "Remove section of solution file forcing projects to be built that might not be used for this recipe"
patch_type: "conan"
Loading

0 comments on commit 0b768ea

Please sign in to comment.