Index: check_curl.py |
=================================================================== |
--- a/check_curl.py |
+++ b/check_curl.py |
@@ -1,16 +1,19 @@ |
#!/usr/bin/env python |
# coding: utf-8 |
import os, sys, subprocess, tempfile; |
baseDir = os.path.abspath(os.path.dirname(__file__)) |
def check_curl(): |
- (fd, name) = tempfile.mkstemp(dir=os.path.join(baseDir, 'build'), suffix='.h') |
+ buildDir = os.path.join(baseDir, 'build') |
+ if not os.path.exists(buildDir): |
+ os.makedirs(buildDir); |
+ (fd, name) = tempfile.mkstemp(dir=buildDir, suffix='.h') |
try: |
handle = os.fdopen(fd, 'wb'); |
handle.write('#include <curl/curl.h>') |
handle.close(); |
# This command won't work for Windows or Android build environments but we |
# don't want to use curl there anyway |
command = ['/usr/bin/env', 'gcc', '-E', name]; |