forked from geopython/pywps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
115 lines (97 loc) · 3.8 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
109
110
111
112
113
114
115
"""PyWPS: Implementation of OGC's Web Processing Service in Python
PyWPS is simple cgi set of scripts, which (nearly) fills standard of OGC
(http://opengis.org) Web Processing Service. This standard describes the
way how geoinformation operations should be served via networks.
PyWPS provides environment for writing own scripts with help of GIS GRASS
modules (http://grass.osgeo.it). User of PyWPS can easily focuse on writing
own GRASS-scripts, without taking care on how the data will be imported and
served back to the client. Providing GRASS funktionality on the Internet
should be as easy as possible.
"""
import sys
import os
import pywps
from pywps.Template import TemplateProcessor
def get_current_path():
return os.path.abspath(os.path.dirname(__file__))
def get_templates_path(base):
return os.path.join(base, 'pywps', 'Templates')
def compile_templates(base):
versionDirs = ['1_0_0']
template_files = ['GetCapabilities', 'DescribeProcess','Execute']
for version in versionDirs:
for template_file in template_files:
print "Compiling template "+template_file+" in "+base
template_file = os.path.join(base,version,template_file + '.tmpl')
template = TemplateProcessor(fileName=template_file,compile=True)
# First compile templates
PYWPS_PATH=get_current_path()
TEMPLATES_PATH=get_templates_path(PYWPS_PATH)
compile_templates(TEMPLATES_PATH)
name = 'pywps'
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Programming Language :: Python',
'Topic :: Communications :: Email',
'Topic :: Office/Business',
'Topic :: Software Development :: Bug Tracking',
]
#from distutils.core import setup
from setuptools import setup
import sys,os,traceback
doclines = __doc__.split("\n")
dist = setup(
name = name,
version = '3.2.2',
maintainer="Jachym Cepicky",
author = 'Jachym Cepicky',
url = 'http://pywps.wald.intevation.org',
license = "http://www.gnu.org/licenses/gpl.html",
download_url="http://pywps.wald.intevation.org",
description=doclines[0],
zip_safe=False,
platforms=["any"],
classifiers= classifiers,
long_description = "\n".join(doclines[1:]),
packages = [
'pywps',
'pywps.Wps',
'pywps.Wps.Execute',
'pywps.XSLT',
'pywps.Parser',
'pywps.Process',
'pywps.processes',
'pywps.Templates',
'pywps.Templates.1_0_0',
],
package_dir={
'pywps':"pywps",
'pywps.Wps':'pywps/Wps',
'pywps.Wps.Execute':'pywps/Wps/Execute',
'pywps.XSLT':'pywps/XSLT',
'pywps.Parser':'pywps/Parser',
'pywps.Process':'pywps/Process',
'pywps.Templates':'pywps/Templates',
'pywps.Templates.1_0_0':'pywps/Templates/1_0_0',
'pywps.Templates.1_0_0.inc':'pywps/Templates/1_0_0/inc',
},
package_data={
'pywps':
['Templates/1_0_0/*.tmplc',
'XSLT/*.xsl',
'processes/*.py-dist','processes/README',
'default.cfg']
},
requires=[
'ordereddict',
],
scripts=['wps.py']
)