Blame files/pagure.wsgi

Pierre-Yves Chibon c4451c
#-*- coding: utf-8 -*-
Pierre-Yves Chibon c4451c
Pierre-Yves Chibon c4451c
# The three lines below are required to run on EL6 as EL6 has
Pierre-Yves Chibon c4451c
# two possible version of python-sqlalchemy and python-jinja2
Pierre-Yves Chibon c4451c
# These lines make sure the application uses the correct version.
Pierre-Yves Chibon 1a9b17
import __main__
Pierre-Yves Chibon 1a9b17
__main__.__requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4']
Pierre-Yves Chibon 1a9b17
import pkg_resources
Pierre-Yves Chibon c4451c
Pierre-Yves Chibon 1a9b17
# Set the environment variable pointing to the configuration file
Pierre-Yves Chibon 1a9b17
import os
Pierre-Yves Chibon 1a9b17
os.environ['PAGURE_CONFIG'] = '/etc/pagure/pagure.cfg'
Pierre-Yves Chibon c4451c
Pierre-Yves Chibon 1a9b17
# Set the environment variable if the tmp folder needs to be moved
Pierre-Yves Chibon 1a9b17
# Might be necessary to work around bug in libgit2:
Pierre-Yves Chibon 1a9b17
# refs: https://github.com/libgit2/libgit2/issues/2965
Pierre-Yves Chibon 1a9b17
# and   https://github.com/libgit2/libgit2/issues/2797
Pierre-Yves Chibon 1a9b17
os.environ['TEMP'] = '/var/tmp/'
Pierre-Yves Chibon 394410
Pierre-Yves Chibon 1a9b17
# The following is only needed if you did not install pagure
Pierre-Yves Chibon 1a9b17
# as a python module (for example if you run it from a git clone).
Pierre-Yves Chibon c4451c
#import sys
Pierre-Yves Chibon fe5017
#sys.path.insert(0, '/path/to/pagure/')
Pierre-Yves Chibon c4451c
Pierre-Yves Chibon c4451c
Pierre-Yves Chibon 1a9b17
# The most import line to make the wsgi working
Pierre-Yves Chibon 1a9b17
from pagure import APP as application
Pierre-Yves Chibon c4451c
#application.debug = True