<commit_before>"""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.itc.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.
"""

#   SETUP
name = 'pywps'
#   END of SETUP

classifiers=[
          'Development Status :: 0.1',
          'Environment :: CGI',
          'Environment :: Web Environment',
          'Intended Audience :: Developers',
          'License :: OSI Approved :: GNU/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
import sys,os

doclines = __doc__.split("\n")


setup(
        name = name,
        version = '3.0.1',
        maintainer="<NAME>",
        maintainer_email = '<EMAIL>',
        author = '<NAME>',
        author_email = '<EMAIL>',
        url = 'http://pywps.wald.intevation.org',
        license = "http://www.gnu.org/licenses/gpl.html",
        download_url="http://pywps.wald.intevation.org",
        description=doclines[0],
        platforms=["any"],
        classifiers= classifiers,
        long_description = "\n".join(doclines[1:]),

        packages = [
            'pywps',
            'pywps.Wps',
            'pywps.Wps.Execute',
            'pywps.XSLT'
            'pywps.etc',
            'pywps.Parser',
            'pywps.Process',
            'pywps.Templates',
            'pywps.Templates.1_0_0',
            'pywps.Templates.1_0_0.inc',
        ],
        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/*.tmpl',
                     'XSLT/*.xsl',
                     'processes/*.py-dist','processes/README',
                     'default.cfg'],
                    'pywps.Templates.1_0_0': ['inc/*.tmpl']
                },
        scripts=['wps.py']
)



# check, if we are really installing
dryRun = False
install = False
for arg in sys.argv:
    if arg == "--dry-run":
        dryRun = True
    if arg == "install":
        install = True

import os
# post installation part
if not dryRun and install and not os.environ.has_key("FAKEROOTKEY"):
    # compile templates
    # compiling before installing is necessary, because the apache
    # webserver has not the permission to create new files in the 
    # python site-packages directory
    from pywps.Template import TemplateProcessor
    from distutils import sysconfig

    baseDir =  os.path.join(sysconfig.get_python_lib(),
                            name,'Templates')

    for i in range(len(sys.path)):
        if os.path.split(sys.path[i])[1] == "dist-packages":
            baseDir =  os.path.join(sys.path[i],
                                name,'Templates')
    versionDirs = ['1_0_0']

    template_files = ['GetCapabilities', 'DescribeProcess','Execute']

    for version in versionDirs:
        for template_file in template_files:
            print "Compiling template "+template_file
            template_file = os.path.join(baseDir,version,
                                    template_file + '.tmpl')
            template = TemplateProcessor(fileName=template_file,compile=True)
else:
    print "dry-run only, templates are not complied"


<commit_msg>try:except for template complication in case it can't find the templates<commit_after>"""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.itc.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.
"""

#   SETUP
name = 'pywps'
#   END of SETUP

classifiers=[
          'Development Status :: 0.1',
          'Environment :: CGI',
          'Environment :: Web Environment',
          'Intended Audience :: Developers',
          'License :: OSI Approved :: GNU/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
import sys,os

doclines = __doc__.split("\n")


setup(
        name = name,
        version = '3.0.1',
        maintainer="<NAME>",
        maintainer_email = '<EMAIL>.cz',
        author = '<NAME>',
        author_email = '<EMAIL>',
        url = 'http://pywps.wald.intevation.org',
        license = "http://www.gnu.org/licenses/gpl.html",
        download_url="http://pywps.wald.intevation.org",
        description=doclines[0],
        platforms=["any"],
        classifiers= classifiers,
        long_description = "\n".join(doclines[1:]),

        packages = [
            'pywps',
            'pywps.Wps',
            'pywps.Wps.Execute',
            'pywps.XSLT'
            'pywps.etc',
            'pywps.Parser',
            'pywps.Process',
            'pywps.Templates',
            'pywps.Templates.1_0_0',
            'pywps.Templates.1_0_0.inc',
        ],
        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/*.tmpl',
                     'XSLT/*.xsl',
                     'processes/*.py-dist','processes/README',
                     'default.cfg'],
                    'pywps.Templates.1_0_0': ['inc/*.tmpl']
                },
        scripts=['wps.py']
)



# check, if we are really installing
dryRun = False
install = False
for arg in sys.argv:
    if arg == "--dry-run":
        dryRun = True
    if arg == "install":
        install = True

import os
# post installation part
if not dryRun and install and not os.environ.has_key("FAKEROOTKEY"):
    # compile templates
    # compiling before installing is necessary, because the apache
    # webserver has not the permission to create new files in the 
    # python site-packages directory
    from pywps.Template import TemplateProcessor
    from distutils import sysconfig

    baseDir =  os.path.join(sysconfig.get_python_lib(),
                            name,'Templates')

    for i in range(len(sys.path)):
        if os.path.split(sys.path[i])[1] == "dist-packages":
            baseDir =  os.path.join(sys.path[i],
                                name,'Templates')
    versionDirs = ['1_0_0']

    template_files = ['GetCapabilities', 'DescribeProcess','Execute']
    try:
        for version in versionDirs:
            for template_file in template_files:
                print "Compiling template "+template_file
                template_file = os.path.join(baseDir,version,
                                    template_file + '.tmpl')
                template = TemplateProcessor(fileName=template_file,compile=True)
    except:
        print "dry-run only, templates are not complied, "
else:
    print "dry-run only, templates are not complied"



{'fraction_non_alphanumeric': 0.11733154542406973, 'fraction_numerical': 0.007822103028271314, 'mean_word_length': 1.9813457694870087, 'pattern_counts': {'":': 6, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1604994', 'n_tokens_mistral': 2711, 'n_tokens_neox': 2590, 'n_words': 643}