Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Rename conf/ogcserver.conf to ogcserver/default.conf; use pkg_resources
  • Loading branch information
plepe committed Feb 8, 2014
1 parent 3f7d790 commit 7b08205
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/ogcserver-local.py
Expand Up @@ -4,15 +4,18 @@
import sys
import socket
from os import path
from pkg_resources import *

if not len(sys.argv) > 1:
sys.exit('Usage: %s <map.xml>' % os.path.basename(sys.argv[0]))

sys.path.insert(0,os.path.abspath('.'))

from ogcserver.wsgi import WSGIApp
import ogcserver

application = WSGIApp('conf/ogcserver.conf',mapfile=sys.argv[1])
default_conf = resource_filename(ogcserver.__name__, 'default.conf')
application = WSGIApp(default_conf,mapfile=sys.argv[1])

if __name__ == '__main__':
from wsgiref.simple_server import make_server
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions setup.py
Expand Up @@ -20,6 +20,9 @@
url='https://github.com/mapnik/OGCServer',
packages=['ogcserver'],
scripts=['bin/ogcserver-local.py'],
package_data={
'ogcserver':['default.conf'],
},
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
Expand Down

0 comments on commit 7b08205

Please sign in to comment.