Skip to content

Commit

Permalink
psfgh-187: Support environment variables PYTHON_GIL / PYTHON_CPU_COUNT
Browse files Browse the repository at this point in the history
  • Loading branch information
corona10 committed May 11, 2024
1 parent 555a168 commit 68c3304
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ['3.12']
python: ['3.13-dev']
include:
- os: ubuntu-latest
python: 'pypy3.12'
- os: ubuntu-latest
python: 'pypy3.11'
- os: ubuntu-latest
python: 'pypy3.10'
- os: ubuntu-latest
Expand Down
6 changes: 4 additions & 2 deletions pyperf/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,10 @@ 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"]
# TODO: In the future, maybe we should manage CPython environment variables
# depending on the Python version.
copy_env.extend(["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 68c3304

Please sign in to comment.