[issue36539] Distutils VC 6.0 Errors When Using mingw-w64 GCC

2019-04-06 Thread Dan Yeaw


Dan Yeaw  added the comment:

lazka: Thanks for you response. You are correct, the issue was that I had a pip 
installed version of setuptools somehow. It sounds like you think that all 
issues should go downstream to fixing them in the MINGW-packages. I am OK with 
this, it just seams like there are many many issues with Python in MSYS2. 
Basics like virtualenvs aren't currently working at all. I will start 
submitting the issues I am having there with proposed fixes, and then we can 
push them upstream if we think there are things that the core Python team can 
help out with.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36539] Distutils VC 6.0 Errors When Using mingw-w64 GCC

2019-04-06 Thread Christoph Reiter


Christoph Reiter  added the comment:

MSYS2 patches setuptools to work with GCC and the MSYS2 Python, so you can't 
use setuptools as is from pip.

See 
https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-python-setuptools 
for the current set of patches.

--
nosy: +lazka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36539] Distutils VC 6.0 Errors When Using mingw-w64 GCC

2019-04-05 Thread Dan Yeaw


New submission from Dan Yeaw :

I am using the mingw-w64-x86_64-python3 in MSYS2 on Windows to package a 
PyGObject app. When I try to pip install the app, I am getting errors about the 
VC 6.0 isn't supported.

It looks like setuptools is trying to patch distutils msvc. The msvc9compiler 
module in distutils uses a get_build_version function to get the version of 
MSVC on the system. This version of Python 3 is compiled with GCC 8.3.0 so the 
function doesn't find the "MSC v." prefix and returns version 6.

Here is the full error:

$ pip install -e .
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... error
  Complete output from command C:/tools/msys64/mingw64/bin/python3.exe 
C:/tools/msys64/mingw64/lib/python3.7/site-packages\pip install 
--ignore-installed --no-user --prefix 
C:/Users/dyeaw/AppData/Local/Temp/pip-build-env-bfwge_92/normal 
--no-warn-script-location --no-binary :none: --only-binary :none: -i 
https://pypi.org/simple -- gaphas>=1.0.0,<2.0.0 PyGObject>=3.30,<4.0 
pycairo>=1.18,<2.0 zope.component>=4.5,<5.0:
  Collecting gaphas<2.0.0,>=1.0.0
Using cached 
https://files.pythonhosted.org/packages/68/1d/4c8501535889538fe2144b5b8836fa2b3296e06d4a3d9f7e4e7e8cc1e90f/gaphas-1.0.0-py2.py3-none-any.whl
  Collecting PyGObject<4.0,>=3.30
Using cached 
https://files.pythonhosted.org/packages/0b/fd/56ac6898afc5c7f5718026103bd8f0b44714b6f79ac20d7eb8990c9a7eab/PyGObject-3.32.0.tar.gz
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
Complete output from command C:/tools/msys64/mingw64/bin/python3.exe 
C:/tools/msys64/mingw64/lib/python3.7/site-packages/pep517/_in_process.py 
get_requires_for_build_wheel C:/Users/dyeaw/AppData/Local/Temp/tmp8lre6w7i:
Traceback (most recent call last):
  File 
"C:/tools/msys64/mingw64/lib/python3.7/site-packages/pep517/_in_process.py", 
line 207, in 
main()
  File 
"C:/tools/msys64/mingw64/lib/python3.7/site-packages/pep517/_in_process.py", 
line 197, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
  File 
"C:/tools/msys64/mingw64/lib/python3.7/site-packages/pep517/_in_process.py", 
line 48, in get_requires_for_build_wheel
backend = _build_backend()
  File 
"C:/tools/msys64/mingw64/lib/python3.7/site-packages/pep517/_in_process.py", 
line 34, in _build_backend
obj = import_module(mod_path)
  File "C:/tools/msys64/mingw64/lib/python3.7\importlib\__init__.py", line 
127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1006, in _gcd_import
  File "", line 983, in _find_and_load
  File "", line 953, in _find_and_load_unlocked
  File "", line 219, in 
_call_with_frames_removed
  File "", line 1006, in _gcd_import
  File "", line 983, in _find_and_load
  File "", line 967, in _find_and_load_unlocked
  File "", line 677, in _load_unlocked
  File "", line 728, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File 
"C:/Users/dyeaw/AppData/Local/Temp/pip-build-env-5pamh2nb/overlay/lib/python3.7/site-packages\setuptools\__init__.py",
 line 228, in 
monkey.patch_all()
  File 
"C:/Users/dyeaw/AppData/Local/Temp/pip-build-env-5pamh2nb/overlay/lib/python3.7/site-packages\setuptools\monkey.py",
 line 101, in patch_all
patch_for_msvc_specialized_compiler()
  File 
"C:/Users/dyeaw/AppData/Local/Temp/pip-build-env-5pamh2nb/overlay/lib/python3.7/site-packages\setuptools\monkey.py",
 line 164, in patch_for_msvc_specialized_compiler
patch_func(*msvc9('find_vcvarsall'))
  File 
"C:/Users/dyeaw/AppData/Local/Temp/pip-build-env-5pamh2nb/overlay/lib/python3.7/site-packages\setuptools\monkey.py",
 line 151, in patch_params
mod = import_module(mod_name)
  File "C:/tools/msys64/mingw64/lib/python3.7\importlib\__init__.py", line 
127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1006, in _gcd_import
  File "", line 983, in _find_and_load
  File "", line 967, in _find_and_load_unlocked
  File "", line 677, in _load_unlocked
  File "", line 728, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File "C:/tools/msys64/mingw64/lib/python3.7\distutils\msvc9compiler.py", 
line 296, in 
raise DistutilsPlatformError("VC %0.1f is not supported by this module" 
% VERSION)
distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this 
module

Others are getting this error as well: 
https://stackoverflow.com/questions/52166914/msys2-mingw64-pip-vc-6-0-is-not-supported-by-this-module

One way to fix may be to not raise the error if it occurs:
VERSION = get_build_version()
if VERSION < 8.0:
-raise