Skip to content

Commit

Permalink
gh-187: Support environment variables PYTHON_GIL / PYTHON_CPU_COUNT (#…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
corona10 authored May 13, 2024
1 parent 555a168 commit 127e0bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pyperf/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,9 @@ def create_environ(inherit_environ, locale, copy_all):
if copy_all:
return os.environ
env = {}

copy_env = ["PATH", "PYTHONPATH", "HOME", "TEMP", "COMSPEC", "SystemRoot", "SystemDrive"]
copy_env = ["PATH", "HOME", "TEMP", "COMSPEC", "SystemRoot", "SystemDrive",
# Python specific variables
"PYTHONPATH", "PYTHON_CPU_COUNT", "PYTHON_GIL"]
if locale:
copy_env.extend(('LANG', 'LC_ADDRESS', 'LC_ALL', 'LC_COLLATE',
'LC_CTYPE', 'LC_IDENTIFICATION', 'LC_MEASUREMENT',
Expand Down

0 comments on commit 127e0bd

Please sign in to comment.