-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
39 lines (35 loc) · 1.18 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
import os
from setuptools import find_packages, setup
from glob import glob
from os.path import basename
from os.path import splitext
try: # for pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements
reqs_path = os.path.join(os.path.dirname(__file__), 'src/requirements.txt')
# parse_requirements() returns generator of pip.req.InstallRequirement objects
install_reqs = parse_requirements(reqs_path, session='hack')
# reqs is a list of requirement
# e.g. ['django==1.5.1', 'mezzanine==1.4.6']
reqs = [str(ir.req) for ir in install_reqs]
setup(
name='review-gator',
version='0.2',
install_requires=reqs,
url='',
license='',
author='fginther',
author_email='[email protected]',
description='Helpful utility to render merge proposals as HTML',
packages=find_packages('src'),
package_dir={'': 'src'},
py_modules=[splitext(basename(path))[0] for path in glob('src/review_gator/*.py')],
include_package_data=True,
entry_points={
'console_scripts': [
'review-gator = '
'review_gator.review_gator:main',
],
},
)