-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
67 lines (60 loc) · 1.92 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
import sys
from pkg_resources import Requirement, parse_version
from setuptools import find_packages, setup
# Package metadata
NAME = 'interaktiv.volto_animated_layers_block'
DESCRIPTION = 'interaktiv volto_animated_layers_block product.'
URL = 'https://code.interaktiv.de/interaktiv/volto/interaktiv.volto_animated_layers_block'
EMAIL = '[email protected]'
AUTHOR = 'Interaktiv GmbH'
REQUIRES_PYTHON = '~=3.10'
VERSION = '1.0.1'
REQUIRES_PLONE_VERSION = '6.0.0'
REQUIRED = [
'setuptools',
'Products.CMFPlone>=' + REQUIRES_PLONE_VERSION
]
EXTRAS = {
'test': ['plone.app.testing']
}
# Check required python version
def check_python_version():
required_python = Requirement.parse('python' + REQUIRES_PYTHON)
current_version = parse_version(".".join(map(str, sys.version_info[:3])))
if current_version not in required_python:
sys.exit(f"'{NAME}' requires Python {REQUIRES_PYTHON} but the current Python is {current_version}")
setup(
name=NAME,
version=VERSION,
description=DESCRIPTION,
long_description=DESCRIPTION,
long_description_content_type='text/markdown',
classifiers=[
"Environment :: Web Environment",
"Framework :: Plone",
"Framework :: Plone :: Addon",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Topic :: Software Development :: Libraries :: Python Modules",
"Do :: not :: publish"
],
keywords='',
author=AUTHOR,
author_email=EMAIL,
url=URL,
license='proprietary',
packages=find_packages('src'),
package_dir={'': 'src'},
namespace_packages=['interaktiv', ],
include_package_data=True,
zip_safe=False,
python_requires=check_python_version(),
install_requires=REQUIRED,
extras_require=EXTRAS,
entry_points="""
# -*- Entry points: -*-
[z3c.autoinclude.plugin]
target = plone
"""
)