This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2015年01月11日 14:58 by gajdig, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue23223.diff | berker.peksag, 2015年01月14日 03:28 | review | ||
| Messages (8) | |||
|---|---|---|---|
| msg233857 - (view) | Author: gajdig (gajdig) | Date: 2015年01月11日 14:58 | |
The latest subprocess32, 3.2.6, is unable to be installed in Windows 7 via pip. The error messages: _posixsubprocess.c(10) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory error: command 'C:\\Users\\user1\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\9円.0\\VC\\Bin\\cl.exe' failed with exit status 2 Read that unistd.h is not a Windows file. |
|||
| msg233990 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2015年01月14日 01:26 | |
subprocess32 is not part of Python, it's a third party mode. Report the issue to his author. |
|||
| msg234002 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2015年01月14日 03:23 | |
Quoting from https://code.google.com/p/python-subprocess32/: "Think you've found an issue? Please try to reproduce it using Python 3.4 and file it using http://bugs.python.org/. Work will be done upstream and backported to this project." |
|||
| msg234003 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2015年01月14日 03:28 | |
Here is a patch. |
|||
| msg234004 - (view) | Author: Zachary Ware (zach.ware) * (Python committer) | Date: 2015年01月14日 03:39 | |
_posixsubprocess should not be compiled on Windows, as it will not work and has the potential to completely screw up subprocess on Windows. This appears to be a bug in subprocess32's setup.py, and thus does not apply to Python itself at all. I agree with Victor that this bug doesn't belong here. |
|||
| msg234005 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2015年01月14日 03:46 | |
Oh, good point! I missed that, thanks. |
|||
| msg234570 - (view) | Author: Marat Mavlyutov (Marat.Mavlyutov) | Date: 2015年01月23日 18:34 | |
HI! need that thingie too, did you poke the author? cant find issue tracker at code.google.com |
|||
| msg234576 - (view) | Author: Gregory P. Smith (gregory.p.smith) * (Python committer) | Date: 2015年01月23日 20:29 | |
I can apply this to subprocess32 but it is going to look much more like:
+#ifndef MS_WINDOWS /* WTF is anyone compiling on Windows? Shouldn't work! */
+# define HAVE_UNISTD_H 1
+#endif
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
The real question is why do you need it?
_posixsubprocess.c makes no sense to compile on Windows as far as I understand it. subprocess32 in its entirety makes no sense to use on Windows as nobody is testing, maintaining or updating the Windows side of its code.
The module backport was created for reliable use on POSIX platforms where the existing python 2.x subprocess module falls short.
I recommend:
try:
import subprocess32 as subprocess
except ImportError:
import subprocess
OR
if sys.platform.startswith('win'):
import subprocess
else:
import subprocess32 as subprocess
in cross platform code that needs to run on Windows.
....
BTW, anyone know what update do I need to make to setup.py and its PIP categorization to mark it as unavailable on Windows?
|
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:11 | admin | set | github: 67412 |
| 2015年01月23日 20:30:02 | gregory.p.smith | set | assignee: gregory.p.smith |
| 2015年01月23日 20:29:27 | gregory.p.smith | set | messages: + msg234576 |
| 2015年01月23日 18:34:54 | Marat.Mavlyutov | set | nosy:
+ Marat.Mavlyutov messages: + msg234570 |
| 2015年01月14日 03:46:57 | berker.peksag | set | status: open -> closed resolution: not a bug messages: + msg234005 stage: patch review -> resolved |
| 2015年01月14日 03:39:28 | zach.ware | set | messages: + msg234004 |
| 2015年01月14日 03:28:33 | berker.peksag | set | files:
+ issue23223.diff keywords: + patch messages: + msg234003 stage: patch review |
| 2015年01月14日 03:23:07 | berker.peksag | set | status: closed -> open nosy: + berker.peksag messages: + msg234002 resolution: not a bug -> (no value) |
| 2015年01月14日 01:26:19 | vstinner | set | status: open -> closed nosy: + vstinner messages: + msg233990 resolution: not a bug |
| 2015年01月11日 15:04:35 | SilentGhost | set | nosy:
+ gregory.p.smith components: + Library (Lib), - Installation |
| 2015年01月11日 14:58:55 | gajdig | create | |