ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/pystatgrab/setup.py
(Generate patch)

Comparing projects/pystatgrab/setup.py (file contents):
Revision 1.8 by tdb, Sat Mar 20 19:45:23 2004 UTC vs.
Revision 1.21 by tdb, Sat Mar 18 10:28:54 2006 UTC

# Line 1 | Line 1
1   #!/usr/bin/env python
2   #
3 < # setup.py - distfiles configuration for pystatgrab
3 > # i-scream pystatgrab
4 > # http://www.i-scream.org/pystatgrab/
5 > # Copyright (C) 2000-2004 i-scream
6   #
7 + # This program is free software; you can redistribute it and/or
8 + # modify it under the terms of the GNU General Public License
9 + # as published by the Free Software Foundation; either version 2
10 + # of the License, or (at your option) any later version.
11 + #
12 + # This program is distributed in the hope that it will be useful,
13 + # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 + # GNU General Public License for more details.
16 + #
17 + # You should have received a copy of the GNU General Public License
18 + # along with this program; if not, write to the Free Software
19 + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
20 + #
21   # $Id$
22   #
23   """Python bindings for libstatgrab."""
# Line 13 | Line 29 | import sys
29   import os
30  
31   # version of pystatgrab
32 < VERSION = "0.1"
32 > VERSION = "0.5"
33  
34   # required version of libstatgrab
35 < LIBSTATGRAB = "0.9"
35 > LIBSTATGRAB = "0.12"
36  
37   # test for pkg-config presence
38   if os.system("pkg-config --version >/dev/null 2>&1"):
# Line 30 | Line 46 | if os.system("pkg-config --exists libstatgrab"):
46   if os.system("pkg-config --atleast-version=%s libstatgrab" % LIBSTATGRAB):
47          sys.exit("Error, need at least libstatgrab version %s." % LIBSTATGRAB)
48  
49 < # test for statgrab.c, and try to generate if not found
50 < if not os.path.exists("statgrab.c"):
51 <        print "statgrab.c doesn't exist, trying to use pyrexc to generate it..."
49 > # test for _statgrab.c, and try to generate if not found
50 > if not os.path.exists("_statgrab.c"):
51 >        print "_statgrab.c doesn't exist, trying to use pyrexc to generate it..."
52          if os.system("pyrexc --version >/dev/null 2>&1"):
53 <                sys.exit("Error, statgrab.c not present, and can't find pyrexc to generate it with.")
53 >                sys.exit("Error, _statgrab.c not present, and can't find pyrexc to generate it with.")
54          else:
55 <                if os.system("pyrexc statgrab.pyx"):
56 <                        sys.exit("Error, pyrexc failed to generate statgrab.c")
55 >                if os.system("pyrexc _statgrab.pyx"):
56 >                        sys.exit("Error, pyrexc failed to generate _statgrab.c")
57  
58   # get cflags and libs for libstatgrab
59   cflags = getstatusoutput("pkg-config --cflags libstatgrab")
# Line 47 | Line 63 | if cflags[0] != 0:
63          sys.exit("Failed to get cflags: " + cflags[1])
64  
65   if libs[0] != 0:
66 <        exit("Failed to get libs: " + libs[1])
66 >        sys.exit("Failed to get libs: " + libs[1])
67  
68   # setup information
69   setup(  name = "pystatgrab",
70          version = VERSION,
71          description = "Python bindings for libstatgrab",
72          author = "i-scream",
73 <        author_email = "dev@i-scream.org",
74 <        url = "http://www.i-scream.org/libstatgrab/",
73 >        author_email = "support@i-scream.org",
74 >        url = "http://www.i-scream.org/pystatgrab/",
75          license = "GNU GPL v2 or later",
76          ext_modules=[Extension(
77 <                "statgrab",
78 <                ["statgrab.c"],
77 >                "_statgrab",
78 >                ["_statgrab.c"],
79                  extra_compile_args = cflags[1].split(),
80                  extra_link_args = libs[1].split(),
81          )],
82 +        py_modules=["statgrab"],
83   )

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines