-
Notifications
You must be signed in to change notification settings - Fork 48
/
setup.py
75 lines (66 loc) · 2.39 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
66
67
68
69
70
71
72
73
74
75
from setuptools import find_packages, setup
from version import VERSION
def read_requirements(filename: str):
with open(filename) as requirements_file:
import re
def fix_url_dependencies(req: str) -> str:
"""Pip and setuptools disagree about how URL dependencies should be handled."""
m = re.match(
r"^(git\+)?(https|ssh)://(git@)?github\.com/([\w-]+)/(?P<name>[\w-]+)\.git", req
)
if m is None:
return req
else:
return f"{m.group('name')} @ {req}"
requirements = []
for line in requirements_file:
line = line.strip()
if line.startswith("#") or len(line) <= 0:
continue
requirements.append(fix_url_dependencies(line))
return requirements
# # version.py defines the VERSION and VERSION_SHORT variables.
# # We use exec here, so we don't import cached_path whilst setting up.
# VERSION = {} # type: ignore
# with open("version.py", "r") as version_file:
# exec(version_file.read(), VERSION)
with open("README.md", "r", encoding="utf-8") as fp:
README = fp.read()
with open("HISTORY.rst", "r", encoding="utf-8") as fp:
HISTORY = fp.read()
setup(
name='aaz-dev',
version=VERSION,
description='Microsoft Atomic Azure CLI Commands Developer Tools',
long_description=README,
long_description_content_type='text/markdown',
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"Environment :: Console",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10"
],
keywords="azure",
url="https://github.com/Azure/aaz-dev-tools",
author="Microsoft Corporation",
author_email="[email protected]",
license='MIT',
package_dir={
"": "src"
},
packages=find_packages(
where="src",
exclude=["*.tests", "*.tests.*", "tests.*", "tests"],
),
include_package_data=True,
install_requires=read_requirements("requirements.txt"),
python_requires=">=3.8",
entry_points={
"console_scripts": ["aaz-dev=aaz_dev.app.main:main"]
},
)