curl-and-python

Building on Windows with CURL_DIR env variable

From: Tom Mueller (plain-text) <Tom.Mueller_at_sun.com>
Date: Mon, 10 Aug 2009 14:03:40 -0500

Hi. I'm new to PycURL but a colleague recommended sending along this
patch that we are using for our Windows build of PycURL. This enables
setting the cURL directory using an environment variable rather than a
command line setting:

--- setup.py.old 2009-07-13 11:36:43.375000000 -0500
+++ setup.py 2009-07-13 11:53:28.000000000 -0500
@@ -64,7 +64,10 @@
     # their cURL source installation. The path set here is just an example
     # and thus unlikely to match your installation.
     CURL_DIR = r"c:\src\build\pycurl\curl-7.16.2.1"
+ if os.environ.has_key("CURL_DIR"):
+ CURL_DIR = os.environ["CURL_DIR"]
     CURL_DIR = scan_argv("--curl-dir=", CURL_DIR)
+
     print "Using curl directory:", CURL_DIR
     assert os.path.isdir(CURL_DIR), "please check CURL_DIR in setup.py"
     include_dirs.append(os.path.join(CURL_DIR, "include"))

Thought this might be useful.

Thanks.
Tom Mueller

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2009-08-10