Lines 1-37
Link Here
|
1 |
--- setup.py.orig Mon Mar 18 01:08:13 2002 |
1 |
--- setup.py.orig Sun Apr 7 22:52:01 2002 |
2 |
+++ setup.py Tue Mar 19 09:42:54 2002 |
2 |
+++ setup.py Sun May 5 00:02:33 2002 |
3 |
@@ -34,9 +34,12 @@ |
3 |
@@ -20,7 +20,7 @@ |
4 |
# end of the gcc command, which is useless in this case. So, I use |
4 |
# Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
5 |
# "include_dirs" instead. |
5 |
# MA 02111-1307, USA. |
6 |
|
6 |
|
7 |
+import os, re |
7 |
-import os, string, sys |
8 |
+ |
8 |
+import os, string, sys, re |
9 |
PACKAGE = "PyXMMS" |
9 |
from distutils.core import setup, Extension |
10 |
VERSION = "1.02" |
10 |
|
|
|
11 |
# Notes: |
12 |
@@ -36,7 +36,8 @@ |
13 |
|
14 |
PACKAGE = "pyxmms" |
15 |
VERSION = "1.03" |
11 |
-GLIB_CONFIG = "glib-config" |
16 |
-GLIB_CONFIG = "glib-config" |
12 |
+GLIB_CONFIG = os.environ['GLIB_CONFIG'] |
17 |
+GLIB_CONFIG = os.environ['GLIB_CONFIG'] |
13 |
+XMMS_CONFIG = os.environ['XMMS_CONFIG'] |
18 |
+XMMS_CONFIG = os.environ['XMMS_CONFIG'] |
14 |
|
19 |
|
15 |
def main(): |
20 |
def main(): |
16 |
glib_opts = {} |
21 |
glib_opts = {} |
17 |
@@ -51,6 +54,9 @@ |
22 |
@@ -52,6 +53,9 @@ |
18 |
# Suppress the -I in each -Idir output by glib-config --cflags (ugly) |
|
|
19 |
glib_include_dirs = map(lambda s: s[2:], |
23 |
glib_include_dirs = map(lambda s: s[2:], |
20 |
string.split(glib_opts["cflags"], ' ')) |
24 |
string.split(glib_opts["cflags"], ' ')) |
21 |
+ |
25 |
|
22 |
+ XMMSINCDIR = re.findall('-I([^ ]+)', os.popen(XMMS_CONFIG+" --cflags").read()) |
26 |
+ XMMSINCDIR = re.findall('-I([^ ]+)', os.popen(XMMS_CONFIG+" --cflags").read()) |
23 |
+ XMMSLIBDIR = re.findall('-L([^ ]+)', os.popen(XMMS_CONFIG+" --libs").read()) |
27 |
+ XMMSLIBDIR = re.findall('-L([^ ]+)', os.popen(XMMS_CONFIG+" --libs").read()) |
24 |
|
28 |
+ |
25 |
setup(name=PACKAGE, |
29 |
setup(name=PACKAGE, |
26 |
version=VERSION, |
30 |
version=VERSION, |
27 |
@@ -69,8 +75,9 @@ |
31 |
description="A Python interface to XMMS", |
|
|
32 |
@@ -69,8 +73,8 @@ |
28 |
keywords=["xmms"], |
33 |
keywords=["xmms"], |
29 |
py_modules=["xmms"], |
34 |
py_modules=["xmms"], |
30 |
ext_modules=[Extension("_xmms", ["_xmmsmodule.c"], |
35 |
ext_modules=[Extension("_xmms", ["_xmmsmodule.c"], |
31 |
- include_dirs=glib_include_dirs, |
36 |
- include_dirs=glib_include_dirs, |
|
|
37 |
- libraries=["xmms"], |
32 |
+ include_dirs=glib_include_dirs+XMMSINCDIR, |
38 |
+ include_dirs=glib_include_dirs+XMMSINCDIR, |
33 |
libraries=["xmms"], |
39 |
+ libraries=["xmms"], library_dirs=XMMSLIBDIR, |
34 |
+ library_dirs=XMMSLIBDIR, |
|
|
35 |
extra_link_args=[glib_opts["libs"]])]) |
40 |
extra_link_args=[glib_opts["libs"]])]) |
36 |
|
41 |
|
37 |
if __name__ == "__main__": main() |
42 |
if __name__ == "__main__": main() |