Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-103186: In test_tools.freeze, fetch CONFIG_ARGS from original source directory#103213

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@TabLand
Copy link
Contributor

@TabLandTabLand commentedApr 3, 2023
edited by bedevere-bot
Loading

instead of fetching from intermediate instance. As "make clean" is called against the intermediate instance, the build directory is cleared and the config arguments lookup fails with a ModuleNotFoundError:

# /opt/python/test/cpython/python -c 'import sysconfig; print(sysconfig.get_config_var("CONFIG_ARGS"))'CalledProcessError: Command '['/opt/python/test/cpython/python', '-c', 'import sysconfig; print(sysconfig.get_config_var("CONFIG_ARGS"))']' returned non-zero exit status 1.--- STDOUT ------ STDERR ---Traceback (most recent call last):  File "<string>", line 1, in <module>  File "/opt/python/test/cpython/Lib/sysconfig.py", line 740, in get_config_var    return get_config_vars().get(name)           ^^^^^^^^^^^^^^^^^  File "/opt/python/test/cpython/Lib/sysconfig.py", line 723, in get_config_vars    _init_config_vars()  File "/opt/python/test/cpython/Lib/sysconfig.py", line 670, in _init_config_vars    _init_posix(_CONFIG_VARS)  File "/opt/python/test/cpython/Lib/sysconfig.py", line 536, in _init_posix    _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ModuleNotFoundError: No module named '_sysconfigdata_d_linux_x86_64-linux-gnu'

More context here:#103186 (comment)

instead of fetching from intermediate instance. As "make clean" is calledagainst the intermediate instance, the build directory is cleared and theconfig arguments lookup fails with a ModuleNotFoundError
@bedevere-bot
Copy link

Most changes to Pythonrequire a NEWS entry.

Please add it using theblurb_it web app or theblurb command-line tool.

@TabLand
Copy link
ContributorAuthor

Hello@erlend-aasland: I saw you worked on a similar change recently, would appreciate any feedback.

Hello freeze experts: There is probably another way to capture the same info from the intermediate instance as long as we do so before "make clean" is called - but that solution felt messy. Please let me know whether I should have a go at improving the variable naming here as SRCDIR (original), srcdir (intermediate) and builddir (frozen) could cause confusion...

@arhadthedevarhadthedev added the buildThe build process and cross-build labelApr 3, 2023
@arhadthedev
Copy link
Member

@terryjreedy (as a participant of the parent issue)

@TabLand
Copy link
ContributorAuthor

The following new exception for missing make file in the intermediate python instance is passing on all platforms except Ubuntu as part of the Github CI pipeline builds:

     if os.path.exists(os.path.join(newroot, 'Makefile')):         _run_quiet([MAKE, 'clean'], newroot)+    else:+        raise Exception("new frozen build Makefile missing!")

I'm happy to remove this, as technically the existence of the Makefile depends on ./configure being run successfully first?

It depends on ./configure
@bedevere-bot
Copy link

Most changes to Pythonrequire a NEWS entry.

Please add it using theblurb_it web app or theblurb command-line tool.

@arhadthedev
Copy link
Member

Closing as a duplicate ofgh-102152.

@erlend-aasland
Copy link
Contributor

Closing as a duplicate ofgh-102152.

This is not a duplicate ofgh-102152, which fetched CONFIG_ARGS from the copied source directory instead of from the build directory. This PR fetches CONFIG_ARGS from the original source directory, so it is slightly different, and possibly more correct; I don't have the bandwidth to look at this right now. I'll definitely be able to review it around the summit in a couple of weeks.

TabLand reacted with thumbs up emoji

@TabLand
Copy link
ContributorAuthor

Hi@erlend-aasland /@terryjreedy,
Appreciate you're very busy...
Please let me know your thoughts on this PR?

@terryjreedy
Copy link
Member

This PR involves things beyond my knowledge. Erland, if you cannot finish this, can you suggest another reviewer?

@erlend-aaslanderlend-aasland changed the titlegh-103186 - Fetch CONFIG_ARGS from original python instancegh-103186: In test_tools.freeze, fetch CONFIG_ARGS from original source directoryJul 11, 2023
@erlend-aaslanderlend-aaslandenabled auto-merge (squash)July 11, 2023 21:55
@erlend-aasland
Copy link
Contributor

@kumaraditya303, should we backport this to 3.12?

@kumaraditya303
Copy link
Contributor

should we backport this to 3.12?

Yes

@miss-islington
Copy link
Contributor

Thanks@TabLand for the PR, and@erlend-aasland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-106667 is a backport of this pull request to the3.12 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.12only security fixes labelJul 12, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJul 12, 2023
…l source directory (pythonGH-103213)Fetch CONFIG_ARGS from the original source directory, instead of fromthe copied source tree. When "make clean" is executed in the copiedsource tree, the build directory is cleared and the configure argumentlookup fails. However, the original source directory still contains thisinformation.(cherry picked from commitde82732)Co-authored-by: Ijtaba Hussain <ijtabahussain@live.com>
kumaraditya303 pushed a commit that referenced this pull requestJul 12, 2023
…al source directory (GH-103213) (#106667)gh-103186: In test_tools.freeze, fetch CONFIG_ARGS from original source directory (GH-103213)Fetch CONFIG_ARGS from the original source directory, instead of fromthe copied source tree. When "make clean" is executed in the copiedsource tree, the build directory is cleared and the configure argumentlookup fails. However, the original source directory still contains thisinformation.(cherry picked from commitde82732)Co-authored-by: Ijtaba Hussain <ijtabahussain@live.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@erlend-aaslanderlend-aaslandAwaiting requested review from erlend-aasland

Assignees

No one assigned

Labels

buildThe build process and cross-build

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@TabLand@bedevere-bot@arhadthedev@erlend-aasland@terryjreedy@kumaraditya303@miss-islington

[8]ページ先頭

©2009-2025 Movatter.jp