summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2010-02-13 18:40:53 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2010-02-13 18:40:53 +0000
commita920e0ab5d7bcbaf7878eed7584091e9268aa95f (patch)
treededc1bffdf9c003b735bfa9102d00532c2d5bf14
parent93b23d09e7621adde819c2bb2ee6318903f40837 (diff)
optional modules: just declare them if they were requested.
pkgconfig call will abort the program if the requirement is not found, but it was being called even when the module that requires it was not enabled. SVN revision: 46151
-rw-r--r--setup.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/setup.py b/setup.py
index b04ae2f..3545935 100644
--- a/setup.py
+++ b/setup.py
@@ -59,14 +59,6 @@ ethumbmodule = Extension('ethumb.c_ethumb',
59 ], 59 ],
60 **pkgconfig('"ethumb >= 0.1"')) 60 **pkgconfig('"ethumb >= 0.1"'))
61 61
62ethumbclientmodule = Extension('ethumb.client',
63 sources=['ethumb/ethumb.client.pyx',
64 ],
65 depends=['include/ethumb/c_ethumb.pxd',
66 'include/ethumb/client.pxd',
67 ],
68 **pkgconfig('"ethumb >= 0.1" "ethumb_client >= 0.1"'))
69
70 62
71trove_classifiers = [ 63trove_classifiers = [
72 "Development Status :: 3 - Alpha", 64 "Development Status :: 3 - Alpha",
@@ -109,6 +101,13 @@ class ethumb_build_ext(build_ext):
109module_list = [ethumbmodule] 101module_list = [ethumbmodule]
110 102
111if int(os.environ.get("ETHUMB_BUILD_CLIENT", 1)): 103if int(os.environ.get("ETHUMB_BUILD_CLIENT", 1)):
104 ethumbclientmodule = Extension(
105 'ethumb.client',
106 sources=['ethumb/ethumb.client.pyx'],
107 depends=['include/ethumb/c_ethumb.pxd',
108 'include/ethumb/client.pxd',
109 ],
110 **pkgconfig('"ethumb >= 0.1" "ethumb_client >= 0.1"'))
112 module_list.append(ethumbclientmodule) 111 module_list.append(ethumbclientmodule)
113else: 112else:
114 print "NOTICE: not building ethumb.client module as requested " \ 113 print "NOTICE: not building ethumb.client module as requested " \