-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
65 lines (57 loc) · 1.87 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
59
60
61
62
63
64
65
import re
from setuptools import setup, find_packages
VERSIONFILE = "modelmapper/__init__.py"
with open(VERSIONFILE, "r") as the_file:
verstrline = the_file.read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
def get_reqs(filename):
with open(filename, "r") as reqs_file:
reqs = reqs_file.readlines()
reqs = list(map(lambda x: x.replace('==', '>='), reqs))
return reqs
reqs = get_reqs("requirements.txt")
loader_reqs = get_reqs("requirements-loader.txt")
description = "Auto generate SQLalchemy models, cleaning and field normalization from your csv files."
try:
with open('README.rst') as file:
long_description = file.read()
except Exception:
long_description = description
setup(
name='modelmapper',
description=description,
long_description=long_description,
# long_description_content_type='text/markdown',
author='Sep Dehpour',
url='https://github.com/wearefair/modelmapper',
download_url='https://github.com/wearefair/modelmapper/tarball/master',
author_email='[email protected]',
version=verstr,
install_requires=reqs,
dependency_links=[],
extras={
'loader': loader_reqs
},
packages=find_packages(exclude=('tests', 'docs')),
include_package_data=True,
scripts=[],
test_suite="tests",
tests_require=['mock'],
classifiers=[
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Topic :: Software Development",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Development Status :: 5 - Production/Stable",
],
entry_points='''
[console_scripts]
modelmapper=modelmapper.management:cli
''',
)