forked from fetchai/agents-aea
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathsetup.py
More file actions
129 lines (110 loc) · 4.32 KB
/
Copy pathsetup.py
File metadata and controls
129 lines (110 loc) · 4.32 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2021-2026 Valory AG
# Copyright 2018-2019 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ------------------------------------------------------------------------------
import os
import re
from typing import Dict
from setuptools import find_packages, setup # type: ignore
PACKAGE_NAME = "aea"
here = os.path.abspath(os.path.dirname(__file__))
def get_all_extras() -> Dict:
cli_deps = [
"click>=8.1.0,<8.4.0",
"pyyaml>=6.0.1,<7",
"packaging>=22.0,<27",
"pytest>=7.0,<10",
"coverage>=6.4.4,<9",
]
extras = {
"cli": cli_deps,
"test_tools": cli_deps,
}
# add "all" extras
extras["all"] = list(set(dep for e in extras.values() for dep in e))
return extras
all_extras = get_all_extras()
base_deps = [
"packaging>=22.0,<27",
"protobuf>=5,<7",
"pyyaml>=6.0.1,<7",
]
if os.name == "nt" or os.getenv("WIN_BUILD_WHEEL", None) == "1":
base_deps.append("pywin32>=304")
here = os.path.abspath(os.path.dirname(__file__))
about: Dict[str, str] = {}
with open(os.path.join(here, PACKAGE_NAME, "__version__.py"), "r") as f:
exec(f.read(), about)
def parse_readme():
with open("README.md", "r") as f:
readme = f.read()
# replace relative links of images
raw_url_root = "https://raw.githubusercontent.com/valory-xyz/open-aea/main/"
replacement = raw_url_root + r"\g<0>"
readme = re.sub(r"(?<=<img src=\")(/.*)(?=\")", replacement, readme, re.DOTALL)
header = re.search("<h1.*?(?=## )", readme, re.DOTALL).group(0)
get_started = re.search("## Get started.*?(?=## )", readme, re.DOTALL).group(0)
cite = re.search("## Cite.*$", readme, re.DOTALL).group(0)
return "\n".join([header, get_started, cite])
if __name__ == "__main__":
setup(
name=about["__title__"],
description=about["__description__"],
version=about["__version__"],
author=about["__author__"],
url=about["__url__"],
long_description=parse_readme(),
long_description_content_type="text/markdown",
package_data={"aea": ["py.typed"]},
packages=find_packages(include=["aea*"]),
classifiers=[
"Environment :: Console",
"Environment :: Web Environment",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: Microsoft",
"Operating System :: Unix",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Communications",
"Topic :: Internet",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
"Topic :: System",
],
install_requires=base_deps,
tests_require=["tox"],
extras_require=all_extras,
entry_points={"console_scripts": ["aea=aea.cli:cli"]},
zip_safe=False,
include_package_data=True,
license=about["__license__"],
python_requires=">=3.10,<3.15",
keywords="aea open-aea autonomous-economic-agents agent-framework multi-agent-systems multi-agent cryptocurrency cryptocurrencies dezentralized dezentralized-network",
project_urls={
"Bug Reports": "https://github.com/valory-xyz/open-aea/issues",
"Source": "https://github.com/valory-xyz/open-aea",
},
)