-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
76 lines (65 loc) · 2.42 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
76
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import ast
import os
from setuptools import setup, find_packages
def local_file(*f):
with open(os.path.join(os.path.dirname(__file__), *f), "r") as fd:
return fd.read()
class VersionFinder(ast.NodeVisitor):
VARIABLE_NAME = "version"
def __init__(self):
self.version = None
def visit_Assign(self, node):
try:
if node.targets[0].id == self.VARIABLE_NAME:
self.version = node.value.s
except Exception:
self.version = None
def read_version():
finder = VersionFinder()
finder.visit(ast.parse(local_file("agentzero", "version.py")))
return finder.version
README = local_file("README.rst")
# print(f"\n{' ' * 10}\n{README}\n{' ' * 10}\n")
setup(
name="agentzero",
version=read_version(),
description="\n".join(
[
"AgentZero lets you create, connect, bind, and modify zeromq sockets in runtime with ease.",
"It works great with gevent, making it possible to create network applications with simple code that performs complex operations.",
]
),
long_description=README,
long_description_content_type='text/x-rst',
entry_points={
"console_scripts": ["agentzero = agentzero.console.main:entrypoint"]
},
author="Gabriel Falcao",
author_email="[email protected]",
url="https://github.com/gabrielfalcao/agentzero",
packages=find_packages(exclude=["*tests*"]),
install_requires=local_file("requirements.txt").splitlines(),
python_requires=">=3.6",
include_package_data=True,
package_data={
"agentzero": "COPYING *.rst *.md agentzero/web agentzero/web/* agentzero/web/dist agentzero/web/dist/* agentzero/web/templates agentzero/web/templates/*".split()
},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: Web Environment",
"Environment :: MacOS X",
"Environment :: Handhelds/PDA's",
"Environment :: Win32 (MS Windows)",
"Environment :: X11 Applications",
"License :: OSI Approved :: MIT License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: Implementation :: CPython",
],
zip_safe=False,
)