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

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

Rémy Oudompheng's avatar
Rémy Oudompheng committed
7
pyalpm_version = '0.8'
Rémy Oudompheng's avatar
Rémy Oudompheng committed
8

Jelle van der Waa's avatar
Jelle van der Waa committed
9
cflags = ['-Wall', '-Wextra', '-Werror',
10
11
12
    '-Wconversion',
    '-Wno-unused-parameter',
    '-Wno-unused-function',
13
    '-Wno-format',
14
    '-Wdeclaration-after-statement',
15
    '-std=c99', '-D_FILE_OFFSET_BITS=64']
16

17
alpm = Extension('pyalpm',
18
    libraries = ['alpm'],
Rémy Oudompheng's avatar
Rémy Oudompheng committed
19
    extra_compile_args = cflags + ['-DVERSION="%s"' % pyalpm_version],
Rémy Oudompheng's avatar
Rémy Oudompheng committed
20
    language = 'C',
Rémy Oudompheng's avatar
Rémy Oudompheng committed
21
22
23
24
    sources = [
        'src/pyalpm.c',
        'src/util.c',
        'src/package.c',
25
26
        'src/db.c',
        'src/options.c',
27
        'src/handle.c',
28
        'src/transaction.c'
Rémy Oudompheng's avatar
Rémy Oudompheng committed
29
30
        ],
    depends = [
31
        'src/handle.h',
Rémy Oudompheng's avatar
Rémy Oudompheng committed
32
33
34
35
36
        'src/db.h',
        'src/options.h',
        'src/package.h',
        'src/pyalpm.h',
        'src/util.h',
Rémy Oudompheng's avatar
Rémy Oudompheng committed
37
        ])
38

39
setup(name = 'pyalpm',
Rémy Oudompheng's avatar
Rémy Oudompheng committed
40
      version = pyalpm_version,
Rémy Oudompheng's avatar
Rémy Oudompheng committed
41
42
43
44
      description = 'libalpm bindings for Python 3',
      author = "Rémy Oudompheng",
      author_email = "remy@archlinux.org",
      url = "http://projects.archlinux.org/users/remy/pyalpm.git",
45
      packages = ["pycman"],
46
47
      scripts = ["scripts/lsoptdepends"] + ["scripts/pycman-" + i
          for i in ['database', 'deptest', 'query', 'remove', 'sync', 'upgrade', 'version']],
48
      ext_modules = [alpm])
Rémy Oudompheng's avatar
Rémy Oudompheng committed
49
50

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