-
Notifications
You must be signed in to change notification settings - Fork 15
/
setup.py
56 lines (48 loc) · 1.74 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
import os
import pip
from setuptools import setup, find_packages
from codecs import open
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
def parse_requirements():
"""Return abstract requirements (without version numbers)
from requirements.txt.
As an exception, requirements that are URLs are used as-is.
This is tested to be compatible with pip 9.0.1.
Background: https://stackoverflow.com/a/42033122/
"""
path = os.path.join(os.path.dirname(__file__), 'requirements.txt')
requirements = pip.req.parse_requirements(
path, session=pip.download.PipSession()
)
requirements = [
req.name or req.link.url
for req in requirements
if 'git+' not in (req.name or req.link.url)
]
return requirements
install_requires = parse_requirements()
setup(
name='ccdb5-api',
version_format='{tag}.dev{commitcount}+{gitsha}',
description='Complaint Search API',
long_description=long_description,
url='https://github.com/cfpb/ccdb5-api',
author='CFPB',
author_email='tech@cfpb.gov',
license='CC0',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'Topic :: Internet :: WWW/HTTP :: Indexing/Search',
'License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Framework :: Django :: 1.8',
],
keywords='complaint search api',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
setup_requires=['setuptools-git-version==1.0.3'],
install_requires=install_requires,
)