-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·33 lines (22 loc) · 833 Bytes
/
setup.py
File metadata and controls
executable file
·33 lines (22 loc) · 833 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
#!/usr/local/bin/python3.6
'''
Created on 30 Jun 2014
@author: julianporter
'''
from setuptools import setup, Extension
from setuptools.config import read_configuration
configuration=read_configuration('setup.cfg')
metadata=configuration['metadata']
package=metadata['name']
version=metadata['version']
libsrc=['errors.cpp','event.cpp','mask.cpp','notifier.cpp']
src=['notifier/'+x for x in libsrc]
src.extend(['utils.cpp','fileEvent.cpp','watcher.cpp','INotify.cpp'])
majorV,minorV = version.split('.')
module1 = Extension('pollinotify',
define_macros = [('MAJOR_VERSION', majorV),
('MINOR_VERSION', minorV)],
language = 'c++',
sources = ['src/'+s for s in src])
setup (ext_modules = [module1],
test_suite = 'tests')