Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPython: Conan 2.0 #21387

Merged
merged 123 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
a3c8eb5
wip
memsharded Jun 20, 2023
342f926
cpython: migrate to Conan v2
valgur Oct 4, 2023
2f838f9
Merge branch 'migrate/cpython' into cpython
valgur Oct 5, 2023
8c8671a
cpython: fix autotools install step
valgur Oct 5, 2023
c1c9f2e
cpython: fix libuuid requirement
valgur Oct 5, 2023
960811e
cpython: update test_package
valgur Oct 5, 2023
522d5d9
cpython: temporarily disable FindPythonX tests
valgur Oct 5, 2023
9c83e18
cpython: package_type should be "library"
valgur Oct 6, 2023
6c496e6
cpython: tidy
valgur Oct 6, 2023
35fac91
cpython: ncurses is required transitively
valgur Oct 6, 2023
ec99e2e
cpython: fix shared test
valgur Oct 6, 2023
220c472
cpython: use cpp_info.aggregated_components() for deps
valgur Nov 13, 2023
2e54e11
cpython: bsddb has been remove in Python 3
valgur Nov 13, 2023
51a3e11
cpython: fix openssl support
valgur Nov 13, 2023
3cc7f61
Fix package layout
Ahajha Nov 23, 2023
1840f62
Fix new generators in test package
Ahajha Nov 25, 2023
d0bcea7
Misc fixes
Ahajha Nov 25, 2023
f0797ef
Remove redundant test
Ahajha Nov 25, 2023
c766334
Add FIXMEs
Ahajha Nov 25, 2023
6a1ebd9
Fix running test package multiple times in a row
Ahajha Nov 25, 2023
1539332
Handle conan 1/2 differences in test_package
Ahajha Nov 25, 2023
1c2d2d1
Fix MSBuild
Nov 26, 2023
a665c98
Misc Conan 2.0 fixes
Nov 26, 2023
b8a0b24
cpython: minor tweaks, bump deps
valgur Nov 26, 2023
fcfd48d
cpython: use altinstall
valgur Nov 26, 2023
c929422
Comment out versions with broken patches for now
Ahajha Nov 28, 2023
2f652f8
Fix Autotools build
Ahajha Nov 30, 2023
593edf5
Restore old versions, temp remove 2.7.18
Dec 1, 2023
f2705c5
Temp remove CPython 2.7.18
Dec 1, 2023
52be52c
Temp remove 2.7.18
Dec 1, 2023
a321a73
Misc MSVC fixes
Dec 1, 2023
88e65f7
Fix Windows/static build
Dec 3, 2023
fa33234
Readd old test_package as test_v1_package
Dec 3, 2023
ba87e52
Add conanrun env to test package self.runs
Ahajha Dec 3, 2023
b9e1aeb
Fix Linux shared build
Ahajha Dec 3, 2023
ff644f9
Shared by default, don't delete compiler in package ID
Ahajha Dec 3, 2023
26209e1
Misc Mac fixes/cleanup
Ahajha Dec 4, 2023
fbb7fba
libxcrypt is transitive
Ahajha Dec 4, 2023
8a3917a
Static by default for now
Ahajha Dec 4, 2023
d81b6b7
Attempt to fix 3.7 on Mac
Ahajha Dec 5, 2023
f53738a
Remove ssl module FIXME
Ahajha Dec 5, 2023
9395feb
self.settings.arch
Ahajha Dec 5, 2023
cf6dec9
Try using vendored libffi for mac on <3.9
Dec 8, 2023
a0d2702
Fix PYTHONHOME on Linux, always set PYTHONHOME for test
Ahajha Dec 15, 2023
82aa4d9
Merge branch 'master' into valgur-fork/cpython
Ahajha Dec 18, 2023
578471b
Try vendored libffi on mac in debug mode
Dec 28, 2023
7b428e8
Merge branch 'valgur-fork/cpython' of https://github.com/Ahajha/conan…
Dec 28, 2023
63fdbf3
Merge branch 'master' into valgur-fork/cpython
Ahajha Dec 28, 2023
d08e7b8
Merge branch 'master' into valgur-fork/cpython
Ahajha Dec 30, 2023
64eee10
Remove "dynamic" check
Dec 30, 2023
81d6828
Remove force on versions
Dec 30, 2023
dd57eec
Merge branch 'valgur-fork/cpython' of https://github.com/Ahajha/conan…
Dec 30, 2023
b106b56
Use Version() when comparing versions
Dec 31, 2023
0441c37
Use a virtualrunenv in build, revert ffi changes
Jan 2, 2024
f09d467
Merge branch 'master' into valgur-fork/cpython
Ahajha Jan 6, 2024
ef41f8b
Bandaid fix for Linux
Jan 6, 2024
fe430fc
Use virtualrunenvs in v1 test package also
Jan 7, 2024
7186b13
Skip 3.7 build on M1 macs
Jan 7, 2024
2e331cf
Set platform toolset directly on <3.8
Jan 7, 2024
9d7eb03
Fix issue with pip installed cmake
Jan 7, 2024
8343d90
Python 2 compat in test_package.py
Jan 7, 2024
d98f3cb
Re-add Python 2.7 + workarounds for MSVC
Jan 7, 2024
7fc8e5f
Misc pre-3.8 msvc fixes
Jan 7, 2024
618394a
Fix python 2 on Linux
Ahajha Jan 7, 2024
e03f786
Add 2.7.18 to config.yml
Ahajha Jan 7, 2024
2f493cd
Merge branch 'master' into valgur-fork/cpython
Ahajha Jan 10, 2024
573a6b8
Remove includedirs for all components other than the main one
Jan 10, 2024
0674cab
Merge branch 'valgur-fork/cpython' of https://github.com/Ahajha/conan…
Jan 10, 2024
432a0c7
Use msvc_runtime_flag
Jan 10, 2024
7508a37
Merge branch 'master' into valgur-fork/cpython
Ahajha Jan 11, 2024
d583f21
Misc MSVC fixes
Jan 12, 2024
1df3067
Merge branch 'valgur-fork/cpython' of https://github.com/Ahajha/conan…
Jan 12, 2024
0b11453
Skip building _freeze_importlib, fix 3.7.12 in msvc Debug MDd
Jan 13, 2024
57a9e0e
Shot in the dark attempt at fixing Mac issue
Jan 13, 2024
a30449c
Unconditionally generate VCVars in test package
Jan 14, 2024
54b4073
Print config.log if autotools configure fails
Ahajha Jan 14, 2024
b7a8468
Skip spam module test in 2.7 (debug, MDd) as well
Jan 14, 2024
c944c49
Merge branch 'valgur-fork/cpython' of https://github.com/Ahajha/conan…
Jan 14, 2024
deed04f
Merge branch 'master' into valgur-fork/cpython
Ahajha Jan 15, 2024
6736abc
Merge branch 'master' into valgur-fork/cpython
AbrilRBS Jan 16, 2024
1e6239c
Merge branch 'master' into valgur-fork/cpython
Ahajha Jan 16, 2024
88ce9db
Allow MSVC/Debug/dynamic with newer libffi
Jan 20, 2024
c943a13
Test package cleanup
Jan 20, 2024
aae9fd3
Fix Debug MSVC test package
Jan 21, 2024
c5d51eb
Use test_package/test_package.py in test_v1_package
Jan 21, 2024
0ecd157
Fix conditional _d in debug mode
Jan 21, 2024
4b067d5
Add -Wl,--as-needed
Ahajha Jan 25, 2024
0821d0a
Use extra_ldflags instead
Ahajha Jan 25, 2024
2ae86ce
Don't use -Wl,--as-needed on Apple OSs
Ahajha Jan 26, 2024
f00e0a2
Merge branch 'conan-io:master' into valgur-fork/cpython
Ahajha Jan 26, 2024
d080513
Manually inject platform toolset on 3.8.x
Ahajha Jan 30, 2024
9cadebb
Always manually specify the platform toolset
Ahajha Jan 30, 2024
0f50e2b
Merge branch 'master' into valgur-fork/cpython
Ahajha Feb 5, 2024
a1ec0a8
Update dependencies
Ahajha Feb 9, 2024
d6618da
Add patch descriptions
Ahajha Feb 9, 2024
f9ae2c3
Enable short paths
Ahajha Feb 9, 2024
a56d3b4
Add link to nis system library
Ahajha Feb 9, 2024
8113bf7
nis -> nsl
Ahajha Feb 9, 2024
b2e80a3
Merge branch 'master' into valgur-fork/cpython
Ahajha Feb 10, 2024
f4631a0
Simplify pkg-config info
Ahajha Feb 10, 2024
60dd9cd
Check for Linux or FreeBSD
Ahajha Feb 10, 2024
0532b59
Fix disabling sqlite3 (on Linux at least)
Ahajha Feb 10, 2024
667851f
Simplify some file removing
Ahajha Feb 12, 2024
67837e1
rm unnecessary rm
Ahajha Feb 12, 2024
05c21d2
Misc configure variable cleanup
Ahajha Feb 15, 2024
9e11ec1
Point test_v1_package to test_package sources
Ahajha Feb 15, 2024
6dbc07b
Fix lint warning
Ahajha Feb 15, 2024
dc6ce06
Diff cleanup
Ahajha Feb 15, 2024
c9aa535
Merge branch 'master' into valgur-fork/cpython
Ahajha Mar 4, 2024
83ebccf
Merge branch 'master' into valgur-fork/cpython
Ahajha Mar 4, 2024
f2e8a51
Misc test package cleanup
Ahajha Mar 15, 2024
8907f71
Bump xz_utils
Ahajha Mar 15, 2024
3916a16
Bump xz_utils
Ahajha Mar 15, 2024
8a07345
Fix pymalloc argument
Ahajha Mar 15, 2024
8e7f697
Don't read SSL config file
Ahajha Mar 15, 2024
73e25ce
Bandaid fix for test package overflowing Windows max path length
Ahajha Mar 18, 2024
93fc5a2
Remove EOL versions
Ahajha Mar 18, 2024
724f95f
Merge branch 'master' into valgur-fork/cpython
Ahajha Mar 18, 2024
ab8ca5f
Remove calculated Python major version
Ahajha Mar 18, 2024
9466a2b
Use autotools.install() directly
Ahajha Mar 20, 2024
bc6d232
Remove outdated configure flags and some hacks
Ahajha Mar 20, 2024
3988348
Add 2.0 versions of env variables
Ahajha Mar 20, 2024
c5fa0c5
Remove PYTHONHOME from env info for now
Ahajha Mar 20, 2024
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
103 changes: 48 additions & 55 deletions recipes/cpython/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,65 +8,58 @@
"3.8.12":
url: "https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz"
sha256: "316aa33f3b7707d041e73f246efedb297a70898c4b91f127f66dc8d80c596f1a"
"3.7.12":
url: "https://www.python.org/ftp/python/3.7.12/Python-3.7.12.tgz"
sha256: "33b4daaf831be19219659466d12645f87ecec6eb21d4d9f9711018a7b66cce46"
"2.7.18":
url: "https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz"
sha256: "da3080e3b488f648a3d7a4560ddee895284c3380b11d6de75edb986526b9a814"
patches:
"3.10.0":
- patch_file: "patches/3.10.0-0001-msvc.patch"
base_path: "source_subfolder"
- patch_file: "patches/3.9.7-0002-_msi-vcxproj.patch"
base_path: "source_subfolder"
- patch_file: "patches/3.10.0-0003-_ctypes-ffi.patch"
base_path: "source_subfolder"
- patch_file: "patches/3.10.0-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch"
base_path: "source_subfolder"
- patch_file: "patches/3.10.0-0005-disable-macos-tcltk.patch"
base_path: "source_subfolder"
- patch_file: "patches/3.10/3.10.0-0001-msvc.patch"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the shake of the recipe being perfect, can we get the rest of the patch fields added for patches? It will make future maintainability so much easier!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do plan on removing the MSVC patches in a future PR, but for now I can document all of them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally got around to adding these. A few notes on some of the patches, some are irrelevant upstream as the relevant sections have been removed for one reason or another:
patches/3.9/3.9.7-0002-_msi-vcxproj.patch: msilib is removed in 3.13: python/cpython#104911
patches/3.10/3.10.0-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch: The setup.py script is entirely removed in 3.12
patches/3.10/3.10.0-0005-disable-macos-tcltk.patch: This is in setup.py, I think the relevant section is removed in 3.11, though again regardless the whole script is removed in 3.12

