[issue44126] Support cross-compiling of cpython modules using setuptools
Change by Jeff Moguillansky : -- status: open -> closed ___ Python tracker <https://bugs.python.org/issue44126> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44126] Support cross-compiling of cpython modules using setuptools
Jeff Moguillansky added the comment: Is it possible to add support for cross-compiling of cpython modules to setuptools? It seems that currently there's some 3rd party solutions like "crossenv" but they don't seem to work with clang / ndk-toolchain for example. -- status: closed -> open title: Cross Compile CPython Modules -> Support cross-compiling of cpython modules using setuptools ___ Python tracker <https://bugs.python.org/issue44126> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44126] Cross Compile CPython Modules
Jeff Moguillansky added the comment: Thanks for the info, I will forward the question to the setuptools mailing list -- status: open -> closed ___ Python tracker <https://bugs.python.org/issue44126> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44126] Cross Compile CPython Modules
Change by Jeff Moguillansky : -- status: closed -> open ___ Python tracker <https://bugs.python.org/issue44126> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44126] Cross Compile CPython Modules
Change by Jeff Moguillansky : -- title: Cross Compile Cython Modules -> Cross Compile CPython Modules ___ Python tracker <https://bugs.python.org/issue44126> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44126] Cross Compile Cython Modules
Jeff Moguillansky added the comment: Sorry I meant cpython. Distutils is part of cpython? Currently it doesn't seem to support cross compiling? On Thu, May 13, 2021, 1:08 PM Ned Deily wrote: > > Ned Deily added the comment: > > This issue tracker is for issues with cPython and the Python Standard > Library. Cython is a third-party project that is not part of cPython. You > should ask in a Cython forum (see https://cython.org/#development) or a > general forum like StackOverflow. > > -- > nosy: +ned.deily > resolution: -> third party > stage: -> resolved > status: open -> closed > > ___ > Python tracker > <https://bugs.python.org/issue44126> > ___ > -- ___ Python tracker <https://bugs.python.org/issue44126> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44126] Cross Compile Cython Modules
New submission from Jeff Moguillansky : Hi, I was able to cross-compile Python 3.9.4 for Android. How do I cross-compile cython modules? I found one tool online: https://pypi.org/project/crossenv/ but it doesn't seem to be compatible with android clang? Does cython support cross-compiling modules? -- components: Cross-Build messages: 393599 nosy: Alex.Willmer, jmoguill2 priority: normal severity: normal status: open title: Cross Compile Cython Modules versions: Python 3.9 ___ Python tracker <https://bugs.python.org/issue44126> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43437] venv activate bash script has wrong line endings on windows
New submission from Jeff Moguillansky : when running python.exe -m venv on Windows, It creates several activate scripts. The activate bash script has the wrong line endings (it should be unix-style, not windows-style). Bash scripts should always end with unix style line endings -- components: Windows messages: 388276 nosy: jmoguill2, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: venv activate bash script has wrong line endings on windows type: compile error versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue43437> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43173] Python Windows DLL search paths
Jeff Moguillansky added the comment: Thanks for the feedback On Mon, Feb 8, 2021, 8:29 PM Eryk Sun wrote: > > Eryk Sun added the comment: > > > What's the correct way to set the DLL search path when running a python > script? > > If possible, the simplest approach is to put dependent DLLs in the same > directory as the extension module. > > In 3.8+, the search path for the dependent DLLs of a normally imported > extension module includes the following directories: > > * the loaded extension module's directory > * the application directory (e.g. that of python.exe) > * the user DLL search directories that get added by > SetDllDirectory() and AddDllDirectory(), such as with > os.add_dll_directory() > * %SystemRoot%\System32 > > Note that the above list does not include the current working directory or > %PATH% directories. > > > It would be helpful if it listed the actual name of > > the DLL that it cannot find. > > WinAPI LoadLibraryExW() doesn't have an out parameter to get the missing > DLL or procedure name that caused the call to fail. All we have is the > error code to report, such as ERROR_MOD_NOT_FOUND (126) and > ERROR_PROC_NOT_FOUND (127). Using a debugger, you can see the name of the > missing DLL or procedure if loader snaps are enabled for the application. > > -- > nosy: +eryksun > > ___ > Python tracker > <https://bugs.python.org/issue43173> > ___ > -- ___ Python tracker <https://bugs.python.org/issue43173> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43173] Python Windows DLL search paths
New submission from Jeff Moguillansky : Hi, What's the correct way to set the DLL search path when running a python script? It seems that it doesn't search the directories specified in PATH environment variable. FYI: For debugging the DLL loading issues, I'm using "Process Monitor" from sysinternals: https://docs.microsoft.com/en-us/sysinternals/downloads/procmon, but please share any tips if you have a better approach. Also, the Python error message is not very informative: when loading a python module (built using Cython), if it fails to load a specific DLL, it says "import module failed, DLL not found" but it doesn't say the name of the actual DLL that is not found. It would be helpful if it listed the actual name of the DLL that it cannot find. -- components: Windows messages: 386688 nosy: jmoguill2, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Python Windows DLL search paths type: behavior versions: Python 3.10, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue43173> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42894] Debugging native Python modules on Windows with Visual Studio Toolchain
New submission from Jeff Moguillansky : I have a question regarding debugging native Python modules on Windows, with Visual Studio toolchain: Currently I have a native module (native C code), along with Python API bindings (via Cython), and finally Python code that invokes the native module. I also use various third-party python modules like Pillow, etc. In order to debug on Windows, I have to use the following tricks: 1) Build the native module in Release Mode 2) Disable Compiler Optimization 3) Enable Debug symbols I can't just use Python distutils out of the box, I have to manually modify the build commands to enable Debugging. If I just try to build the native module in Debug mode, I get Visual Studio compile errors related to: not being able to mix code built with different C++ runtime libraries. Some of the 3rd-party Python modules are only available as Release builds (not Debug builds). I'm wondering if anyone has encountered a similar issue, and what's your advice? On Linux, GNU toolchain, this isn't an issue. The toolchain lets you mix release and debug libraries, no problem. -- components: C API messages: 384853 nosy: jmoguill2 priority: normal severity: normal status: open title: Debugging native Python modules on Windows with Visual Studio Toolchain type: compile error versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue42894> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42863] Python venv inconsistent folder structure on windows
Jeff Moguillansky added the comment: Thanks for the feedback, I understand -- ___ Python tracker <https://bugs.python.org/issue42863> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42863] Python venv inconsistent folder structure on windows
Jeff Moguillansky added the comment: Maybe we can consider adding additional params and a new code path to python -m venv? This way we don't break any existing functionality? e.g. -includedir=... -libdir=... -bindir=... ? -- ___ Python tracker <https://bugs.python.org/issue42863> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42863] Python venv inconsistent folder structure on windows
Jeff Moguillansky added the comment: To give more context regarding this issue: I'm currently using meson build system to generate the pkg-config files, and it seems that the paths "include", "lib" are hardcoded. >From the perspective of the overall system, I think it would simplify >integration and reduce complexity if we normalize folder structures across >platforms instead of having different folder structures. -- ___ Python tracker <https://bugs.python.org/issue42863> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42863] Python venv inconsistent folder structure on windows
New submission from Jeff Moguillansky : When creating a virtual environment on windows using venv, the folder structure: "Scripts", "Include", "Lib", is inconsistent with other platforms (e.g. "include", "lib", "bin", etc). This causes various integration issues. For example, suppose we want to build a native C library, and install it to the folder structure generated by the virtual environment. The pkg-config file assumes a folder structure of "include", "lib", "bin", and the generated pkg-config files are inconsistent with the python virtual environment folder structure. Can we have a consistent folder structure across platforms? -- components: Windows messages: 384628 nosy: jmoguill2, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Python venv inconsistent folder structure on windows type: behavior versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue42863> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42338] Enable Debug Build For Python Native Modules in Windows, with Visual Studio Toolchain
New submission from Jeff Moguillansky : Hi, We developed a Python module that interfaces with native code via Cython. We currently build on Windows with Visual Studio Toolchain. We encounter the following issues when trying to build a debug version: 1) 3rd party modules installed via PIP are Release mode, but Visual Studio toolchain doesn't allow to mix Debug and Release libs. To workaround this issue, we build our module in "Release" mode, with debug symbols enabled, and with compiled optimization disabled (essentially a hack). 2) To build our module we currently use the following hack: step 1: run python.exe setup.py build --compiler=msvc step 2: extract the output step 3: change /Ox to /Od (disable compiler optimization) add /Zi flag to compiler flags (enable debug symbols) add /DEBUG flag to linker flags Please advise what is the best solution? -- components: Build messages: 380861 nosy: jmoguill2 priority: normal severity: normal status: open title: Enable Debug Build For Python Native Modules in Windows, with Visual Studio Toolchain type: compile error versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue42338> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com