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-91985: Ensure in-tree builds override platstdlib_dir in every path calculation#93641

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
zooba merged 19 commits intopython:mainfromneonene:intree
Jun 16, 2022
Merged
Changes from1 commit
Commits
Show all changes
19 commits
Select commitHold shift + click to select a range
1ae7f87
gh-91985: Ensure in-tree builds override platstdlib_dir in every path…
neoneneJun 9, 2022
0be59f2
test, etc.
neoneneJun 11, 2022
19fb85d
less redundant test
neoneneJun 11, 2022
f336113
Fix test (place a landmark)
neoneneJun 11, 2022
0e75c9c
assert()
neoneneJun 12, 2022
0df156b
add case
neoneneJun 12, 2022
b085759
add platstdlib_dir
neoneneJun 12, 2022
bc861bf
reword
neoneneJun 13, 2022
5cb5e2b
remove test
neoneneJun 13, 2022
3051b55
new test case in test_embed
neoneneJun 13, 2022
4f08be9
reword
neoneneJun 13, 2022
6bb3323
rerun test
neoneneJun 13, 2022
19e1428
apply suggested changes
neoneneJun 14, 2022
1919590
move stdlib upper
neoneneJun 14, 2022
8b15917
comment, etc.
neoneneJun 15, 2022
bf5bc28
less lines
neoneneJun 15, 2022
39c851c
putenv()
neoneneJun 15, 2022
500cb81
move comment upper
neoneneJun 15, 2022
7636f73
a comment
neoneneJun 16, 2022
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
PrevPrevious commit
NextNext commit
comment, etc.
  • Loading branch information
@neonene
neonene committedJun 15, 2022
commit8b1591780bc6c10072381a14aaf4d26daedeb949
24 changes: 10 additions & 14 deletionsLib/test/test_embed.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1304,7 +1304,7 @@ def test_init_setpythonhome(self):
api=API_COMPAT, env=env)

def test_init_is_python_build_with_home(self):
# Test _Py_path_config._is_python_buildfield (gh-91985)
# Test _Py_path_config._is_python_buildconfiguration (gh-91985)
config = self._get_expected_config()
paths = config['config']['module_search_paths']
paths_str = os.path.pathsep.join(paths)
Expand DownExpand Up@@ -1348,24 +1348,20 @@ def test_init_is_python_build_with_home(self):

env['NEGATIVE_ISPYTHONBUILD'] = '0'
config['_is_python_build'] = 1

exedir = os.path.dirname(sys.executable)
with open(os.path.join(exedir, 'pybuilddir.txt'), encoding='utf8') as f:
platstdlib = os.path.join(exedir, f'{f.read()}\n$'.splitlines()[0])
platstdlib = os.path.normpath(platstdlib)

platstdlib = os.path.normpath(os.path.join(exedir,
f'{f.read()}\n$'.splitlines()[0]))
if MS_WINDOWS:
expected_paths = [paths[0], stdlib, platstdlib]
expected_paths[2] = platstdlib
else:
# PREFIX (default) is set when running in build directory
prefix = exec_prefix = sys.prefix
# stdlib calculation (/Lib) is not yet supported.
stdlib = os.path.join(home, sys.platlibdir, f'python{version}')
expected_paths = [self.module_search_paths(prefix=prefix)[0],
stdlib, platstdlib]

config.update(module_search_paths=expected_paths,
prefix=prefix, base_prefix=prefix,
exec_prefix=exec_prefix, base_exec_prefix=exec_prefix)
# stdlib calculation (/Lib) is not yet supported
expected_paths[0] = self.module_search_paths(prefix=prefix)[0]
expected_paths[2] = platstdlib
config.update(prefix=prefix, base_prefix=prefix,
exec_prefix=exec_prefix, base_exec_prefix=exec_prefix)
self.check_all_configs("test_init_is_python_build", config,
api=API_COMPAT, env=env)

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp