msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.28k stars 1.22k forks source link

Using {envpython} in a tox configuration file does not work on MINGW #7261

Open eine opened 3 years ago

eine commented 3 years ago

Coming from #7014.

https://github.com/msys2/MINGW-packages/issues/7014#issuecomment-724049058

Steps for reproducing locally: https://github.com/msys2/MINGW-packages/issues/7014#issuecomment-724117458

https://github.com/msys2/MINGW-packages/issues/7014#issuecomment-724137686 This issue looks like {envpython} doesn't work with MINGW, it is looking for python in Scripts instead of bin. If you run tox on a project that doesn't use {envpython} in the config, it should work fine. We should try to work with the tox project to fix this upstream.

/cc @danyeaw @gaborbernat

revelator commented 3 years ago

Yep i noticed this as well, seems some python ports still use the original windows build locations where scripts is indeed located in the root of the directory eg. C:\python\scripts

eine commented 3 years ago

Surprisingly, this is now working on CI if tox is installed through pip, but not through pacman. See https://github.com/eine/vunit/actions/runs/865359040 (https://github.com/eine/vunit/blob/ci/tox/.github/workflows/tox.yml). However, I cannot reproduce it locally. This is the error I get locally, on a fresh MSYS2 installation:

# tox -e py39-lint -- --color=yes
.package recreate: T:/vunit/vunit/.tox/.package
.package installdeps: setuptools >= 35.0.2, setuptools_scm >= 2.0.0, <3
ERROR: invocation failed (exit code 1), logfile: T:/vunit/vunit/.tox/.package/log/.package-2.log
================================================= log start ==================================================
running egg_info
writing vunit_hdl.egg-info/PKG-INFO
writing dependency_links to vunit_hdl.egg-info/dependency_links.txt
writing requirements to vunit_hdl.egg-info/requires.txt
writing top-level names to vunit_hdl.egg-info/top_level.txt
adding license file 'LICENSE.rst' (matched pattern 'LICEN[CS]E*')
error: [WinError 267] The directory name is invalid

================================================== log end =================================================== 
ERROR: FAIL could not package project - v = InvocationError("T:/vunit/vunit/.tox/.package/bin/python C:/msys64/mingw64/lib/python3.8/site-packages/tox/helper/build_requires.py setuptools.build_meta '' ''", 1)

@naveen521kk @Biswa96 any guess?