[issue20106] warn_dir is always true for install_data, even if an install_dir is specified

2014-01-02 Thread Tabrez Mohammed

New submission from Tabrez Mohammed:

In run(), there is a warning message printed to the console if warn_dir is '1':
  if self.warn_dir:
self.warn("setup script did not provide a directory for "
  "'%s' -- installing right in '%s'" %
 (f, self.install_dir))

warn_dir should be unset in run to suppress the warning if an install_dir is 
specified.

--
components: Distutils
messages: 207148
nosy: tabrezm
priority: normal
severity: normal
status: open
title: warn_dir is always true for install_data, even if an install_dir is 
specified
type: behavior
versions: Python 3.3

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



[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-10 Thread Tabrez Mohammed

New submission from Tabrez Mohammed:

In pyconfig.h (line 216), there is this line:
#define hypot _hypot

This conflicts with the definition of _hypot that ships with VS2010 (math.h, 
line 161):
static __inline double __CRTDECL hypot(_In_ double _X, _In_ double _Y)

The result of the redefinition is that the following warning occurs during 
compilation:
1>c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\math.h(162): 
warning C4211: nonstandard extension used : redefined extern to static

When compiling with warnings being treated as errors, this will obviously 
result in failed builds.

The recommendation from Microsoft (see 
http://connect.microsoft.com/VisualStudio/feedback/details/633988/warning-in-math-h-line-162-re-nonstandard-extensions-used)
 is to change the definition to:
#if _MSC_VER < 1600
#define hypot _hypot
#endif

--
components: Windows
messages: 207894
nosy: tabrezm
priority: normal
severity: normal
status: open
title: #define hypot _hypot conflicts with existing definition
type: compile error
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

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



[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-10 Thread Tabrez Mohammed

Tabrez Mohammed added the comment:

v100 toolset, with compiler setting /W4. Microsoft recommends W4 for all new 
C++ projects (see 
http://msdn.microsoft.com/en-us/library/thxezb7y(v=vs.100).aspx). I'm using 3.3.

--

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



[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-11 Thread Tabrez Mohammed

Tabrez Mohammed added the comment:

Sorry, I realize I didn't mention this in the original post. I'm getting this 
compiler warning when building my Python extension, not when building Python 
itself.

--

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



[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-13 Thread Tabrez Mohammed

Changes by Tabrez Mohammed :


--
keywords: +patch
Added file: http://bugs.python.org/file33447/fix20221.patch

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



[issue20221] #define hypot _hypot conflicts with existing definition

2014-01-28 Thread Tabrez Mohammed

Tabrez Mohammed added the comment:

My extension doesn't compile because I treat warnings as errors. I believe 
Blender compiles fine, but crashes at runtime because of the infinite recursion 
(see the second code snippet in Brecht's response 
(http://bugs.python.org/msg208981).

--

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



[issue20106] warn_dir is always true for install_data, even if an install_dir is specified

2014-11-19 Thread Tabrez Mohammed

Tabrez Mohammed added the comment:

The former. I copy/pasted the code block to show from where the warning message 
was being printed.

--

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



[issue20106] warn_dir is always true for install_data, even if an install_dir is specified

2014-11-19 Thread Tabrez Mohammed

Tabrez Mohammed added the comment:

I don't have access to the code anymore that repro'ed this issue. I just 
remember writing a setup script for a module I was working on, and when 
'install' was run, it would print this error message.

It's pretty easy to see in code what the problem is though. In install_data.py, 
warn_dir is set to '1' in initialize_options(), but it's value is never 
altered. So regardless of what is or isn't passed in, the warning will always 
be printed.

--

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