Skip to content

Commit 4eaf7f9

Browse files
authored
fixes bpo-31866: remove code pertaining to AtheOS support (python#4115)
We stop support this OS in 2007 with commit 19fab76. Let's finish.
1 parent 1896793 commit 4eaf7f9

File tree

4 files changed

+5
-32
lines changed

4 files changed

+5
-32
lines changed

Lib/distutils/command/build_ext.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,9 @@ def finalize_options(self):
215215
new_lib = os.path.join(new_lib, suffix)
216216
self.library_dirs.append(new_lib)
217217

218-
# for extensions under Cygwin and AtheOS Python's library directory must be
218+
# For extensions under Cygwin, Python's library directory must be
219219
# appended to library_dirs
220-
if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos':
220+
if sys.platform[:6] == 'cygwin':
221221
if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
222222
# building third party extensions
223223
self.library_dirs.append(os.path.join(sys.prefix, "lib",
@@ -715,22 +715,6 @@ def get_libraries(self, ext):
715715
return ext.libraries + [pythonlib]
716716
else:
717717
return ext.libraries
718-
elif sys.platform[:6] == "atheos":
719-
from distutils import sysconfig
720-
721-
template = "python%d.%d"
722-
pythonlib = (template %
723-
(sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
724-
# Get SHLIBS from Makefile
725-
extra = []
726-
for lib in sysconfig.get_config_var('SHLIBS').split():
727-
if lib.startswith('-l'):
728-
extra.append(lib[2:])
729-
else:
730-
extra.append(lib)
731-
# don't extend ext.libraries, it may be shared with other
732-
# extensions, it is a reference to the original list
733-
return ext.libraries + [pythonlib, "m"] + extra
734718
elif sys.platform == 'darwin':
735719
# Don't use the default code below
736720
return ext.libraries

Lib/test/test_os.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,7 @@ def test_stat_result_pickle(self):
341341

342342
@unittest.skipUnless(hasattr(os, 'statvfs'), 'test needs os.statvfs()')
343343
def test_statvfs_attributes(self):
344-
try:
345-
result = os.statvfs(self.fname)
346-
except OSError as e:
347-
# On AtheOS, glibc always returns ENOSYS
348-
if e.errno == errno.ENOSYS:
349-
self.skipTest('os.statvfs() failed with ENOSYS')
344+
result = os.statvfs(self.fname)
350345

351346
# Make sure direct access works
352347
self.assertEqual(result.f_bfree, result[3])
@@ -386,12 +381,7 @@ def test_statvfs_attributes(self):
386381
@unittest.skipUnless(hasattr(os, 'statvfs'),
387382
"need os.statvfs()")
388383
def test_statvfs_result_pickle(self):
389-
try:
390-
result = os.statvfs(self.fname)
391-
except OSError as e:
392-
# On AtheOS, glibc always returns ENOSYS
393-
if e.errno == errno.ENOSYS:
394-
self.skipTest('os.statvfs() failed with ENOSYS')
384+
result = os.statvfs(self.fname)
395385

396386
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
397387
p = pickle.dumps(result, proto)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Finish removing support for AtheOS.

Modules/_cryptmodule.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ static PyObject *
3434
crypt_crypt_impl(PyObject *module, const char *word, const char *salt)
3535
/*[clinic end generated code: output=0512284a03d2803c input=0e8edec9c364352b]*/
3636
{
37-
/* On some platforms (AtheOS) crypt returns NULL for an invalid
38-
salt. Return None in that case. XXX Maybe raise an exception? */
3937
return Py_BuildValue("s", crypt(word, salt));
4038
}
4139

0 commit comments

Comments
 (0)