Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
919efcc
Add support for ARM64 to the pythonw tool
ronaldoussoren Jul 20, 2020
69c39f3
Add support for "universal2" as a fat binary target on macOS
ronaldoussoren Jul 20, 2020
3940c86
Tweak ctypes.macholib.dyld to work with the shared library cache.
ronaldoussoren Jul 20, 2020
deda5f0
Silence compile time warning
ronaldoussoren Jul 20, 2020
ea3c200
macOS/arm64 support, based on GH-21249
ronaldoussoren Jul 20, 2020
552bca8
Fix test for macOS before 10.10
ronaldoussoren Jul 20, 2020
e0c23a1
ARM64 is a valid platform for macOS
ronaldoussoren Jul 20, 2020
e637a77
Unconditionally use uint32_t here.
ronaldoussoren Jul 20, 2020
02fb660
First stab at deploying to an earlier version of macOS than the build…
ronaldoussoren Jul 21, 2020
ba2f5a3
Update build-installer.py for universal2 builds
ronaldoussoren Jul 26, 2020
8e3b454
Merge ctypes changes from Apple (PR 21241)
ronaldoussoren Jul 26, 2020
87c942b
The archive-deps.py script isn't really useful
ronaldoussoren Jul 26, 2020
515fbe6
Merge branch 'macos-deploy-to-earlier' into macos11-deploy-earlier-br…
ronaldoussoren Oct 20, 2020
eee5437
Cleanup the code to check at runtime for a couple of APIs.
ronaldoussoren Oct 20, 2020
3a1d4f2
Dynamicly fill posix._have_functions as well
ronaldoussoren Oct 20, 2020
2f019f4
Changes after testing with Xcode 6.2 on macOS 10.9
ronaldoussoren Oct 21, 2020
cec3da7
Code formatting
ronaldoussoren Oct 21, 2020
86b5cf3
Fix a number of errors in weaklinking support
ronaldoussoren Oct 21, 2020
d604cef
Merge branch 'macos11-deploy-earlier-branch' of github.com:ronaldouss…
ronaldoussoren Oct 21, 2020
dde0ba4
Implement tests for weak linked symbols.
ronaldoussoren Oct 21, 2020
7ac26c4
Finish the test for os.link behaviour
ronaldoussoren Oct 21, 2020
191a2d7
posixmodule.c uses multi-phase initialization
ronaldoussoren Oct 21, 2020
e6d195b
Make sure some form of prep_cif is called, even if the variadic versi…
ronaldoussoren Oct 21, 2020
cfb02ba
Move the removal of unavailable functions to the module exec
ronaldoussoren Oct 21, 2020
003dae8
Improved error handling
ronaldoussoren Oct 21, 2020
004ba4e
Remove '-arch arm64' from the compiler arguments when necessary
ronaldoussoren Oct 21, 2020
6019346
check that weak linking works for the time module
ronaldoussoren Oct 22, 2020
54576ab
Drop the DEPS_ONLY changes
ronaldoussoren Oct 22, 2020
6af77ab
Undo change to default PATH
ronaldoussoren Oct 22, 2020
b653df9
Use configure to detect the presence of _dyld_shared_cache_contains_path
ronaldoussoren Oct 22, 2020
98af7b3
Revert unnecessary change
ronaldoussoren Oct 22, 2020
817d9bf
Updates to timemodule.c
ronaldoussoren Oct 22, 2020
8684d9d
Stricter checking of __builtin_available
ronaldoussoren Oct 22, 2020
0b44610
Clean up setup.py
ronaldoussoren Oct 22, 2020
36deb92
Fix build failures on Linux
ronaldoussoren Oct 22, 2020
33d5710
Fix typo
ronaldoussoren Oct 22, 2020
c3113eb
Remove reference to non-existing probe function
ronaldoussoren Oct 22, 2020
587e53e
One more attempt at building on Linux...
ronaldoussoren Oct 22, 2020
24ef276
A bit of clean up of the setup.py logic.
ronaldoussoren Oct 22, 2020
e0614bc
Fix patchcheck issues
ronaldoussoren Oct 22, 2020
e6478fa
add prefix to f-strings
ronaldoussoren Oct 22, 2020
3f72949
Add missing preprocessor guards
ronaldoussoren Oct 22, 2020
5daff99
Use the correct cut-off for the availability of clock_gettime and
ronaldoussoren Oct 22, 2020
6681261
Fix error in preprocessor logic for os.chmod implementation
ronaldoussoren Oct 22, 2020
b17a3d5
Merge branch 'master' into macos11-deploy-earlier-branch
ronaldoussoren Oct 22, 2020
7e64e95
the sid attribute for posix_spawn is only available on recent version…
ronaldoussoren Oct 31, 2020
fef2e93
Changes due to review by Victor Stinner
ronaldoussoren Oct 31, 2020
24eb0d0
Merge branch 'macos11-deploy-earlier-branch' of github.com:ronaldouss…
ronaldoussoren Oct 31, 2020
296666b
inor changes
ronaldoussoren Nov 1, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
check that weak linking works for the time module
  • Loading branch information
ronaldoussoren committed Oct 22, 2020
commit 6019346c3020e516f30d18f0a77eb878239474b3
30 changes: 30 additions & 0 deletions Lib/test/test_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,36 @@ def test_object_to_timespec(self):
with self.assertRaises(ValueError):
pytime_object_to_timespec(float('nan'), time_rnd)

@unittest.skipUnless(sys.platform == "darwin", "test weak linking on macOS")
class TestTimeWeaklinking(unittest.TestCase):
# These test cases verify that weak linking support on macOS works
# as expected. These cases only test new behaviour introduced by weak linking,
# regular behaviour is tested by the normal test cases.
def setUp(self):
import sysconfig
import platform

config_vars = sysconfig.get_config_vars()
self.available = { nm for nm in config_vars if nm.startswith("HAVE_") and config_vars[nm] }
self.mac_ver = tuple(int(part) for part in platform.mac_ver()[0].split("."))

def _verify_available(self, name):
if name not in self.available:
raise unittest.SkipTest(f"{name} not weak-linked")

def test_clock_functions(self):
self._verify_available("HAVE_CLOCK_GETTIME")
clock_names = [
"CLOCK_MONOTONIC", "clock_gettime", "clock_gettime_ns", "clock_settime",
"clock_settime_ns", "clock_getres"]
if self.mac_ver >= (10, 16):
for name in clock_names:
self.assertTrue(hasattr(time, name), "time.{name} is not available")

else:
for name in clock_names:
self.assertFalse(hasattr(time, name), "time.{name} is available")


if __name__ == "__main__":
unittest.main()