-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add cpython 3.13.0 #25536
base: master
Are you sure you want to change the base?
Add cpython 3.13.0 #25536
Conversation
This comment has been minimized.
This comment has been minimized.
Conan v1 pipeline ❌Warning Conan Center will stop receiving updates for Conan 1.x packages soon - please see announcement. Failure in build 2 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. Conan v2 pipeline ❌
The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping Failure in build 2 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
@ErniGH not sure why there's a missing binary error. I expect this should be working and ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I gave this a try on my company's conan builds and found that Windows MSVC doesn't build Python 3.13.0 successfully.
The presenting error is that there is a line that no longer patches correctly:
replace_in_file(self, self._msvc_project_path("_decimal"), r"..\Modules\_decimal\libmpdec;", "")
But the overall issue is that cpython changed the formatting of that file in python/cpython@849e071
I was able to fix it using this diff:
diff --git a/recipes/cpython/all/conanfile.py b/recipes/cpython/all/conanfile.py
index d54593a..c5bd6f9 100644
--- a/recipes/cpython/all/conanfile.py
+++ b/recipes/cpython/all/conanfile.py
@@ -378,16 +378,19 @@ class CPythonConan(ConanFile):
replace_in_file(self, self._msvc_project_path("_ssl"), '<Import Project="openssl.props" />', "")
# For mpdecimal, we need to remove all headers and all c files *except* the main module file, _decimal.c
- self._regex_replace_in_file(self._msvc_project_path("_decimal"), r'.*Include=\"\.\.\\Modules\\_decimal\\.*\.h.*', "")
- self._regex_replace_in_file(self._msvc_project_path("_decimal"), r'.*Include=\"\.\.\\Modules\\_decimal\\libmpdec\\.*\.c.*', "")
+ if Version(self.version) < "3.13":
+ self._regex_replace_in_file(self._msvc_project_path("_decimal"), r'.*Include=\"\.\.\\Modules\\_decimal\\.*\.h.*', "")
+ self._regex_replace_in_file(self._msvc_project_path("_decimal"), r'.*Include=\"\.\.\\Modules\\_decimal\\libmpdec\\.*\.c.*', "")
+ replace_in_file(self, self._msvc_project_path("_decimal"), r"..\Modules\_decimal\libmpdec;", "")
+ else:
+ # https://github.com/python/cpython/commit/849e0716d378d6f9f724d1b3c386f6613d52a49d
+ # changed _decimal.vcxproj enough that we need different patching code.
+ self._regex_replace_in_file(self._msvc_project_path("_decimal"), r'.*Include=\"\.\.\\Modules\\_decimal\\windows\\.*\.h.*', "")
+ self._regex_replace_in_file(self._msvc_project_path("_decimal"), r'.*Include=\"\$\(mpdecimalDir\)\\libmpdec\\.*\.h.*', "")
+ self._regex_replace_in_file(self._msvc_project_path("_decimal"), r'.*Include=\"\$\(mpdecimalDir\)\\libmpdec\\.*\.c.*', "")
+ replace_in_file(self, self._msvc_project_path("_decimal"), r"..\Modules\_decimal\windows;$(mpdecimalDir)\libmpdec;", "")
# There is also an assembly file with a complicated build step as part of the mpdecimal build
replace_in_file(self, self._msvc_project_path("_decimal"), "<CustomBuild", "<!--<CustomBuild")
replace_in_file(self, self._msvc_project_path("_decimal"), "</CustomBuild>", "</CustomBuild>-->")
- # Remove extra include directory
- replace_in_file(self, self._msvc_project_path("_decimal"), r"..\Modules\_decimal\libmpdec;", "")
@grossag Thanks! I'll apply the patch later today. |
cpython/3.13.0
Key changes:
Also worth noting, the other minor versions have some patch bumps (3.8.20, 3.9.20, 3.10.15, 3.11.10). I can add those in this PR, or perhaps it can wait.
3.8 is also officially EOL as of October 7th, 2024. We can leave it in the recipe for now but it should probably be removed at some point.