patch_description: "Version specific patches to MSVC projects to allow injection of dependencies"
patch_type: "conan"
- 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"

Check warning on line 19 in recipes/cpython/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

'patch_type' should have 'patch_source' as per https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patch_type it is expected to have a source (e.g. a URL) to where it originates from to help with reviewing and consumers to evaluate patches
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"

Check warning on line 25 in recipes/cpython/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

'patch_type' should have 'patch_source' as per https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patch_type it is expected to have a source (e.g. a URL) to where it originates from to help with reviewing and consumers to evaluate patches
patch_description: "Unconditionally enable tcl/tk on Mac"
patch_type: "conan"
- patch_file: "patches/3.x-0001-relocatable-python-config.patch"
base_path: "source_subfolder"
patch_description: "Allow package to be relocatable"
patch_type: "conan"
"3.9.7":
- patch_file: "patches/3.9.7-0001-msvc.patch"
base_path: "source_subfolder"
- patch_file: "patches/3.9.7-0002-_msi-vcxproj.patch"
base_path: "source_subfolder"
- patch_file: "patches/3.9.7-0003-_ctypes-ffi.patch"
base_path: "source_subfolder"
- patch_file: "patches/3.9.7-0004-setup.py-pass-CFLAGS-CPPFLAGS.patch"
base_path: "source_subfolder"
- patch_file: "patches/3.9.7-0005-disable-macos-tcltk.patch"
base_path: "source_subfolder"
- 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_type: "conan"
- 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"

