diff -ur Python-3.7.0/Modules/timemodule.c Python-3.7.0_fixed/Modules/timemodule.c
--- Python-3.7.0/Modules/timemodule.c	2018-06-26 23:07:35.000000000 -0400
+++ Python-3.7.0_fixed/Modules/timemodule.c	2018-08-07 20:36:38.000000000 -0400
@@ -1693,6 +1693,7 @@
     /* Set, or reset, module variables like time.timezone */
     PyInit_timezone(m);
 
+#ifndef __APPLE__ /* prevents building for OSX 10.9, 10.10, 10.11 on 10.12 or 10.13 */
 #ifdef CLOCK_REALTIME
     PyModule_AddIntMacro(m, CLOCK_REALTIME);
 #endif
@@ -1720,7 +1721,7 @@
 #ifdef CLOCK_UPTIME
     PyModule_AddIntMacro(m, CLOCK_UPTIME);
 #endif
-
+#endif
     if (!initialized) {
         if (PyStructSequence_InitType2(&StructTimeType,
                                        &struct_time_type_desc) < 0)
diff -ur Python-3.7.0/configure Python-3.7.0_fixed/configure
--- Python-3.7.0/configure	2018-06-26 23:07:35.000000000 -0400
+++ Python-3.7.0_fixed/configure	2018-08-07 19:36:26.000000000 -0400
@@ -11340,26 +11340,26 @@
 
 # checks for library functions
 for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
- clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
- fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
- futimens futimes gai_strerror getentropy \
+ clock confstr ctermid dup3 execv fchmod fchown \
+ fexecve fork fpathconf ftime ftruncate futimesat \
+ futimes gai_strerror \
  getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
  getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
  if_nameindex \
- initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
- memrchr mbrtowc mkdirat mkfifo \
- mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
+ initgroups kill killpg lchmod lchown lockf lstat lutimes mmap \
+ memrchr mbrtowc mkfifo \
+ mkfifoat mknod mknodat mktime mremap nice pathconf pause pipe2 plock poll \
  posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
- pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
+ pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readv realpath \
  sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
  setgid sethostname \
  setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
  sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
  sched_rr_get_interval \
  sigaction sigaltstack siginterrupt sigpending sigrelse \
- sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
+ sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy sync \
  sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
- truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
+ truncate uname unsetenv utimes waitid waitpid wait3 wait4 \
  wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -11372,6 +11372,25 @@
 fi
 done
 
+if test "`uname -s`" != "Darwin"
+then
+  # checks for library functions
+  for ac_func in faccessat fchmodat fchownat \
+    fdopendir fstatat futimens getentropy linkat \
+    mkdirat openat readlinkat renameat \
+    symlinkat unlinkat utimensat
+  do :
+    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+  ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+  if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+    cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+  fi
+  done
+fi
+
 
 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
        #include <dirent.h>
@@ -12561,7 +12580,8 @@
 fi
 done
 
-
+if test "`uname -s`" != "Darwin"
+then
 for ac_func in clock_gettime
 do :
   ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
@@ -12622,8 +12642,9 @@
 
 fi
 done
-
-
+fi
+if test "`uname -s`" != "Darwin"
+then
 for ac_func in clock_getres
 do :
   ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
@@ -12680,8 +12701,10 @@
 
 fi
 done
+fi
 
-
+if test "`uname -s`" != "Darwin"
+then
 for ac_func in clock_settime
 do :
   ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
@@ -12738,7 +12761,7 @@
 
 fi
 done
-
+fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
 $as_echo_n "checking for major... " >&6; }
diff -ur Python-3.7.0/setup.py Python-3.7.0_fixed/setup.py
--- Python-3.7.0/setup.py	2018-06-26 23:07:35.000000000 -0400
+++ Python-3.7.0_fixed/setup.py	2018-08-07 20:50:20.000000000 -0400
@@ -1767,7 +1767,7 @@
                         include_dirs = include_dirs,
                         libraries = [],
                         extra_compile_args = frameworks[2:],
-                        extra_link_args = frameworks,
+                        extra_link_args =  ['-F/Library/Frameworks', '-F/System/Library/Frameworks'] + frameworks,
                         )
         self.extensions.append(ext)
         return 1
