-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
36 lines (30 loc) · 907 Bytes
/
setup.py
File metadata and controls
36 lines (30 loc) · 907 Bytes
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
from distutils.core import setup, Extension
import glob
import os
name = "inotify"
version = "0.8.0"
description = "Python inotify wrapper and enhanced inotify tool"
source_root = "src"
packages = ["inotify"]
extensions = ["inotify.binding"]
# auto generated
package_dir = dict(zip(
packages,
[os.path.join(source_root, p) for p in packages]
))
ext_modules = []
for ext in extensions:
ext_root = os.path.join(source_root, *ext.split("."))
ext_sources = []
for root, dirs, files in os.walk(ext_root):
c_files = filter(lambda f: f.endswith(".c"), files)
ext_sources += [os.path.join(root, f) for f in c_files]
ext_modules.append(Extension(ext, sources=ext_sources))
setup(
name = name,
version = version,
description = description,
packages = packages,
package_dir = package_dir,
ext_modules = ext_modules,
)