-
-
Notifications
You must be signed in to change notification settings - Fork 76
/
setup.py
108 lines (98 loc) · 3.03 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
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
from setuptools import find_packages
from setuptools import setup
import sys
version = "9.8.3.dev0"
if sys.version_info.major == 2:
raise ValueError(
"plone.restapi 8 requires Python 3. "
"Please downgrade to plone.restapi 7 for Python 2 and Plone 4.3/5.1."
)
def read(filename):
with open(filename) as myfile:
try:
return myfile.read()
except UnicodeDecodeError:
# Happens on one Jenkins node on Python 3.6,
# so maybe it happens for users too.
pass
# Opening and reading as text failed, so retry opening as bytes.
with open(filename, "rb") as myfile:
contents = myfile.read()
return contents.decode("utf-8")
long_description = (
read("README.rst")
+ "\n"
+ "Contributors\n"
+ "============\n"
+ "\n"
+ read("CONTRIBUTORS.rst")
+ "\n"
+ read("CHANGES.rst")
+ "\n"
)
TEST_REQUIRES = [
"collective.MockMailHost",
"plone.app.caching",
"plone.app.contenttypes[test]",
"plone.app.iterate",
"plone.app.discussion[test]",
"plone.app.testing",
"plone.app.upgrade",
"plone.api",
"requests",
"mock",
]
setup(
name="plone.restapi",
version=version,
description="plone.restapi is a RESTful hypermedia API for Plone.",
long_description=long_description,
# Get more strings from
# https://pypi.org/classifiers/
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Plone",
"Framework :: Plone :: 5.2",
"Framework :: Plone :: 6.0",
"Framework :: Plone :: 6.1",
"Framework :: Plone :: Core",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Libraries :: Python Modules",
],
keywords="plone rest restful hypermedia api json",
author="Timo Stollenwerk (kitconcept GmbH)",
author_email="[email protected]",
url="https://github.com/plone/plone.restapi/",
license="gpl",
packages=find_packages("src"),
package_dir={"": "src"},
namespace_packages=["plone"],
python_requires=">=3.8",
include_package_data=True,
zip_safe=False,
install_requires=[
"setuptools",
"importlib-metadata; python_version<'3.8'",
"python-dateutil",
"plone.rest", # json renderer moved to plone.restapi
"plone.schema>=1.2.1", # new/fixed json field
"Products.CMFPlone>=5.2",
"PyJWT>=1.7.0",
"pytz",
],
extras_require={"test": TEST_REQUIRES},
entry_points="""
# -*- Entry points: -*-
[z3c.autoinclude.plugin]
target = plone
""",
)