-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
68 lines (60 loc) · 1.9 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
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import codecs
import os
import re
from setuptools import setup
root_dir = os.path.abspath(os.path.dirname(__file__))
def get_version(version_file_name):
version_re = re.compile(r"^__version__ = [\"']([\w_.-]+)[\"']$")
init_path = os.path.join(root_dir, version_file_name)
with codecs.open(init_path, 'r', 'utf-8') as f:
for line in f:
match = version_re.match(line[:-1])
if match:
return match.groups()[0]
return '0.1.0'
PACKAGE = 'kconfgen'
SRC_DIR = 'src'
setup(
name='kconfgen',
version=get_version('%s/%s/__init__.py' % (SRC_DIR, PACKAGE)),
description="A generator of (minimal) Linux kernel configuration files.",
long_description=codecs.open(os.path.join(root_dir, 'README.rst'), 'r', 'utf-8').read(),
author="Raphaël Barrois",
author_email='raphael.barrois+%[email protected]' % PACKAGE,
url='https://github.com/rbarrois/%s' % PACKAGE,
keywords=['kconfgen', 'kconfig', 'kernel', 'linux', 'configuration', 'generator'],
packages=[PACKAGE],
package_dir={'': SRC_DIR},
zip_safe=False,
license='MIT',
python_requires=">=3.5",
install_requires=[
'kconfiglib',
'toml',
],
setup_requires=[
'setuptools>=0.8',
],
tests_require=[
# 'mock',
],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
],
test_suite='',
test_loader='unittest:TestLoader',
entry_points={
'console_scripts': [
'kconfgen=kconfgen.cli:main',
],
},
)