forked from repology/repology-updater
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·58 lines (52 loc) · 1.71 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env python3
import subprocess
from distutils.core import Extension, setup
def pkgconfig(package):
result = {}
for token in subprocess.check_output(['pkg-config', '--libs', '--cflags', package]).decode('utf-8').split():
if token.startswith('-I'):
result.setdefault('include_dirs', []).append(token[2:])
elif token.startswith('-L'):
result.setdefault('library_dirs', []).append(token[2:])
elif token.startswith('-l'):
result.setdefault('libraries', []).append(token[2:])
return result
setup(
name='repology',
version='0.0.0',
description='Compare package versions in many repositories',
author='Dmitry Marakasov',
author_email='[email protected]',
url='http://repology.org/',
packages=[
'repology',
'repology.fetchers',
'repology.parsers',
],
scripts=[
'repology-app.py',
'repology-benchmark.py',
'repology-dump.py',
'repology-gensitemap.py',
'repology-linkchecker.py',
'repology-update.py',
],
classifiers=[
'Topic :: System :: Archiving :: Packaging',
'Topic :: System :: Software Distribution',
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Environment :: Web Environment',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.6',
'Programming Language :: C',
],
ext_modules=[
Extension(
'repology.version',
sources=['repology/version.c'],
**pkgconfig('libversion')
)
]
)