msg173464 - (view) |
Author: Silverback Networks (silverbacknet) |
Date: 2012-10-21 17:56 |
Once I got my broken environment fixed, this was the only thing that didn't work. The bug is that VS 2010 no longer creates a manifest by default, despite the documentation, and there are confirmation posts around the internet. /Manifest has to be forced starting with VS 2010. Here is a patch to fix that:
--- Lib/distutils/msvc9compiler.py 2011-08-14 11:17:42.000000000 -0700
+++ Lib/distutils/msvc9compiler.py 2012-10-21 10:38:42.257682200 -0700
@@ -411,10 +411,16 @@
'/Z7', '/D_DEBUG']
self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO']
+ if self.__version >= 10:
+ self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO', '/Manifest']
if self.__version >= 7:
self.ldflags_shared_debug = [
'/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG', '/pdb:None'
]
+ if self.__version >= 10:
+ self.ldflags_shared = [
+ '/DLL', '/nologo', '/INCREMENTAL:NO', '/DEBUG', '/pdb:None', '/Manifest'
+ ]
self.ldflags_static = [ '/nologo']
self.initialized = True
|
msg173465 - (view) |
Author: Silverback Networks (silverbacknet) |
Date: 2012-10-21 17:58 |
oops, add _debug on the second part of the patch.
|
msg173466 - (view) |
Author: Christian Heimes (christian.heimes) *  |
Date: 2012-10-21 18:04 |
Can you please upload a proper patch files? It makes code review and applying the patch easier for us.
|
msg173469 - (view) |
Author: Silverback Networks (silverbacknet) |
Date: 2012-10-21 18:46 |
Sure. I got this patch from Mercurial, just in case, but it looks the same.
|
msg175676 - (view) |
Author: Martin v. Löwis (loewis) *  |
Date: 2012-11-16 10:48 |
Why did you put 3.2 into the version list? 3.2 doesn't use VS 2010.
|
msg210181 - (view) |
Author: Paul Moore (paul.moore) *  |
Date: 2014-02-04 08:07 |
Is there any chance this can be included in Python 3.4? It would apparently allow numpy to be built with stock tools on Windows Python.
|
msg210190 - (view) |
Author: Tim Golden (tim.golden) *  |
Date: 2014-02-04 09:59 |
Larry Hastings would have to rule on whether it could get into 3.4 at
this stage.
Paul: are you in a position to apply / test the patch? I've done no more
than glance at it but it looks, from the comments, as though it doesn't
apply cleanly.
|
msg210191 - (view) |
Author: Paul Moore (paul.moore) *  |
Date: 2014-02-04 10:05 |
Unfortunately not really - it's the numpy guys that need this, so hopefully the original poster can comment.
I'll see if I can hand-patch the relevant files and do a pip install numpy to see if it fixes that specific scenario. I'll report back.
I've added Larry Hastings to the nosy list for his comments.
|
msg210192 - (view) |
Author: Paul Moore (paul.moore) *  |
Date: 2014-02-04 10:11 |
Sigh. Looks like it doesn't fix the issue of building numpy - plus it doesn't apply cleanly. My apologies for the noise, I'll report the issues with the patch back on the numpy issue where I was told about this patch.
|
msg210193 - (view) |
Author: Larry Hastings (larry) *  |
Date: 2014-02-04 10:19 |
I'm not sure I need to be on this issue. As a rule, Windows build concerns for 3.4 are delegated to Martin von Lowis.
|
msg210195 - (view) |
Author: Tim Golden (tim.golden) *  |
Date: 2014-02-04 10:29 |
Thanks, Larry. Martin's already nosy this issue, but really we need to
see if we have a viable patch before making decisions about 3.4. I'll
take you off the nosy list.
|
msg210222 - (view) |
Author: Thomas Heller (theller) *  |
Date: 2014-02-04 12:59 |
Hm, what's the problem?
For me, the patch applies cleanly (in Python 3.4.0b3, 32-bit and 64-bit on Windows), and
py -3.4(-32) -m pip install numpy
works correctly. At least
py -3.4(-32) -c "import numpy; print(numpy.__version__)"
prints "1.8.0".
This is with the newest pip (1.5.2).
I have the full version of visual studio 2010 installed.
|
msg210231 - (view) |
Author: Paul Moore (paul.moore) *  |
Date: 2014-02-04 14:01 |
Maybe it's not applicable to 3.3 somehow, which is what I tried. I applied the patch to the distutils in the system installed Python, then ran pip install numpy from a virtualenv.
It's quite possible that a million things could have gone wrong in that process - but that's all I had time to check (I'm only really interested in this as a courtesy to the numpy people, who asked me to raise the bug on numpy, then directed me to this patch as a fix).
|
msg213874 - (view) |
Author: Max Naumov (max.naumov) * |
Date: 2014-03-17 15:07 |
Wouldn't this be more correct?
--- Lib/distutils/msvc9compiler.py 2013-08-03T16:17:08+04:00
+++ Lib/distutils/msvc9compiler.py 2014-03-17T18:36:50.078672+04:00
@@ -411,7 +411,11 @@
'/Z7', '/D_DEBUG']
self.ldflags_shared = ['/DLL', '/nologo', '/INCREMENTAL:NO']
- if self.__version >= 7:
+ if self.__version >= 10:
+ self.ldflags_shared = [
+ '/DLL', '/nologo', '/INCREMENTAL:NO', '/DEBUG', '/pdb:None', '/Manifest'
+ ]
+ elif self.__version >= 7:
self.ldflags_shared_debug = [
'/DLL', '/nologo', '/INCREMENTAL:no', '/DEBUG', '/pdb:None'
]
|
msg213881 - (view) |
Author: Martin v. Löwis (loewis) *  |
Date: 2014-03-17 18:25 |
What is the procedure to test this patch? Under what circumstances exactly is it needed?
|
msg213882 - (view) |
Author: Max Naumov (max.naumov) * |
Date: 2014-03-17 18:33 |
It allows to install numpy on windows python 3.4. Just like the patch in the original post. Actually my patch is merely the original patch refactored.
|
msg221078 - (view) |
Author: Mark Lawrence (BreamoreBoy) * |
Date: 2014-06-20 08:44 |
Can somebody reset the status to open please.
|
msg248433 - (view) |
Author: Mark Lawrence (BreamoreBoy) * |
Date: 2015-08-11 23:25 |
I think this can now be closed as "out of date".
|
msg248434 - (view) |
Author: Steve Dower (steve.dower) *  |
Date: 2015-08-11 23:38 |
It doesn't apply to 3.5 or later, so it's up to Martin whether he wants to apply it for 3.4. (I suspect not, but I'm not about to preempt his call.)
|
msg248470 - (view) |
Author: Ralf Gommers (ralf.gommers) |
Date: 2015-08-12 18:56 |
I'll note that in Numpy we have now worked around the issue (with https://github.com/numpy/numpy/pull/4892), basically by monkeypatching distutils and doing:
if '/MANIFEST' not in ldflags:
ldflags.append('/MANIFEST')
The bug report is still valid though; it should not be specific to numpy. A more detailed report of what was broken before and fixed by this patch would have been helpful. I cannot be sure that this is 100% correct because I don't have Windows+MSVC available, but it should be this:
- Take Python 3.4 installed from the python.org .exe installer
- Create a new virtualenv and activate it
- pip install numpy==1.8.0 # this will fail
- apply the patch
- pip install numpy==1.8.0 # this will work
Furthermore I think that this is a duplicate of http://bugs.python.org/issue4431, which is also a valid bug report confirmed by multiple people (but closed as "not a bug").
Given that applying the patch is harmless and not applying it clearly does create problems for users, it would make sense to apply it. But honestly, given for how long the bug reports on 4431 were ignored, I'm not willing to spend much effort on this. So if no one else does either, this issue may indeed just as well be closed as outdated like Marc Lawrence suggests.
|
|
Date |
User |
Action |
Args |
2022-04-11 14:57:37 | admin | set | github: 60500 |
2019-09-11 13:09:37 | steve.dower | set | status: open -> closed resolution: out of date stage: patch review -> resolved |
2019-02-24 22:44:55 | BreamoreBoy | set | nosy:
- BreamoreBoy
|
2015-08-12 18:56:48 | ralf.gommers | set | messages:
+ msg248470 |
2015-08-11 23:38:02 | steve.dower | set | messages:
+ msg248434 versions:
- Python 3.5 |
2015-08-11 23:25:14 | BreamoreBoy | set | messages:
+ msg248433 |
2014-07-04 22:30:20 | brian.curtin | set | nosy:
- brian.curtin
|
2014-07-04 05:00:49 | THRlWiTi | set | nosy:
+ THRlWiTi
|
2014-06-27 19:02:27 | zach.ware | set | components:
+ Windows |
2014-06-27 19:01:25 | zach.ware | set | status: languishing -> open versions:
+ Python 3.5, - Python 3.3 nosy:
+ dstufft, eric.araujo, - zach.ware
components:
+ Distutils, - Build, Windows type: compile error -> behavior |
2014-06-20 08:44:45 | BreamoreBoy | set | nosy:
+ BreamoreBoy, zach.ware, steve.dower messages:
+ msg221078
|
2014-03-17 18:33:42 | max.naumov | set | messages:
+ msg213882 |
2014-03-17 18:25:35 | loewis | set | messages:
+ msg213881 |
2014-03-17 15:07:16 | max.naumov | set | files:
+ msvc9compilerpatch.diff nosy:
+ max.naumov messages:
+ msg213874
|
2014-02-04 14:01:55 | paul.moore | set | messages:
+ msg210231 |
2014-02-04 12:59:25 | theller | set | nosy:
+ theller messages:
+ msg210222
|
2014-02-04 10:32:12 | tim.golden | set | nosy:
- larry
|
2014-02-04 10:29:17 | tim.golden | set | messages:
+ msg210195 |
2014-02-04 10:19:50 | larry | set | messages:
+ msg210193 |
2014-02-04 10:11:42 | paul.moore | set | messages:
+ msg210192 |
2014-02-04 10:05:38 | paul.moore | set | nosy:
+ larry messages:
+ msg210191
|
2014-02-04 09:59:03 | tim.golden | set | messages:
+ msg210190 |
2014-02-04 08:07:50 | paul.moore | set | nosy:
+ paul.moore messages:
+ msg210181
|
2014-02-04 07:51:55 | ralf.gommers | set | nosy:
+ ralf.gommers
|
2013-11-17 14:23:16 | christian.heimes | set | status: open -> languishing |
2013-08-30 00:52:28 | trent | set | versions:
- Python 3.2 |
2013-08-30 00:36:12 | trent | set | nosy:
+ trent
|
2012-11-16 10:48:57 | loewis | set | messages:
+ msg175676 |
2012-11-16 10:15:56 | cgohlke | set | nosy:
+ cgohlke
|
2012-10-21 18:53:43 | pitrou | set | nosy:
+ loewis, tim.golden, brian.curtin
|
2012-10-21 18:46:08 | silverbacknet | set | files:
+ msvc9manifest.diff keywords:
+ patch messages:
+ msg173469
|
2012-10-21 18:04:53 | christian.heimes | set | components:
+ Windows versions:
- Python 3.1 keywords:
+ 3.3regression nosy:
+ christian.heimes
messages:
+ msg173466 stage: patch review |
2012-10-21 17:58:54 | silverbacknet | set | messages:
+ msg173465 |
2012-10-21 17:56:15 | silverbacknet | create | |