python3: add one more is_cygpty() check to isatty()
With 3.6 this used some other API which already used is_cygpty() but now uses isatty() directly. This fixes the interactive prompt under mintty.
This commit is contained in:
@@ -330,3 +330,21 @@ diff -Naur Python-3.7.0-orig/Python/pylifecycle.c Python-3.7.0/Python/pylifecycl
|
||||
return 1;
|
||||
if (!Py_InteractiveFlag)
|
||||
return 0;
|
||||
--- Python-3.7.0/Modules/main.c.orig 2018-07-06 14:38:04.604443500 +0200
|
||||
+++ Python-3.7.0/Modules/main.c 2018-07-06 14:52:17.622273200 +0200
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "internal/import.h"
|
||||
#include "internal/pygetopt.h"
|
||||
#include "internal/pystate.h"
|
||||
+#include "iscygpty.h"
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
@@ -1093,6 +1094,7 @@
|
||||
pymain_init_stdio(_PyMain *pymain)
|
||||
{
|
||||
pymain->stdin_is_interactive = (isatty(fileno(stdin))
|
||||
+ || is_cygpty(fileno(stdin))
|
||||
|| Py_InteractiveFlag);
|
||||
|
||||
#if defined(MS_WINDOWS) || defined(__CYGWIN__)
|
||||
|
||||
@@ -18,7 +18,7 @@ pkgbase="mingw-w64-${_realname}"
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
_pybasever=3.7
|
||||
pkgver=${_pybasever}.0
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="A high-level scripting language (mingw-w64)"
|
||||
arch=('any')
|
||||
license=('PSF')
|
||||
@@ -501,7 +501,7 @@ sha256sums=('0382996d1ee6aafe59763426cf0139ffebe36984474d0ec4126dd1c40a8b3549'
|
||||
'2da38cde34a6e9084eee6e16ae5991a1ee230db0f2f68dbe82f3c855cd747e2c'
|
||||
'cd9e9b634e050ae04670d3d6e287261c123496ad3503134a513c62275d5e6b95'
|
||||
'ec23a0bf972ac8629d76ed6246c3ad291a6175751a7e303d7ac9fc4c4c28267c'
|
||||
'd4333e421289a43d324f8d46a323545bddbac640287b9a9a38e700c7221c5ece'
|
||||
'f74a65f8798f1c06b44d1b5de8af6e4f73cf202545e428d2e23b816a924cc09e'
|
||||
'6bd29223634b2fc3e78ddff83d4c0e807da25fe280cddefd360984ab93edd7a3'
|
||||
'aa4f2f4aed732f1f10df665bb679be1371df732df4b91390fee2c3123261158d'
|
||||
'27c543d2d4a8830cf565cb1b5548108e00810e2bb924a02fcbe2b85bf141b94b'
|
||||
|
||||
Reference in New Issue
Block a user