setup.py 2.15 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

Imanol Celaya's avatar
Imanol Celaya committed
5

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

Jelle van der Waa's avatar
Jelle van der Waa committed
8
pyalpm_version = '0.8.5'
Rémy Oudompheng's avatar
Rémy Oudompheng committed
9

10
11
PYCMAN_SCRIPTS = ['database', 'deptest', 'query', 'remove', 'sync', 'upgrade', 'version']

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
if __name__ == "__main__":

    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',
                     libraries=['alpm'],
                     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'])

Jelle van der Waa's avatar
Jelle van der Waa committed
36
    with open("README.md", "r") as fh:
37
38
39
40
41
42
43
44
45
46
47
        long_description = fh.read()

    setup(name='pyalpm',
          version=pyalpm_version,
          description='libalpm bindings for Python 3',
          long_description=long_description,
          long_description_content_type="text/markdown",
          author="Rémy Oudompheng",
          author_email="remy@archlinux.org",
          url="https://projects.archlinux.org/pyalpm.git",
          packages=["pycman"],
48
          scripts=["scripts/lsoptdepends"] + [f'scripts/pycman-{p}' for p in PYCMAN_SCRIPTS],
49
50
51
52
53
54
55
56
          ext_modules=[alpm],
          classifiers=[
              'Development Status :: 6 - Mature',
              'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
              'Topic :: System :: Software Distribution '
              'Topic :: System :: Systems Administration'
              'Programming Language :: C',
          ])
Rémy Oudompheng's avatar
Rémy Oudompheng committed
57
58

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