-
-
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
:: 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
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