-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
77 lines (68 loc) · 2.04 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
69
70
71
72
73
74
75
76
77
import ast
import os
import sys
from setuptools import (
find_packages,
setup,
)
def get_version():
path = os.path.join(os.path.dirname(__file__), 'query_lsf', '__init__.py')
with open(path) as file:
for line in file:
if line.startswith('__version__'):
_, value = line.split('=', maxsplit=1)
return ast.literal_eval(value.strip())
else:
raise Exception('Version not found in {}'.format(path))
# Allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
# Check python version
py_version = sys.version_info[:2]
if py_version < (3, 4):
raise Exception('This project requires Python >= 3.4')
# Development requirements
# Note: These are just tools that aren't required, so a version range
# is not necessary here.
dev_require = [
'flake8>=3.3.0',
'isort>=4.2.5',
]
setup(
name='query-lsf',
version=get_version(),
packages=find_packages(),
install_requires=[
'beautifulsoup4>=4.6.0,<5',
'keyring>=10.4.0,<11',
'logbook>=1.1.0,<2',
'requests>=2.18.4,<3',
],
tests_require=dev_require,
extras_require={
'dev': dev_require,
},
include_package_data=True,
entry_points={
'console_scripts': [
'query-lsf = query_lsf.__main__:main',
],
},
# PyPI metadata
author='Lennart Grahl',
author_email='[email protected]',
description='Query the LSF (qis server) for (new) marks.',
license='MIT',
keywords='lsf qis marks university',
url='https://github.com/lgrahl/query-lsf-marks',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Environment :: Web Environment',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Topic :: Internet',
],
)