setup.py 1.19 KB
Newer Older
Rémy Oudompheng's avatar
Rémy Oudompheng committed
1
2
# -*- coding: utf-8 -*-
import os
3
4
from setuptools import setup, Extension

5
6
import pkgconfig
libalpm = pkgconfig.parse('libalpm')
Imanol Celaya's avatar
Imanol Celaya committed
7

Rémy Oudompheng's avatar
Rémy Oudompheng committed
8
9
os.putenv('LC_CTYPE', 'en_US.UTF-8')

Jelle van der Waa's avatar
Jelle van der Waa committed
10
pyalpm_version = '0.10.4'
Rémy Oudompheng's avatar
Rémy Oudompheng committed
11

12
13
14
15
16
cflags = ['-Wall', '-Wextra', '-Werror',
          '-Wno-unused-parameter', '-Wno-incompatible-pointer-types',
          '-Wno-cast-function-type', '-std=c99', '-D_FILE_OFFSET_BITS=64']

alpm = Extension('pyalpm',
17
                 **libalpm,
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
                 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'])
33

34
if __name__ == "__main__":
35
36
    setup(version=pyalpm_version,
          ext_modules=[alpm])
Rémy Oudompheng's avatar
Rémy Oudompheng committed
37
38

# vim: set ts=4 sw=4 et tw=0: