You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/11/03 01:00:36 UTC

[jira] [Commented] (PROTON-2645) pip install fails on Windows

    [ https://issues.apache.org/jira/browse/PROTON-2645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17628040#comment-17628040 ] 

ASF subversion and git services commented on PROTON-2645:
---------------------------------------------------------

Commit 3f13a38e0648a1dc19d94ea88bde387f750752f7 in qpid-proton's branch refs/heads/main from Andrew Stitcher
[ https://gitbox.apache.org/repos/asf?p=qpid-proton.git;h=3f13a38e0 ]

PROTON-2645: Allow pip to install python binding on Windows

The issue seems to be that the python setup.py uses absolute paths to
refer to the C source that is being compiled and these long paths get
propagated to the compiler to refer to the files. In some configurations
the absolute path is too long for the system limits on path length and
the compile fails.

This fix attempts to construct a much shorter relative path to the files
to compile and so not fall foul of the path length restrictions.


> pip install fails on Windows
> ----------------------------
>
>                 Key: PROTON-2645
>                 URL: https://issues.apache.org/jira/browse/PROTON-2645
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: python-binding
>    Affects Versions: proton-c-0.37.0
>         Environment: Windows - tested with VS 2022 python 3.7 and 3.9
>            Reporter: Andrew Stitcher
>            Assignee: Andrew Stitcher
>            Priority: Blocker
>             Fix For: proton-c-0.38.0
>
>
> Running {{pip install python-qpid-proton}} fails on windows:
> {noformat}
> (py3-qpid) PS C:\Users\andrew> pip install python-qpid-proton
> Collecting python-qpid-proton
>   Using cached python-qpid-proton-0.37.0.tar.gz (406 kB)
>   Preparing metadata (setup.py) ... done
> Building wheels for collected packages: python-qpid-proton
>   Building wheel for python-qpid-proton (setup.py) ... error
>   error: subprocess-exited-with-error
>   × python setup.py bdist_wheel did not run successfully.
>   │ exit code: 1
>   ╰─> [20 lines of output]
>       running bdist_wheel
>       running build
>       running build_py
>       running build_ext
>       running configure
>       Warning: command not found: pkg-config
>       Building the bundled proton-c sources into the extension
>       Warning: command not found: pkg-config
>       Warning: Windows - only the ANONYMOUS and PLAIN mechanisms will be supported!
>       creating build
>       creating build\temp.win-amd64-cpython-39
>       creating build\temp.win-amd64-cpython-39\Release
>       creating build\temp.win-amd64-cpython-39\Release\Users
>       creating build\temp.win-amd64-cpython-39\Release\Users\andrew
>       creating build\temp.win-amd64-cpython-39\Release\Users\andrew\AppData
>       creating build\temp.win-amd64-cpython-39\Release\Users\andrew\AppData\Local
>       creating build\temp.win-amd64-cpython-39\Release\Users\andrew\AppData\Local\Temp
>       creating build\temp.win-amd64-cpython-39\Release\Users\andrew\AppData\Local\Temp\pip-install-ain0y2q_
>       creating build\temp.win-amd64-cpython-39\Release\Users\andrew\AppData\Local\Temp\pip-install-ain0y2q_\python-qpid-proton_7447c3632f834facaa5fa7f17754f697
>       error: could not create 'build\temp.win-amd64-cpython-39\Release\Users\andrew\AppData\Local\Temp\pip-install-ain0y2q_\python-qpid-proton_7447c3632f834facaa5fa7f17754f697': The filename or extension is too long
>       [end of output]
>   note: This error originates from a subprocess, and is likely not a problem with pip.
>   ERROR: Failed building wheel for python-qpid-proton
>   Running setup.py clean for python-qpid-proton
> Failed to build python-qpid-proton
> Installing collected packages: python-qpid-proton
>   Running setup.py install for python-qpid-proton ... error
>   error: subprocess-exited-with-error
>   × Running setup.py install for python-qpid-proton did not run successfully.
>   │ exit code: 1
>   ╰─> [22 lines of output]
>       running install
>       C:\Users\andrew\Documents\py3-qpid\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
>         warnings.warn(
>       running build
>       running build_py
>       running build_ext
>       running configure
>       Warning: command not found: pkg-config
>       Building the bundled proton-c sources into the extension
>       Warning: command not found: pkg-config
>       Warning: Windows - only the ANONYMOUS and PLAIN mechanisms will be supported!
>       creating build
>       creating build\temp.win-amd64-cpython-39
>       creating build\temp.win-amd64-cpython-39\Release
>       creating build\temp.win-amd64-cpython-39\Release\Users
>       creating build\temp.win-amd64-cpython-39\Release\Users\andrew
>       creating build\temp.win-amd64-cpython-39\Release\Users\andrew\AppData
>       creating build\temp.win-amd64-cpython-39\Release\Users\andrew\AppData\Local
>       creating build\temp.win-amd64-cpython-39\Release\Users\andrew\AppData\Local\Temp
>       creating build\temp.win-amd64-cpython-39\Release\Users\andrew\AppData\Local\Temp\pip-install-ain0y2q_
>       creating build\temp.win-amd64-cpython-39\Release\Users\andrew\AppData\Local\Temp\pip-install-ain0y2q_\python-qpid-proton_7447c3632f834facaa5fa7f17754f697
>       error: could not create 'build\temp.win-amd64-cpython-39\Release\Users\andrew\AppData\Local\Temp\pip-install-ain0y2q_\python-qpid-proton_7447c3632f834facaa5fa7f17754f697': The filename or extension is too long
>       [end of output]
>   note: This error originates from a subprocess, and is likely not a problem with pip.
> error: legacy-install-failure
> × Encountered error while trying to install package.
> ╰─> python-qpid-proton
> note: This is an issue with the package mentioned above, not pip.
> hint: See above for output from the failure.
> (py3-qpid) PS C:\Users\andrew>
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org