-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
53 lines (47 loc) · 1.44 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
# pylint: disable=missing-module-docstring,invalid-name
import os
from textwrap import dedent
from setuptools import find_packages, setup
with open("requirements.txt", "r") as f:
requirements = list(
filter(lambda line: not line.startswith("--"), f.read().splitlines())
)
try:
with open("requirements-dev.txt", "r") as f:
requirements_dev = list(
filter(lambda line: not line.startswith("--"), f.read().splitlines())
)
except FileNotFoundError:
requirements_dev = []
with open("VERSION", "r") as f:
version = f.read().strip()
with open("src/conexample/version.py", "w") as f:
f.write(
dedent(
"""\
# pylint: disable=missing-docstring
__version__ = "{version}"
""".format(
version=version
)
)
)
setup(
name="conexample",
version=version,
description="Example connexion application.",
author="Michał Getka",
author_email="[email protected]",
url="https://github.com/mgetka/connexion-example",
python_requires=">=3.7",
include_package_data=True,
packages=find_packages("src"),
package_dir={"": "src"},
package_data={"conexample": ["*.env"], "conexample.api.rest": ["*.yml"],},
install_requires=requirements,
extras_require={"dev": requirements_dev},
entry_points="""
[console_scripts]
conexample-dev=conexample.entrypoint:run_dev
""",
)