Check warning on line 39 in recipes/cpython/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

'patch_type' should have 'patch_source' as per https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patch_type it is expected to have a source (e.g. a URL) to where it originates from to help with reviewing and consumers to evaluate patches
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"

Check warning on line 45 in recipes/cpython/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

'patch_type' should have 'patch_source' as per https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patch_type it is expected to have a source (e.g. a URL) to where it originates from to help with reviewing and consumers to evaluate patches
patch_type: "conan"
- patch_file: "patches/3.x-0001-relocatable-python-config.patch"
base_path: "source_subfolder"
patch_description: "Allow package to be relocatable"
patch_type: "conan"
"3.8.12":
- patch_file: "patches/3.8.12-0001-msvc.patch"
base_path: "source_subfolder"
- patch_file: "patches/3.8.12-0002-_ctypes-ffi.patch"
base_path: "source_subfolder"
- patch_file: "patches/3.8.12-0003-setup.py-pass-CFLAGS-CPPFLAGS.patch"
base_path: "source_subfolder"
- patch_file: "patches/3.8.12-0004-disable-macos-tcltk.patch"
base_path: "source_subfolder"
- 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_type: "conan"
- 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"

Check warning on line 62 in recipes/cpython/all/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

'patch_type' should have 'patch_source' as per https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patch_type it is expected to have a source (e.g. a URL) to where it originates from to help with reviewing and consumers to evaluate patches
- patch_file: "patches/3.x-0001-relocatable-python-config.patch"
base_path: "source_subfolder"
"3.7.12":
- patch_file: "patches/3.7.9-0001-msvc.patch"
base_path: "source_subfolder"
- patch_file: "patches/3.7.9-0002-setup.py-pass-CFLAGS-CPPFLAGS.patch"
base_path: "source_subfolder"
- patch_file: "patches/3.7.9-0003-disable-macos-tcltk.patch"
base_path: "source_subfolder"
- patch_file: "patches/3.x-0001-relocatable-python-config.patch"
base_path: "source_subfolder"
"2.7.18":
- patch_file: "patches/2.7.18-0001-msvc.patch"
base_path: "source_subfolder"
- patch_file: "patches/2.7.18-0002-add-support-msvc-14.patch"
base_path: "source_subfolder"
- patch_file: "patches/2.7.18-0003-msvc-fix-static.patch"
base_path: "source_subfolder"
- patch_file: "patches/2.7.18-0004-disable-macos-tcltk.patch"
base_path: "source_subfolder"
patch_description: "Allow package to be relocatable"
patch_type: "conan"
Loading
Loading