-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
66 lines (57 loc) · 2.18 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import ez_setup
ez_setup.use_setuptools()
from setuptools import setup, Extension, find_packages
import os
class PkgConfig(object):
def __init__(self, names):
def stripfirsttwo(string):
return string[2:]
self.libs = map(stripfirsttwo, os.popen("pkg-config --libs-only-l %s" % names).read().split())
self.libdirs = map(stripfirsttwo, os.popen("pkg-config --libs-only-L %s" % names).read().split())
self.incdirs = map(stripfirsttwo, os.popen("pkg-config --cflags-only-I %s" % names).read().split())
flags = PkgConfig("glib-2.0 pygobject-2.0 midgard3")
setup(
name = 'python-midgard3',
version = '10.05.99',
author = "Midgard Project",
author_email = "[email protected]",
description = "Python bindings for Midgard3",
license = "LGPL",
url = "http://www.midgard-project.org/",
packages = find_packages(),
ext_modules = [
Extension(
'_midgard',
[
"midgardmodule.c",
"py_midgard_blob.c",
"py_midgard_collector.c",
"py_midgard_config.c",
"py_midgard_connection.c",
"py_midgard_dbobject.c",
"py_midgard_dbus.c",
"py_midgard_key_config.c",
"py_midgard_key_config_context.c",
"py_midgard_key_config_file.c",
"py_midgard_key_config_file_context.c",
"py_midgard_object.c",
"py_midgard_object_attachment.c",
"py_midgard_object_parameter.c",
"py_midgard_query_builder.c",
"py_midgard_reflector_property.c",
"py_midgard_reflector_object.c",
"py_midgard_replicator.c",
"py_midgard_storage.c",
"py_midgard_schema_object_tree.c",
"py_midgard_schema_object_factory.c",
"py_midgard_transaction.c",
"py_midgard_user.c",
"py_midgard_view.c",
],
include_dirs = flags.incdirs + ['.'],
libraries = flags.libs,
library_dirs = flags.libdirs,
runtime_library_dirs = flags.libdirs
),
],
)