forked from karlorg/drunken-octo-avenger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
80 lines (72 loc) · 2.38 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
78
79
80
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
from pip.req import parse_requirements
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
elif sys.argv[-1] == 'lint':
# For this to work you need to install pylint
# pip install pylint
os.system('pylint app')
sys.exit()
elif sys.argv[-1] == 'flake':
# For this to work you will need to install flake8
# pip install flake8
os.system('flake8 app')
sys.exit()
elif sys.argv[-1] == 'coverage':
# For this to work you will need to install coverage
# pip install coverage
os.system('coverage run --source app setup.py test')
os.system('coverage report -m')
os.system('coverage html')
sys.exit()
# It is kind of annoying that github reads in a 'README.md' whilst pypi
# requires rich structured text. Otherwise for this we could simple do a
# `open(README.md').read()`
# This is not a big problem here as we are unlikely to publish this to pypi
# anyway.
readme = """
A rather immature project aimed at creating a usable online Go server for
turn-based games.
"""
if sys.version_info < (3, 0):
# parse_requirements() returns generator of
# pip.req.InstallRequirement objects
install_reqs = parse_requirements("requirements.txt")
else:
install_reqs = parse_requirements("p3req.txt")
setup(
name='drunken-octo-avenger',
version='0.1.0',
description="""A simple web application for an online Go server for
turn based games.
""",
long_description=readme + '\n\n',
author='Karl Naylor',
author_email='[email protected]',
url='https://github.com/karlorg/drunken-octo-avenger',
include_package_data=True,
install_requires=[str(ir.req) for ir in install_reqs],
license="CC0",
zip_safe=False,
keywords='Go web game',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: CC0 License',
'Natural Language :: English',
"Programming Language :: Python :: 2",
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
],
test_suite='app.tests',
)