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 ( |
| # Compile all Python files | ||
| # Ensure `sysconfig`'s data is also compiled | ||
| 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.
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.
Why is the line above this not sufficient?
There was a problem hiding this comment.
Please see this comment: #741 (comment)
That thread and links have more details
There was a problem hiding this comment.
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.
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 sysconfigand runsysconfig.get_config_vars(), which loads the data file as adict. This should compile the data file.Also
pprintthe data for additional debug information/validation.Checklist
0(if the version changed)conda-smithy(Use the phrase@conda-forge-admin, please rerenderin a comment in this PR for automated rerendering)Fixes #741