-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
Compile sysconfig
's data
#742
base: main
Are you sure you want to change the base?
Compile sysconfig
's data
#742
Conversation
…nda-forge-pinning 2024.11.13.19.27.51
It appears `sysconfig`'s data doesn't get compiled until install time, which results in a file modification after installation. This can throw up red flags in certain install environments and when using `conda doctor`. To address this, `import sysconfig` and run `sysconfig.get_config_vars()`, which loads the data file as a `dict`. This should compile the data file. Also `pprint` the data for additional debug information/validation.
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
python -c "import compileall,os;compileall.compile_dir(os.environ['PREFIX'])" | ||
python -c "import pprint, sysconfig; pprint(sysconfig.get_config_vars())" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As there is a fair bit of logic above to handle the generation of sysconfig
data (and possibly additional considerations for cross-compilation), there may be a better approach than this. Open to suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the line above this not sufficient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see this comment: #741 (comment)
That thread and links have more details
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That thread is about a file being changed. Specifically lib/python3.12/__pycache__/_sysconfigdata__linux_aarch64-linux-gnu.cpython-312.pyc
. Line 537 above already does this, so your changes just doesn't do anything.
:: Ensure `sysconfig`'s data is also compiled | ||
%PREFIX%\python.exe -c "import pprint, sysconfig; pprint(sysconfig.get_config_vars())" | ||
if %errorlevel% neq 1 exit /b 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows doesn't seem to have the same complexities as the UNIX builds. So think this is probably sufficient here
@conda-forge-admin please rerender |
Hi! This is the friendly automated conda-forge-webservice. I tried to rerender for you, but it looks like I wasn't able to push to the NOTE: Our webservices cannot push to PRs from organization accounts or PRs from forks made from organization forks because of GitHub permissions. Please fork the feedstock directly from conda-forge into your personal GitHub account. This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/12027320169. Examine the logs at this URL for more detail. |
It appears
sysconfig
's data doesn't get compiled until install time, which results in a file modification after installation. This can throw up red flags in certain install environments and when usingconda doctor
. To address this,import sysconfig
and runsysconfig.get_config_vars()
, which loads the data file as adict
. This should compile the data file.Also
pprint
the data for additional debug information/validation.Checklist
0
(if the version changed)conda-smithy
(Use the phrase@conda-forge-admin, please rerender
in a comment in this PR for automated rerendering)Fixes #741