-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
62 lines (48 loc) · 1.85 KB
/
setup.py
File metadata and controls
62 lines (48 loc) · 1.85 KB
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
"""
CMAP Trip-based Model Code
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
import os
import re
here = os.path.abspath(os.path.dirname(__file__))
def version(path):
"""Obtain the packge version from a python file e.g. pkg/__init__.py
See <https://packaging.python.org/en/latest/single_source_version.html>.
"""
with open(os.path.join(here, path), encoding='utf-8') as f:
version_file = f.read()
version_match = re.search(r"""^__version__ = ['"]([^'"]*)['"]""",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
VERSION = version('cmap_modedest/__init__.py')
# Get the long description from the README file
with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
with open('requirements.txt') as f:
requirements_lines = f.readlines()
install_requires = [r.strip() for r in requirements_lines]
setup(
name='cmap_modedest',
version=VERSION,
description='CMAP Trip-based model',
long_description=long_description,
url='https://github.com/CMAP-REPOS/cmap_trip-based_model',
# You can just specify the packages manually here if your project is
# simple. Or you can use find_packages().
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
# List run-time dependencies here. These will be installed by pip when
# your project is installed. For an analysis of "install_requires" vs pip's
# requirements files see:
# https://packaging.python.org/en/latest/requirements.html
install_requires=install_requires,
entry_points={
"console_scripts": [
"cmap_modedest = cmap_modedest.__main__:main"
]
},
)