Auto status change to "Under Review"
Show More
@@ -1,98 +1,99 b'' | |||||
1 | import os |
|
1 | import os | |
2 | import re |
|
2 | import re | |
3 |
|
3 | |||
4 | from setuptools import setup, find_packages |
|
4 | from setuptools import setup, find_packages | |
5 |
|
5 | |||
6 | here = os.path.abspath(os.path.dirname(__file__)) |
|
6 | here = os.path.abspath(os.path.dirname(__file__)) | |
7 | README = open(os.path.join(here, "README.md")).read() |
|
7 | README = open(os.path.join(here, "README.md")).read() | |
8 | CHANGES = open(os.path.join(here, "CHANGELOG.md")).read() |
|
8 | CHANGES = open(os.path.join(here, "CHANGELOG.md")).read() | |
9 |
|
9 | |||
10 | REQUIREMENTS = open(os.path.join(here, "requirements.txt")).readlines() |
|
10 | REQUIREMENTS = open(os.path.join(here, "requirements.txt")).readlines() | |
11 |
|
11 | |||
12 | compiled = re.compile("([^=><]*).*") |
|
12 | compiled = re.compile("([^=><]*).*") | |
13 |
|
13 | |||
14 |
|
14 | |||
15 | def parse_req(req): |
|
15 | def parse_req(req): | |
16 | return compiled.search(req).group(1).strip() |
|
16 | return compiled.search(req).group(1).strip() | |
17 |
|
17 | |||
18 |
|
18 | |||
19 | if "APPENLIGHT_DEVELOP" in os.environ: |
|
19 | if "APPENLIGHT_DEVELOP" in os.environ: | |
20 | requires = [_f for _f in map(parse_req, REQUIREMENTS) if _f] |
|
20 | requires = [_f for _f in map(parse_req, REQUIREMENTS) if _f] | |
21 | else: |
|
21 | else: | |
22 | requires = REQUIREMENTS |
|
22 | requires = REQUIREMENTS | |
23 |
|
23 | |||
24 |
|
24 | |||
25 | def _get_meta_var(name, data, callback_handler=None): |
|
25 | def _get_meta_var(name, data, callback_handler=None): | |
26 | import re |
|
26 | import re | |
27 |
|
27 | |||
28 | matches = re.compile(r"(?:%s)\s*=\s*(.*)" % name).search(data) |
|
28 | matches = re.compile(r"(?:%s)\s*=\s*(.*)" % name).search(data) | |
29 | if matches: |
|
29 | if matches: | |
30 | if not callable(callback_handler): |
|
30 | if not callable(callback_handler): | |
31 | callback_handler = lambda v: v |
|
31 | callback_handler = lambda v: v | |
32 |
|
32 | |||
33 | return callback_handler(eval(matches.groups()[0])) |
|
33 | return callback_handler(eval(matches.groups()[0])) | |
34 |
|
34 | |||
35 |
|
35 | |||
36 | with open(os.path.join(here, "src", "appenlight", "__init__.py"), "r") as _meta: |
|
36 | with open(os.path.join(here, "src", "appenlight", "__init__.py"), "r") as _meta: | |
37 | _metadata = _meta.read() |
|
37 | _metadata = _meta.read() | |
38 |
|
38 | |||
39 | __license__ = _get_meta_var("__license__", _metadata) |
|
39 | __license__ = _get_meta_var("__license__", _metadata) | |
40 | __author__ = _get_meta_var("__author__", _metadata) |
|
40 | __author__ = _get_meta_var("__author__", _metadata) | |
41 | __url__ = _get_meta_var("__url__", _metadata) |
|
41 | __url__ = _get_meta_var("__url__", _metadata) | |
42 |
|
42 | |||
43 | found_packages = find_packages("src") |
|
43 | found_packages = find_packages("src") | |
|
44 | found_packages.append("appenlight.migrations") | |||
44 | found_packages.append("appenlight.migrations.versions") |
|
45 | found_packages.append("appenlight.migrations.versions") | |
45 | setup( |
|
46 | setup( | |
46 | name="appenlight", |
|
47 | name="appenlight", | |
47 | description="appenlight", |
|
48 | description="appenlight", | |
48 | long_description=README, |
|
49 | long_description=README, | |
49 | classifiers=[ |
|
50 | classifiers=[ | |
50 | "Framework :: Pyramid", |
|
51 | "Framework :: Pyramid", | |
51 | "License :: OSI Approved :: Apache Software License", |
|
52 | "License :: OSI Approved :: Apache Software License", | |
52 | "Programming Language :: Python", |
|
53 | "Programming Language :: Python", | |
53 | "Programming Language :: Python :: 3 :: Only", |
|
54 | "Programming Language :: Python :: 3 :: Only", | |
54 | "Programming Language :: Python :: 3.6", |
|
55 | "Programming Language :: Python :: 3.6", | |
55 | "Topic :: System :: Monitoring", |
|
56 | "Topic :: System :: Monitoring", | |
56 | "Topic :: Software Development", |
|
57 | "Topic :: Software Development", | |
57 | "Topic :: Software Development :: Bug Tracking", |
|
58 | "Topic :: Software Development :: Bug Tracking", | |
58 | "Topic :: Internet :: Log Analysis", |
|
59 | "Topic :: Internet :: Log Analysis", | |
59 | "Topic :: Internet :: WWW/HTTP", |
|
60 | "Topic :: Internet :: WWW/HTTP", | |
60 | "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", |
|
61 | "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", | |
61 | ], |
|
62 | ], | |
62 | version="2.0.0rc1", |
|
63 | version="2.0.0rc1", | |
63 | license=__license__, |
|
64 | license=__license__, | |
64 | author=__author__, |
|
65 | author=__author__, | |
65 | url=__url__, |
|
66 | url=__url__, | |
66 | keywords="web wsgi bfg pylons pyramid flask django monitoring apm instrumentation appenlight", |
|
67 | keywords="web wsgi bfg pylons pyramid flask django monitoring apm instrumentation appenlight", | |
67 | python_requires=">=3.5", |
|
68 | python_requires=">=3.5", | |
68 | long_description_content_type="text/markdown", |
|
69 | long_description_content_type="text/markdown", | |
69 | package_dir={"": "src"}, |
|
70 | package_dir={"": "src"}, | |
70 | packages=found_packages, |
|
71 | packages=found_packages, | |
71 | include_package_data=True, |
|
72 | include_package_data=True, | |
72 | zip_safe=False, |
|
73 | zip_safe=False, | |
73 | test_suite="appenlight", |
|
74 | test_suite="appenlight", | |
74 | install_requires=requires, |
|
75 | install_requires=requires, | |
75 | extras_require={ |
|
76 | extras_require={ | |
76 | "dev": [ |
|
77 | "dev": [ | |
77 | "coverage", |
|
78 | "coverage", | |
78 | "pytest", |
|
79 | "pytest", | |
79 | "pyramid", |
|
80 | "pyramid", | |
80 | "tox", |
|
81 | "tox", | |
81 | "mock", |
|
82 | "mock", | |
82 | "pytest-mock", |
|
83 | "pytest-mock", | |
83 | "webtest", |
|
84 | "webtest", | |
84 | ], |
|
85 | ], | |
85 | "lint": ["black"], |
|
86 | "lint": ["black"], | |
86 | }, |
|
87 | }, | |
87 | entry_points={ |
|
88 | entry_points={ | |
88 | "paste.app_factory": ["main = appenlight:main"], |
|
89 | "paste.app_factory": ["main = appenlight:main"], | |
89 | "console_scripts": [ |
|
90 | "console_scripts": [ | |
90 | "appenlight-cleanup = appenlight.scripts.cleanup:main", |
|
91 | "appenlight-cleanup = appenlight.scripts.cleanup:main", | |
91 | "appenlight-initializedb = appenlight.scripts.initialize_db:main", |
|
92 | "appenlight-initializedb = appenlight.scripts.initialize_db:main", | |
92 | "appenlight-migratedb = appenlight.scripts.migratedb:main", |
|
93 | "appenlight-migratedb = appenlight.scripts.migratedb:main", | |
93 | "appenlight-reindex-elasticsearch = appenlight.scripts.reindex_elasticsearch:main", |
|
94 | "appenlight-reindex-elasticsearch = appenlight.scripts.reindex_elasticsearch:main", | |
94 | "appenlight-static = appenlight.scripts.static:main", |
|
95 | "appenlight-static = appenlight.scripts.static:main", | |
95 | "appenlight-make-config = appenlight.scripts.make_config:main", |
|
96 | "appenlight-make-config = appenlight.scripts.make_config:main", | |
96 | ], |
|
97 | ], | |
97 | }, |
|
98 | }, | |
98 | ) |
|
99 | ) |
General Comments 1
You need to be logged in to leave comments.
Login now