-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
58 lines (51 loc) · 1.55 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
# -*- coding: utf-8 -*-
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import os
import io
import json
from setuptools import setup, find_packages
# Helpers
def read(path):
basedir = os.path.dirname(__file__)
return io.open(os.path.join(basedir, path), encoding='utf-8').read()
def clean(deps):
res = []
for dep in deps:
if dep and not dep.startswith('#') and not dep.startswith('git') and not dep.startswith('-r'):
res.append(dep)
return res
# Prepare
readme = read('README.md')
license = read('LICENSE.txt')
requirements = clean(read('requirements.txt').split())
requirements_dev = clean(read('requirements.dev.txt').split())
package = json.loads(read('package.json'))
# Run
setup(
name=package['name'],
version=package['version'],
description=package['description'],
long_description=readme,
author=package['author'],
author_email=package['author_email'],
url=package['repository'],
license=package['license'],
include_package_data=True,
packages=find_packages(exclude=['examples', 'tests']),
package_dir={package['slug']: package['slug']},
install_requires=requirements,
tests_require=requirements_dev + requirements,
test_suite='nose.collector',
zip_safe=False,
keywords=package['keywords'],
classifiers=package['classifiers'],
entry_points={
'console_scripts': [
'openspending = oscli:cli',
'os = oscli:cli'
]
}
)