-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
73 lines (69 loc) · 2.62 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
from os.path import dirname, realpath, exists
from setuptools import setup, find_packages
from codecs import open # To use a consistent encoding
import sys
import warnings
author = "Paul Müller"
authors = [author]
description = 'Serve DC files via GET requests on DCOR'
name = 'ckanext-dc_serve'
year = "2020"
sys.path.insert(0, realpath(dirname(__file__))+"/" + "/".join(name.split("-")))
from _version import version # noqa: E402
try:
# Make sure this fails for old CKAN versions
import ckan
ckan_version = [int(v) for v in ckan.__version__.split(".")]
if ckan_version < [2, 10, 1]:
raise ValueError(
f"Your CKAN version {ckan_version} is not supported! If you "
f"are still on CKAN 2.9.5, then the following package versions "
f"are supported:"
f"\n ckanext-dc_serve<=0.11.1"
)
except ImportError:
warnings.warn("CKAN not installed, supported version check skipped.")
setup(
name=name,
version=version,
description=description,
long_description=open('README.rst').read() if exists('README.rst') else '',
url='https://github.com/DCOR-dev/ckanext-dc_serve',
author=author,
author_email='dev@craban.de',
license='AGPLv3+',
keywords=["CKAN", "DCOR", "RT-DC"],
packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
package_dir={name: name},
namespace_packages=['ckanext'],
install_requires=[
# the "ckan" dependency is implied
"dclab[http]>=0.58.3", # LazyContourList has max_events
"dcor_shared>=0.8.0",
],
include_package_data=True,
# To provide executable scripts, use entry points in preference to the
# "scripts" keyword. Entry points provide cross-platform support and allow
# pip to create the appropriate form of executable for the target platform.
entry_points='''
[ckan.plugins]
dc_serve=ckanext.dc_serve.plugin:DCServePlugin
''',
# If you are changing from the default layout of your extension, you may
# have to change the message extractors, you can read more about babel
# message extraction at
# http://babel.pocoo.org/docs/messages/#extraction-method-mapping-and-configuration
message_extractors={
'ckanext': [
('**.py', 'python', None),
('**.js', 'javascript', None),
('**/templates/**.html', 'ckan', None),
],
},
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'License :: OSI Approved :: GNU Affero General Public License v3 or ' \
+ 'later (AGPLv3+)',
'Programming Language :: Python :: 3',
],
)