-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsetup.py
executable file
·56 lines (45 loc) · 1.24 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
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup, find_packages
CURRDIR = os.path.dirname(os.path.abspath(__file__))
setup_args = dict(
name='kictor',
version='0.0.1',
description='A dictionary based on the console',
packages=find_packages(exclude=("tests", "tests.*")),
author='huoty',
author_email='sudohuoty@163.com',
url='https://github.com/kuanghy/kictor',
zip_safe=False,
platforms=["any"],
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
],
)
def get_version():
version = '1.0'
scope = {}
version_file = os.path.join(CURRDIR, "kictor", "version.py")
if os.path.exists(version_file):
with open(version_file) as fp:
exec(fp.read(), scope)
version = scope.get('__version__', '1.0')
return version
def main():
setup_args["version"] = get_version()
setup_args["entry_points"] = {
'console_scripts': [
'kict=kictor.cli:main',
],
}
setup_args["extras_require"] = {
'full': [
"lxml",
],
}
setup(**setup_args)
if __name__ == "__main__":
main()