Skip to content

Commit 0693063

Browse files
authored
remove IRIX support (closes bpo-31341) (#3310)
See PEP 11.
1 parent e1b0287 commit 0693063

File tree

16 files changed

+36
-115
lines changed

16 files changed

+36
-115
lines changed

Doc/distutils/apiref.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,19 +1086,16 @@ other utility module.
10861086

10871087
Return a string that identifies the current platform. This is used mainly to
10881088
distinguish platform-specific build directories and platform-specific built
1089-
distributions. Typically includes the OS name and version and the architecture
1090-
(as supplied by 'os.uname()'), although the exact information included depends
1091-
on the OS; eg. for IRIX the architecture isn't particularly important (IRIX only
1092-
runs on SGI hardware), but for Linux the kernel version isn't particularly
1093-
important.
1089+
distributions. Typically includes the OS name and version and the
1090+
architecture (as supplied by 'os.uname()'), although the exact information
1091+
included depends on the OS; e.g., on Linux, the kernel version isn't
1092+
particularly important.
10941093

10951094
Examples of returned values:
10961095

10971096
* ``linux-i586``
10981097
* ``linux-alpha``
10991098
* ``solaris-2.6-sun4u``
1100-
* ``irix-5.3``
1101-
* ``irix64-6.2``
11021099

11031100
For non-POSIX platforms, currently just returns ``sys.platform``.
11041101

Doc/library/sysconfig.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,18 +173,15 @@ Other functions
173173

174174
This is used mainly to distinguish platform-specific build directories and
175175
platform-specific built distributions. Typically includes the OS name and
176-
version and the architecture (as supplied by :func:`os.uname`), although the
177-
exact information included depends on the OS; e.g. for IRIX the architecture
178-
isn't particularly important (IRIX only runs on SGI hardware), but for Linux
179-
the kernel version isn't particularly important.
176+
version and the architecture (as supplied by 'os.uname()'), although the
177+
exact information included depends on the OS; e.g., on Linux, the kernel
178+
version isn't particularly important.
180179

181180
Examples of returned values:
182181

183182
- linux-i586
184183
- linux-alpha (?)
185184
- solaris-2.6-sun4u
186-
- irix-5.3
187-
- irix64-6.2
188185

189186
Windows will return one of:
190187

Lib/distutils/tests/test_unixccompiler.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,6 @@ def gcv(v):
5151

5252
sysconfig.get_config_var = old_gcv
5353

54-
# irix646
55-
sys.platform = 'irix646'
56-
self.assertEqual(self.cc.rpath_foo(), ['-rpath', '/foo'])
57-
58-
# osf1V5
59-
sys.platform = 'osf1V5'
60-
self.assertEqual(self.cc.rpath_foo(), ['-rpath', '/foo'])
61-
6254
# GCC GNULD
6355
sys.platform = 'bar'
6456
def gcv(v):

Lib/distutils/unixccompiler.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,6 @@ def runtime_library_dir_option(self, dir):
233233
if self._is_gcc(compiler):
234234
return ["-Wl,+s", "-L" + dir]
235235
return ["+s", "-L" + dir]
236-
elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5":
237-
return ["-rpath", dir]
238236
else:
239237
if self._is_gcc(compiler):
240238
# gcc on non-GNU systems does not need -Wl, but can

Lib/distutils/util.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,25 @@
1616
from distutils.errors import DistutilsByteCompileError
1717

