[issue5043] get_msvcr() returns None rather than []

2022-03-04 Thread Alex Zunegin


Alex Zunegin  added the comment:

This messes up building Cython extensions on MSYS2 and MINGW. Still here as of 
setuptools 60. 

There is no line 
```
return [] -
```
at the end. Adding it helps.

--
nosy: +gesserat

___
Python tracker 

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



[issue5043] get_msvcr() returns None rather than []

2020-10-22 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The claimed bug is that when msc_pos is -1 in the code as posted, 'return []' 
should be executed, but None is returned instead.  When I add 'msc_pos = -1 
before the if statement, and call the function, after adding the needed sys 
import, [] is indeed returned.

The final elif return has two bugs, '%i' and 'Ver':
raise ValueError("Unknown MS Compiler version %i " % msc_Ver)  # Posted
raise ValueError("Unknown MS Compiler version %s " % msc_ver)  # Fixed

With this fix and without -1 forced, the ValueError is raised on all current 
versions, so this code is out of date in any case.

--
nosy: +terry.reedy
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



[issue5043] get_msvcr() returns None rather than []

2011-06-01 Thread Ralf Schmitt

Changes by Ralf Schmitt sch...@gmail.com:


--
nosy: +schmir

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5043
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5043] get_msvcr() returns None rather than []

2011-05-29 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Thanks for explaining.

 a) NoneType object is not iterable. If the function don't return empty list
 later distutil will fail

Possible fix: self.dll_libraries = get_msvcr() or []

 method for detection of a msvc runtime is not correct. If the method
 return a library GCC will link to two c-runtimes. Also some function
 dearation are not visible if is not specified appropriate
 preprocessor directive.

Can you propose fixes for those?  Also, how to test it?

 So I could not found reason this method to exist .

“Include the appropriate MSVC runtime library if Python was built with MSVC 7.0 
or later.”

--
versions: +Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5043
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5043] get_msvcr() returns None rather than []

2010-11-28 Thread Roumen Petrov

Roumen Petrov bugtr...@roumenpetrov.info added the comment:

a) NoneType object is not iterable. If the function don't return empty list 
later distutil will fail on the lines like  libraries.extend(self.dll_libraries)

b) method for detection of a msvc runtime is not correct. If the method return 
a library GCC will link to two c-runtimes. Also some function dearation are not 
visible if is not specified appropriate preprocessor directive.

So I could not found reason this method to exist .

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5043
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5043] get_msvcr() returns None rather than []

2010-11-27 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Can you explain what the bug is?  Thanks in advance.

--
assignee:  - eric.araujo
components: +Distutils, Distutils2 -Build
nosy: +eric.araujo
versions: +3rd party, Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5043
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5043] get_msvcr() returns None rather than []

2010-11-27 Thread Luke Kenneth Casson Leighton

Luke Kenneth Casson Leighton l...@lkcl.net added the comment:

i'm really sorry, eric, but the decision to ban me from interacting with python 
developers for 18 months+ has left me with zero working knowledge of many of 
these complex issues which i was heavily and actively involved in at the time, 
and could have answered immediately.

the opportunity to interact with me and to move the mingw32 port forward was 
at the time, not 18+ months later.

i've since *removed* the highly complex development environment which was 
tricky as hell to set up (mingw32 cross compiler, mingw32 native compiler, 
python, native python, wine, MSYS under wine, python-win32 under wine) because 
it was declared that the work being carried out was worthless.

i'll have to leave it to roumen to answer this one.

l.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5043
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5043] get_msvcr() returns None rather than []

2009-01-24 Thread Luke Kenneth Casson Leighton

New submission from Luke Kenneth Casson Leighton l...@lkcl.net:

def get_msvcr():
Include the appropriate MSVC runtime library if Python was built
with MSVC 7.0 or later.

msc_pos = sys.version.find('MSC v.')
if msc_pos != -1:
msc_ver = sys.version[msc_pos+6:msc_pos+10]
if msc_ver == '1300':
# MSVC 7.0
return ['msvcr70']
elif msc_ver == '1310':
# MSVC 7.1
return ['msvcr71']
elif msc_ver == '1400':
# VS2005 / MSVC 8.0
return ['msvcr80']
elif msc_ver == '1500':
# VS2008 / MSVC 9.0
return ['msvcr90']
else:
raise ValueError(Unknown MS Compiler version %i  % msc_Ver)

return [] -

--
components: Build
messages: 80466
nosy: lkcl
severity: normal
status: open
title: get_msvcr() returns None rather than []
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5043
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5043] get_msvcr() returns None rather than []

2009-01-24 Thread Roumen Petrov

Roumen Petrov bugtr...@roumenpetrov.info added the comment:

My comment on this part of code is( from issue3871): 
+# FIXME: next code is from issue870382
+# MS C-runtime libraries never support backward compatibility.
+# Linking to a different library without to specify correct runtime
+# version for the headers will link renamed functions to msvcrt.
+# See issue3308: this piece of code is python problem even
+# with correct w32api headers.
+# Issue: for MSVC compiler we can get the version and from version
+# to determine mcvcrt as code below. But what about if python is
+# build with GCC compiler?
+# Output of sys.version is information for python build on first
+# line, on the next line is information for the compiler and the
+# output lack information for the C-runtime.

My vote is to remove function get_msvcr() from cygwinccompiler.py.

--
nosy: +rpetrov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5043
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com