-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathsetup.py
39 lines (32 loc) · 1.21 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
# -*- coding: utf-8 -*-
import os
from setuptools import setup, Extension
import pkgconfig
libalpm = pkgconfig.parse('libalpm')
os.putenv('LC_CTYPE', 'en_US.UTF-8')
pyalpm_version = '0.10.6'
cflags = ['-Wall', '-Wextra', '-Werror',
'-Wno-unused-parameter', '-Wno-incompatible-pointer-types',
'-Wno-error=missing-field-initializers',
'-std=c99', '-D_FILE_OFFSET_BITS=64']
alpm = Extension('pyalpm',
**libalpm,
extra_compile_args=cflags + ['-DVERSION="%s"' % pyalpm_version],
language='C',
sources=['src/pyalpm.c',
'src/util.c',
'src/package.c',
'src/db.c',
'src/options.c',
'src/handle.c',
'src/transaction.c'],
depends=['src/handle.h',
'src/db.h',
'src/options.h',
'src/package.h',
'src/pyalpm.h',
'src/util.h'])
if __name__ == "__main__":
setup(version=pyalpm_version,
ext_modules=[alpm])
# vim: set ts=4 sw=4 et tw=0: