Gregory P. Smith added the comment: 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? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23223> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com