Skip to content

Commit 127e0bd

Browse files
authored
gh-187: Support environment variables PYTHON_GIL / PYTHON_CPU_COUNT (#188)
* gh-187: Support environment variables PYTHON_GIL / PYTHON_CPU_COUNT * Update * Update CI * update * Update * Address code review * Address code review * Revert CI file
1 parent 555a168 commit 127e0bd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pyperf/_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,9 @@ def create_environ(inherit_environ, locale, copy_all):
266266
if copy_all:
267267
return os.environ
268268
env = {}
269-
270-
copy_env = ["PATH", "PYTHONPATH", "HOME", "TEMP", "COMSPEC", "SystemRoot", "SystemDrive"]
269+
copy_env = ["PATH", "HOME", "TEMP", "COMSPEC", "SystemRoot", "SystemDrive",
270+
# Python specific variables
271+
"PYTHONPATH", "PYTHON_CPU_COUNT", "PYTHON_GIL"]
271272
if locale:
272273
copy_env.extend(('LANG', 'LC_ADDRESS', 'LC_ALL', 'LC_COLLATE',
273274
'LC_CTYPE', 'LC_IDENTIFICATION', 'LC_MEASUREMENT',

0 commit comments

Comments
 (0)