summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-10-25 11:06:09 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-10-25 11:06:09 (GMT)
commite0be4232971edca23438cc3d79761141f2de124f (patch)
tree7149c8f35615c64e122de1478900f5e8cb516c04 /setup.py
parent92b958420e90b5e98c795db75693310cb9317f95 (diff)
downloadcpython-e0be4232971edca23438cc3d79761141f2de124f.zip
cpython-e0be4232971edca23438cc3d79761141f2de124f.tar.gz
cpython-e0be4232971edca23438cc3d79761141f2de124f.tar.bz2
Close #10278: Add clock_getres(), clock_gettime() and CLOCK_xxx constants to
the time module. time.clock_gettime(time.CLOCK_MONOTONIC) provides a monotonic clock
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 76566bd..97a92ba 100644
--- a/setup.py
+++ b/setup.py
@@ -504,11 +504,17 @@ class PyBuildExt(build_ext):
exts.append( Extension('math', ['mathmodule.c', '_math.c'],
depends=['_math.h'],
libraries=math_libs) )
+
+ # time libraries: librt may be needed for clock_gettime()
+ time_libs = []
+ lib = sysconfig.get_config_var('TIMEMODULE_LIB')
+ if lib:
+ time_libs.append(lib)
+
# time operations and variables
exts.append( Extension('time', ['timemodule.c', '_time.c'],
- libraries=math_libs) )
- exts.append( Extension('_datetime', ['_datetimemodule.c', '_time.c'],
- libraries=math_libs) )
+ libraries=time_libs) )
+ exts.append( Extension('_datetime', ['_datetimemodule.c', '_time.c']) )
# random number generator implemented in C
exts.append( Extension("_random", ["_randommodule.c"]) )
# bisect