-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsetup.py
41 lines (34 loc) · 1.16 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
# -*- coding: utf-8 -*-
#
# H A P P Y H A C K I N G !
# _____ ______
# ____==== ]OO|_n_n__][. | |
# [________]_|__|________)< |YANG|
# oo oo 'oo OOOO-| oo\\_ ~o~~o~
# +--+--+--+--+--+--+--+--+--+--+--+--+--+
# Jianing Yang @ 8 Feb, 2018
#
from os.path import dirname, realpath, join as path_join
from setuptools import setup, find_packages
package = 'tornado_battery'
version = '0.8.1'
def valid_requirement(line):
if not line:
return False
else:
ch = line[0]
return ch not in ('#', '-')
def parse_requirements(filename):
""" load requirements from a pip requirements file """
root = dirname(realpath(__file__))
line_iter = (line.strip() for line in open(path_join(root, filename)))
return [line for line in line_iter if valid_requirement(line)]
setup(
name=package,
version=version,
description='utilities that help write tornado apps quickly and easily',
url='https://github.com/jianingy/tornado_battery',
setup_requires=['pytest-runner'],
packages=find_packages(),
install_requires=parse_requirements('requirements.txt'),
)