1818
def get_platform ():
19-
"""Return a string that identifies the current platform. This is used
20-
mainly to distinguish platform-specific build directories and
21-
platform-specific built distributions. Typically includes the OS name
22-
and version and the architecture (as supplied by 'os.uname()'),
23-
although the exact information included depends on the OS; eg. for IRIX
24-
the architecture isn't particularly important (IRIX only runs on SGI
25-
hardware), but for Linux the kernel version isn't particularly
26-
important.
19+
"""Return a string that identifies the current platform. This is used mainly to
20+
distinguish platform-specific build directories and platform-specific built
21+
distributions. Typically includes the OS name and version and the
22+
architecture (as supplied by 'os.uname()'), although the exact information
23+
included depends on the OS; eg. on Linux, the kernel version isn't
24+
particularly important.
2725
2826
Examples of returned values:
2927
linux-i586
3028
linux-alpha (?)
3129
solaris-2.6-sun4u
32-
irix-5.3
33-
irix64-6.2
3430
3531
Windows will return one of:
3632
win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
3733
win-ia64 (64bit Windows on Itanium)
3834
win32 (all others - specifically, sys.platform is returned)
3935
4036
For other non-POSIX platforms, currently just returns 'sys.platform'.
37+
4138
"""
4239
if os.name == 'nt':
4340
# sniff sys.version for architecture.
@@ -87,8 +84,6 @@ def get_platform ():
8784
bitness = {2147483647:"32bit", 9223372036854775807:"64bit"}
8885
machine += ".%s" % bitness[sys.maxsize]
8986
# fall through to standard osname-release-machine representation
90-
elif osname[:4] == "irix": # could be "irix64"!
91-
return "%s-%s" % (osname, release)
9287
elif osname[:3] == "aix":
9388
return "%s-%s.%s" % (osname, version, release)
9489
elif osname[:6] == "cygwin":

Lib/sysconfig.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -599,26 +599,23 @@ def get_platform():
599599
"""Return a string that identifies the current platform.
600600
601601
This is used mainly to distinguish platform-specific build directories and
602-
platform-specific built distributions. Typically includes the OS name
603-
and version and the architecture (as supplied by 'os.uname()'),
604-
although the exact information included depends on the OS; eg. for IRIX
605-
the architecture isn't particularly important (IRIX only runs on SGI
606-
hardware), but for Linux the kernel version isn't particularly
607-
important.
602+
platform-specific built distributions. Typically includes the OS name and
603+
version and the architecture (as supplied by 'os.uname()'), although the
604+
exact information included depends on the OS; on Linux, the kernel version
605+
isn't particularly important.
608606
609607
Examples of returned values:
610608
linux-i586
611609
linux-alpha (?)
612610
solaris-2.6-sun4u
613-
irix-5.3
614-
irix64-6.2
615611
616612
Windows will return one of:
617613
win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
618614
win-ia64 (64bit Windows on Itanium)
619615
win32 (all others - specifically, sys.platform is returned)
620616
621617
For other non-POSIX platforms, currently just returns 'sys.platform'.
618+
622619
"""
623620
if os.name == 'nt':
624621
# sniff sys.version for architecture.
@@ -666,8 +663,6 @@ def get_platform():
666663
bitness = {2147483647:"32bit", 9223372036854775807:"64bit"}
667664
machine += ".%s" % bitness[sys.maxsize]
668665
# fall through to standard osname-release-machine representation
669-
elif osname[:4] == "irix": # could be "irix64"!
670-
return "%s-%s" % (osname, release)
671666
elif osname[:3] == "aix":
672667
return "%s-%s.%s" % (osname, version, release)
673668
elif osname[:6] == "cygwin":

Lib/test/test_pty.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ def debug(msg):
2424

2525

2626
def normalize_output(data):
27-
# Some operating systems do conversions on newline. We could possibly
28-
# fix that by doing the appropriate termios.tcsetattr()s. I couldn't
29-
# figure out the right combo on Tru64 and I don't have an IRIX box.
30-
# So just normalize the output and doc the problem O/Ses by allowing
31-
# certain combinations for some platforms, but avoid allowing other
32-
# differences (like extra whitespace, trailing garbage, etc.)
27+
# Some operating systems do conversions on newline. We could possibly fix
28+
# that by doing the appropriate termios.tcsetattr()s. I couldn't figure out
29+
# the right combo on Tru64. So, just normalize the output and doc the
30+
# problem O/Ses by allowing certain combinations for some platforms, but
31+
# avoid allowing other differences (like extra whitespace, trailing garbage,
32+
# etc.)
3333

3434
# This is about the best we can do without getting some feedback
3535
# from someone more knowledgable.
@@ -38,7 +38,6 @@ def normalize_output(data):
3838
if data.endswith(b'\r\r\n'):
3939
return data.replace(b'\r\r\n', b'\n')
4040

41-
# IRIX apparently turns \n into \r\n.
4241
if data.endswith(b'\r\n'):
4342
return data.replace(b'\r\n', b'\n')
4443

Lib/uuid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ def _lanscan_getnode():
399399

400400
def _netstat_getnode():
401401
"""Get the hardware address on Unix by running netstat."""
402-
# This might work on AIX, Tru64 UNIX and presumably on IRIX.
402+
# This might work on AIX, Tru64 UNIX.
403403
try:
404404
proc = _popen('netstat', '-ia')
405405
if not proc:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Per PEP 11, support for the IRIX operating system was removed.

Modules/Setup.dist

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,6 @@ _symtable symtablemodule.c
350350
# The library to link fpectl with is platform specific.
351351
# Choose *one* of the options below for fpectl:
352352

353-
# For SGI IRIX (tested on 5.3):
354-
#fpectl fpectlmodule.c -lfpe
355-
356353
# For Solaris with SunPro compiler (tested on Solaris 2.5 with SunPro C 4.2):
357354
# (Without the compiler you don't have -lsunmath.)
358355
#fpectl fpectlmodule.c -R/opt/SUNWspro/lib -lsunmath -lm

Modules/fpectlmodule.c

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -111,29 +111,8 @@ static void fpe_reset(Sigfunc *handler)
111111
* handler for SIGFPE to the given handler.
112112
*/
113113

114-
/*-- IRIX -----------------------------------------------------------------*/
115-
#if defined(sgi)
116-
/* See man page on handle_sigfpes -- must link with -lfpe
117-
* My usage doesn't follow the man page exactly. Maybe somebody
118-
* else can explain handle_sigfpes to me....
119-
* cc -c -I/usr/local/python/include fpectlmodule.c
120-
* ld -shared -o fpectlmodule.so fpectlmodule.o -lfpe
121-
*/
122-
#include <sigfpe.h>
123-
typedef void user_routine (unsigned[5], int[2]);
124-
typedef void abort_routine (unsigned long);
125-
handle_sigfpes(_OFF, 0,
126-
(user_routine *)0,
127-
_TURN_OFF_HANDLER_ON_ERROR,
128-
NULL);
129-
handle_sigfpes(_ON, _EN_OVERFL | _EN_DIVZERO | _EN_INVALID,
130-
(user_routine *)0,
131-
_ABORT_ON_ERROR,
132-
NULL);
133-
PyOS_setsig(SIGFPE, handler);
134-
135114
/*-- SunOS and Solaris ----------------------------------------------------*/
136-
#elif defined(sun)
115+
#if defined(sun)
137116
/* References: ieee_handler, ieee_sun, ieee_functions, and ieee_flags
138117
man pages (SunOS or Solaris)
139118
cc -c -I/usr/local/python/include fpectlmodule.c

Modules/socketmodule.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,8 @@ if_indextoname(index) -- return the corresponding interface name\n\
268268
#include <netdb.h>
269269
#endif
270270

271-
/* Irix 6.5 fails to define this variable at all. This is needed
272-
for both GCC and SGI's compiler. I'd say that the SGI headers
273-
are just busted. Same thing for Solaris. */
274-
#if (defined(__sgi) || defined(sun)) && !defined(INET_ADDRSTRLEN)
271+
/* Solaris fails to define this variable at all. */
272+
#if defined(sun) && !defined(INET_ADDRSTRLEN)
275273
#define INET_ADDRSTRLEN 16
276274
#endif
277275

Tools/scripts/objgraph.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
# objgraph
44
#
5-
# Read "nm -o" input (on IRIX: "nm -Bo") of a set of libraries or modules
6-
# and print various interesting listings, such as:
5+
# Read "nm -o" input of a set of libraries or modules and print various
6+
# interesting listings, such as:
77
#
88
# - which names are used but not defined in the set (and used where),
99
# - which names are defined in the set (and where),
@@ -15,7 +15,7 @@
1515
# -d: print callees per objectfile
1616
# -u: print usage of undefined symbols
1717
# If none of -cdu is specified, all are assumed.
18-
# Use "nm -o" to generate the input (on IRIX: "nm -Bo"),
18+
# Use "nm -o" to generate the input
1919
# e.g.: nm -o /lib/libc.a | objgraph
2020

2121

@@ -161,7 +161,7 @@ def main():
161161
print('-d: print callees per objectfile')
162162
print('-u: print usage of undefined symbols')
163163
print('If none of -cdu is specified, all are assumed.')
164-
print('Use "nm -o" to generate the input (on IRIX: "nm -Bo"),')
164+
print('Use "nm -o" to generate the input')
165165
print('e.g.: nm -o /lib/libc.a | objgraph')
166166
return 1
167167
optu = optc = optd = 0

configure

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2993,12 +2993,6 @@ $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
29932993
$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
29942994

29952995

2996-
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2997-
# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2998-
2999-
$as_echo "#define _BSD_TYPES 1" >>confdefs.h
3000-
3001-
30022996
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
30032997
# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
30042998
# them.
@@ -3298,7 +3292,6 @@ then
32983292
linux*) MACHDEP="linux";;
32993293
cygwin*) MACHDEP="cygwin";;
33003294
darwin*) MACHDEP="darwin";;
3301-
irix646) MACHDEP="irix6";;
33023295
'') MACHDEP="unknown";;
33033296
esac
33043297
fi
@@ -9136,7 +9129,7 @@ fi
91369129
$as_echo "$SHLIB_SUFFIX" >&6; }
91379130

91389131
# LDSHARED is the ld *command* used to create shared library
9139-
# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
9132+
# -- "cc -G" on SunOS 5.x.
91409133
# (Shared libraries in this instance are shared modules to be loaded into
91419134
# Python, as opposed to building Python itself as a shared library.)
91429135
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
@@ -9148,8 +9141,6 @@ then
91489141
BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
91499142
LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
91509143
;;
9151-
IRIX/5*) LDSHARED="ld -shared";;
9152-
IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
91539144
SunOS/5*)
91549145
if test "$GCC" = "yes" ; then
91559146
LDSHARED='$(CC) -shared'
@@ -9309,10 +9300,6 @@ then
93099300
then CCSHARED="-fPIC"
93109301
else CCSHARED="-Kpic -belf"
93119302
fi;;
9312-
IRIX*/6*) case $CC in
9313-
*gcc*) CCSHARED="-shared";;
9314-
*) CCSHARED="";;
9315-
esac;;
93169303
esac
93179304
fi
93189305
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5

configure.ac

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,6 @@ AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features]
133133
# them.
134134
AC_DEFINE(__BSD_VISIBLE, 1, [Define on FreeBSD to activate all library features])
135135

136-
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
137-
# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
138-
AC_DEFINE(_BSD_TYPES, 1, [Define on Irix to enable u_int])
139-
140136
# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
141137
# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
142138
# them.
@@ -406,7 +402,6 @@ then
406402
linux*) MACHDEP="linux";;
407403
cygwin*) MACHDEP="cygwin";;
408404
darwin*) MACHDEP="darwin";;
409-
irix646) MACHDEP="irix6";;
410405
'') MACHDEP="unknown";;
411406
esac
412407
fi
@@ -2402,7 +2397,7 @@ fi
24022397
AC_MSG_RESULT($SHLIB_SUFFIX)
24032398

24042399
# LDSHARED is the ld *command* used to create shared library
2405-
# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
2400+
# -- "cc -G" on SunOS 5.x.
24062401
# (Shared libraries in this instance are shared modules to be loaded into
24072402
# Python, as opposed to building Python itself as a shared library.)
24082403
AC_MSG_CHECKING(LDSHARED)
@@ -2413,8 +2408,6 @@ then
24132408
BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
24142409
LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
24152410
;;
2416-
IRIX/5*) LDSHARED="ld -shared";;
2417-
IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
24182411
SunOS/5*)
24192412
if test "$GCC" = "yes" ; then
24202413
LDSHARED='$(CC) -shared'
@@ -2572,10 +2565,6 @@ then
25722565
then CCSHARED="-fPIC"
25732566
else CCSHARED="-Kpic -belf"
25742567
fi;;
2575-
IRIX*/6*) case $CC in
2576-
*gcc*) CCSHARED="-shared";;
2577-
*) CCSHARED="";;
2578-
esac;;
25792568
esac
25802569
fi
25812570
AC_MSG_RESULT($CCSHARED)

pyconfig.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,9 +1415,6 @@
14151415
/* Define on OpenBSD to activate all library features */
14161416
#undef _BSD_SOURCE
14171417

1418-
/* Define on Irix to enable u_int */
1419-
#undef _BSD_TYPES
1420-
14211418
/* Define on Darwin to activate all library features */
14221419
#undef _DARWIN_C_SOURCE
14231420

0 commit comments

Comments
 (0)