Skip to content

update cpython 3.10 sources to fix build #33

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

Closed
wants to merge 1 commit into from
Closed

update cpython 3.10 sources to fix build #33

wants to merge 1 commit into from

Conversation

TinfoilSubmarine
Copy link

@TinfoilSubmarine TinfoilSubmarine commented Oct 22, 2021

I pulled in updated files for cpython 3.10 to fix builds as alluded by #32

I noticed that there were some some additional changes to fix issues with compiling on Windows and MacOS, so those will likely need to be re-applied, but I don't have a Windows/MacOS machine to test on so I'll leave it to you.

@lurch
Copy link
Contributor

lurch commented Oct 22, 2021

You may find the comments in #19 interesting 😉 Or maybe not.

@TinfoilSubmarine
Copy link
Author

Thanks for the note! I think that the submodule approach would be useful, but definitely even one copy of the source tree is almost 70x larger than the frozendict source tree.

The problem with this is the changes in cpython are working against us as far as trying to make a tidy solution. For example, I had to add several new headers that were included by Python.h and others that weren't previously included. And the reverse of that is also true: there are files that are no longer included by Python.h that are still included in this repo.

I'm thinking about throwing together a script that can be run ad-hoc to determine when the headers need to be updated, but that script would need to be able to do some sort of header/include analysis to figure out what needs to be added, so it might not be that simple of a script to write XD

@lurch
Copy link
Contributor

lurch commented Oct 22, 2021

For example, I had to add several new headers that were included by Python.h and others that weren't previously included. And the reverse of that is also true: there are files that are no longer included by Python.h that are still included in this repo.

Sounds like something that rsync ought to be able to handle? Probably makes sense to just copy across the whole headers directory, rather than trying to work out what includes are or aren't used by Python.h ?

@TinfoilSubmarine
Copy link
Author

True, copying over Objects and Include is only ~5MB.

@TinfoilSubmarine
Copy link
Author

We could probably drop a VERSION file tracking which patchlevel of the python version we are on in cpython_src, then put a check in setup.py that notifies when there is a newer version available.

@TinfoilSubmarine
Copy link
Author

Another idea that may be the most elegant: use the submodules, but point it to a fork of cpython that drops all other files other than Objects/* and Include/*, so then the submodule doesn't consume tons of space. Then, that repo can just be rebased whenever there are new python versions.

@lurch
Copy link
Contributor

lurch commented Oct 22, 2021

Are you volunteering to maintain that other fork of cpython? 😆
(also, part of the reason that the "submodule approach" was so huge was that it was also storing full git-history. As I noted in #19 it unfortunately doesn't seem possible to use shallow clones with "branched" submodules)

@Marco-Sulla
Copy link
Owner

Excuse me, but this is a delicate part and I did myself here:
000f296

@TinfoilSubmarine TinfoilSubmarine deleted the update-3.10 branch October 22, 2021 23:50
@TinfoilSubmarine
Copy link
Author

No worries, thanks!

@Marco-Sulla
Copy link
Owner

Marco-Sulla commented Oct 23, 2021

About the fork, sorry, but I will not trust third party sources of such a delicate code. And I see no advantage to have a separate repo instead of simply copying the source I need in this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants