-
-
Notifications
You must be signed in to change notification settings - Fork 254
WIP: Rename stdlib _queue init if gevent present #192
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
Conversation
|
@jayvdb could you please provide more context on why this is needed? I just want to understand why we need to do this... |
|
@indygreg this PR is irrelevant until #183 is merged. And the problem this PR fixes is documented fairly well on that PR, but it is only a workaround until rust crate |
This causes the .obj files to be unparsable by editbin, dumpbin, nm, objcopy, goblin and object. Related to indygreg#169
Built extensions in packages often have common names like speedups, utils, _objects, cpython, etc. which reside inside the package namespace. The compiled extensions each have a PyInit_<module> which needs to be renamed to PyInit_<pkg>_<module> to avoid clashes when combined into a static binary. Fixes indygreg#169
Python import of simplejson fails with a UnicodeDecodeError on macOS-10.14 when its PyInit symbol is renamed.
cffi includes a near replica of the CPython 3.7's libffi on MSVC, which needs to be discard to avoid duplicate syms.
Replace pip install --target with venvs. As setuptools breakes out of the venv to load distutils build_ext command, first create a copy of the Python distribution and hack it. This also allows venv's to be populated manually outside of PyOxidizer's config, while retaining the ability for PyOxidizer to pick up and include any built object files. To facilitate that, the PyOxidizer state dir where objects are stored is a constant in the distutils compiler modules and in the Rust source. Also add venv_path to PipRequirementsFile, allowing the same venv to be incrementally populated in multiple rules, and the venv re-used across PyOxidizer build runs. Fixes indygreg#162 Fixes indygreg#170 Closes indygreg#194
Unsure why this is necessary; as it wasnt needed before
These libs are already in the static python3 binary so shouldnt be linked in shared libraries used during build dependencies.
The Windows standalone distribution doesnt include venv and presents other difficulties when running setup.py in the venv's due to various build dependencies fail.
cffi includes a near replica of the CPython 3.7's libffi on MSVC, which needs to be discard to avoid duplicate syms.
It isnt being used at the moment, as it doesnt align with a venv based solution, and pip.rs doesnt yet support the setup.py rule which is critical for working around various problems.
greenlet includes a pre-built .obj that is not re-built during the package build, and needs to be included in the static build process.
gevent._queue conflicts with stdlib _queue. One of their PyInit__queue symbols needs to be renamed. Due to missing features in the rust crate `object`, the gevent objects can not be processed. So the stdlib _queuemodule object is modified instead.
Need unreleased fix for COFF.
This is not needed for gevent, as we are rewriting the stdlib symbol, however it is a preventative measure for other symbol clashes which might require rewriting.
Specifially needed to workaround multiple __real@ caused by using rust crate object processing of stdlib queuemodule.obj. It also solves conflicts like stdlib ffi.obj vs cffi libffi.
|
This special case has been fixed upstream in gimli-rs/object#159 , so doesnt need a workaround here. Just need to wait for the next release of |
This depends on #183