Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gh-109615: Fix test_tools.test_freeze SRCDIR #109935

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

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Sep 26, 2023

  • Use sysconfig to get the source directory.
  • Use sysconfig.get_config_var() to get CONFIG_ARGS variable.

@vstinner
Copy link
Member Author

!buildbot s390x SLES

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @vstinner for commit a57099f 🤖

The command will test the builders whose names match following regular expression: s390x SLES

The builders matched are:

  • s390x SLES PR

@vstinner
Copy link
Member Author

!buildbot s390x Debian

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @vstinner for commit a57099f 🤖

The command will test the builders whose names match following regular expression: s390x Debian

The builders matched are:

  • s390x Debian PR

@vstinner
Copy link
Member Author

I'm not sure why previously, a subprocess was spawned to run "python -c sysconfig.get_config_var(...)", rather than using directly sysconfig.get_config_var(). The frozen app can target a different Python program?

@vstinner
Copy link
Member Author

@ericsnowcurrently: You added Tools/freeze/test/ in commit 13d9205. Do you recall why you didn't use sysconfig directly?

@vstinner
Copy link
Member Author

!buildbot s390x SLES

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @vstinner for commit 79c94b1 🤖

The command will test the builders whose names match following regular expression: s390x SLES

The builders matched are:

  • s390x SLES PR

@vstinner
Copy link
Member Author

!buildbot s390x Debian

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @vstinner for commit 79c94b1 🤖

The command will test the builders whose names match following regular expression: s390x Debian

The builders matched are:

  • s390x Debian PR

@ericsnowcurrently
Copy link
Member

@ericsnowcurrently: You added Tools/freeze/test/ in commit 13d9205. Do you recall why you didn't use sysconfig directly?

I don't recall. I may have copied it from somewhere, or had trouble using sysconfig, or something else. Sorry. Wish I remembered.

@vstinner vstinner force-pushed the freeze_src_dir branch 2 times, most recently from 2c0ff04 to 9c111be Compare September 27, 2023 00:34
@vstinner
Copy link
Member Author

!buildbot wasm32-wasi

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @vstinner for commit 9c111be 🤖

The command will test the builders whose names match following regular expression: wasm32-wasi

The builders matched are:

  • wasm32-wasi PR

@vstinner
Copy link
Member Author

!buildbot s390x Debian

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @vstinner for commit 9c111be 🤖

The command will test the builders whose names match following regular expression: s390x Debian

The builders matched are:

  • s390x Debian PR

@vstinner vstinner marked this pull request as ready for review September 27, 2023 07:46
@vstinner vstinner requested a review from vsajip as a code owner September 27, 2023 07:46
Fix copy_source_tree() function of test_tools.test_freeze:

* Don't copy SRC_DIR/build/ anymore. This directory is modified by
  other tests running in parallel.
* Add test.support.copy_python_src_ignore().
* Use sysconfig to get the source directory.
* Use sysconfig.get_config_var() to get CONFIG_ARGS variable.
@vstinner vstinner enabled auto-merge (squash) September 27, 2023 07:56
@vstinner vstinner merged commit 1512d6c into python:main Sep 27, 2023
@vstinner vstinner deleted the freeze_src_dir branch September 27, 2023 08:18
@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @vstinner, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 1512d6c6ee2a770afb339bbb74c1b990116f7f89 3.12

@miss-islington
Copy link
Contributor

Sorry, @vstinner, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 1512d6c6ee2a770afb339bbb74c1b990116f7f89 3.11

vstinner added a commit to vstinner/cpython that referenced this pull request Sep 27, 2023
Fix copy_source_tree() function of test_tools.test_freeze:

* Don't copy SRC_DIR/build/ anymore. This directory is modified by
  other tests running in parallel.
* Add test.support.copy_python_src_ignore().
* Use sysconfig to get the source directory.
* Use sysconfig.get_config_var() to get CONFIG_ARGS variable.

(cherry picked from commit 1512d6c)
@bedevere-app
Copy link

bedevere-app bot commented Sep 27, 2023

GH-109950 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Sep 27, 2023
vstinner added a commit to vstinner/cpython that referenced this pull request Sep 27, 2023
Fix copy_source_tree() function of test_tools.test_freeze:

* Don't copy SRC_DIR/build/ anymore. This directory is modified by
  other tests running in parallel.
* Add test.support.copy_python_src_ignore().
* Use sysconfig to get the source directory.
* Use sysconfig.get_config_var() to get CONFIG_ARGS variable.

(cherry picked from commit 1512d6c)
vstinner added a commit to vstinner/cpython that referenced this pull request Sep 27, 2023
Fix copy_source_tree() function of test_tools.test_freeze:

* Don't copy SRC_DIR/build/ anymore. This directory is modified by
  other tests running in parallel.
* Add test.support.copy_python_src_ignore().
* Use sysconfig to get the source directory.
* Use sysconfig.get_config_var() to get CONFIG_ARGS variable.

(cherry picked from commit 1512d6c)
@bedevere-app
Copy link

bedevere-app bot commented Sep 27, 2023

GH-109951 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Sep 27, 2023
vstinner added a commit that referenced this pull request Sep 27, 2023
gh-109615: Fix test_tools.test_freeze SRCDIR (#109935)

Fix copy_source_tree() function of test_tools.test_freeze:

* Don't copy SRC_DIR/build/ anymore. This directory is modified by
  other tests running in parallel.
* Add test.support.copy_python_src_ignore().
* Use sysconfig to get the source directory.
* Use sysconfig.get_config_var() to get CONFIG_ARGS variable.

(cherry picked from commit 1512d6c)
csm10495 pushed a commit to csm10495/cpython that referenced this pull request Sep 28, 2023
Fix copy_source_tree() function of test_tools.test_freeze:

* Don't copy SRC_DIR/build/ anymore. This directory is modified by
  other tests running in parallel.
* Add test.support.copy_python_src_ignore().
* Use sysconfig to get the source directory.
* Use sysconfig.get_config_var() to get CONFIG_ARGS variable.
Yhg1s pushed a commit that referenced this pull request Oct 2, 2023
gh-109615: Fix test_tools.test_freeze SRCDIR (#109935)

Fix copy_source_tree() function of test_tools.test_freeze:

* Don't copy SRC_DIR/build/ anymore. This directory is modified by
  other tests running in parallel.
* Add test.support.copy_python_src_ignore().
* Use sysconfig to get the source directory.
* Use sysconfig.get_config_var() to get CONFIG_ARGS variable.

(cherry picked from commit 1512d6c)
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Fix copy_source_tree() function of test_tools.test_freeze:

* Don't copy SRC_DIR/build/ anymore. This directory is modified by
  other tests running in parallel.
* Add test.support.copy_python_src_ignore().
* Use sysconfig to get the source directory.
* Use sysconfig.get_config_var() to get CONFIG_ARGS variable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants