-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
58 lines (51 loc) · 2.01 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 os
from setuptools import setup, find_packages
try:
'''
in no case, setup should fail.
take care of it that setup.py should not fail due to change in other files.
if it fails it will cause a serious problem
we can detect that from version number that will be installed during failure
if your version is 1.0.0 please report [email protected]
'''
from coolkit import __version__, __mod_name__
from coolkit.dependencies.dependencies import dependency_map
from coolkit.dependencies.dependency import install_arg_complete, install_dependencies
install_dependencies(dependency_map,verbose=True)
install_arg_complete()
except:
__version__ = '0.0.1'
__mod_name__ = 'coolkit'
print('something really bad happened, please report to [email protected]')
try:
with open("README.md", 'r') as f:
long_description = f.read()
with open('requirements.txt', 'r') as f:
requirements = [line.strip() for line in f.readlines()]
except:
long_description='A command line tool for competitive programming',
requirements = []
setup(
name=__mod_name__,
version=__version__,
description='A command line tool for competitive programming',
long_description=long_description,
long_description_content_type='text/markdown',
author='Sarbjit Singh',
author_email='[email protected]',
url='http://github.com/srbcheema1/CoolKit',
# packages=[__mod_name__,__mod_name__+'.lib',__mod_name__+'.dependencies'], #same as name of directories
packages=find_packages(), # provides same list, looks for __init__.py file in dir
include_package_data=True,
install_requires=requirements, #external packages as dependencies
entry_points={
'console_scripts': [__mod_name__+'='+__mod_name__+'.main:main']
},
classifiers=[
'Operating System :: POSIX :: Linux',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.5',
],
license='MIT License',
)