mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
fixes bpo-31866: remove code pertaining to AtheOS support (#4115)
We stop support this OS in 2007 with commit
19fab761b7
. Let's finish.
This commit is contained in:
parent
1896793520
commit
4eaf7f9490
4 changed files with 5 additions and 32 deletions
|
@ -215,9 +215,9 @@ class build_ext(Command):
|
||||||
new_lib = os.path.join(new_lib, suffix)
|
new_lib = os.path.join(new_lib, suffix)
|
||||||
self.library_dirs.append(new_lib)
|
self.library_dirs.append(new_lib)
|
||||||
|
|
||||||
# for extensions under Cygwin and AtheOS Python's library directory must be
|
# For extensions under Cygwin, Python's library directory must be
|
||||||
# appended to library_dirs
|
# appended to library_dirs
|
||||||
if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos':
|
if sys.platform[:6] == 'cygwin':
|
||||||
if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
|
if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
|
||||||
# building third party extensions
|
# building third party extensions
|
||||||
self.library_dirs.append(os.path.join(sys.prefix, "lib",
|
self.library_dirs.append(os.path.join(sys.prefix, "lib",
|
||||||
|
@ -715,22 +715,6 @@ class build_ext(Command):
|
||||||
return ext.libraries + [pythonlib]
|
return ext.libraries + [pythonlib]
|
||||||
else:
|
else:
|
||||||
return ext.libraries
|
return ext.libraries
|
||||||
elif sys.platform[:6] == "atheos":
|
|
||||||
from distutils import sysconfig
|
|
||||||
|
|
||||||
template = "python%d.%d"
|
|
||||||
pythonlib = (template %
|
|
||||||
(sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
|
|
||||||
# Get SHLIBS from Makefile
|
|
||||||
extra = []
|
|
||||||
for lib in sysconfig.get_config_var('SHLIBS').split():
|
|
||||||
if lib.startswith('-l'):
|
|
||||||
extra.append(lib[2:])
|
|
||||||
else:
|
|
||||||
extra.append(lib)
|
|
||||||
# don't extend ext.libraries, it may be shared with other
|
|
||||||
# extensions, it is a reference to the original list
|
|
||||||
return ext.libraries + [pythonlib, "m"] + extra
|
|
||||||
elif sys.platform == 'darwin':
|
elif sys.platform == 'darwin':
|
||||||
# Don't use the default code below
|
# Don't use the default code below
|
||||||
return ext.libraries
|
return ext.libraries
|
||||||
|
|
|
@ -341,12 +341,7 @@ class StatAttributeTests(unittest.TestCase):
|
||||||
|
|
||||||
@unittest.skipUnless(hasattr(os, 'statvfs'), 'test needs os.statvfs()')
|
@unittest.skipUnless(hasattr(os, 'statvfs'), 'test needs os.statvfs()')
|
||||||
def test_statvfs_attributes(self):
|
def test_statvfs_attributes(self):
|
||||||
try:
|
result = os.statvfs(self.fname)
|
||||||
result = os.statvfs(self.fname)
|
|
||||||
except OSError as e:
|
|
||||||
# On AtheOS, glibc always returns ENOSYS
|
|
||||||
if e.errno == errno.ENOSYS:
|
|
||||||
self.skipTest('os.statvfs() failed with ENOSYS')
|
|
||||||
|
|
||||||
# Make sure direct access works
|
# Make sure direct access works
|
||||||
self.assertEqual(result.f_bfree, result[3])
|
self.assertEqual(result.f_bfree, result[3])
|
||||||
|
@ -386,12 +381,7 @@ class StatAttributeTests(unittest.TestCase):
|
||||||
@unittest.skipUnless(hasattr(os, 'statvfs'),
|
@unittest.skipUnless(hasattr(os, 'statvfs'),
|
||||||
"need os.statvfs()")
|
"need os.statvfs()")
|
||||||
def test_statvfs_result_pickle(self):
|
def test_statvfs_result_pickle(self):
|
||||||
try:
|
result = os.statvfs(self.fname)
|
||||||
result = os.statvfs(self.fname)
|
|
||||||
except OSError as e:
|
|
||||||
# On AtheOS, glibc always returns ENOSYS
|
|
||||||
if e.errno == errno.ENOSYS:
|
|
||||||
self.skipTest('os.statvfs() failed with ENOSYS')
|
|
||||||
|
|
||||||
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
|
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
|
||||||
p = pickle.dumps(result, proto)
|
p = pickle.dumps(result, proto)
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Finish removing support for AtheOS.
|
|
@ -34,8 +34,6 @@ static PyObject *
|
||||||
crypt_crypt_impl(PyObject *module, const char *word, const char *salt)
|
crypt_crypt_impl(PyObject *module, const char *word, const char *salt)
|
||||||
/*[clinic end generated code: output=0512284a03d2803c input=0e8edec9c364352b]*/
|
/*[clinic end generated code: output=0512284a03d2803c input=0e8edec9c364352b]*/
|
||||||
{
|
{
|
||||||
/* On some platforms (AtheOS) crypt returns NULL for an invalid
|
|
||||||
salt. Return None in that case. XXX Maybe raise an exception? */
|
|
||||||
return Py_BuildValue("s", crypt(word, salt));
|
return Py_BuildValue("s", crypt(word, salt));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue