mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-26 15:28:37 -05:00
Wrap make_app to allow r2 imports before pyx build.
This commit is contained in:
@@ -23,4 +23,11 @@
|
||||
|
||||
This file loads the finished app from r2.config.middleware.
|
||||
"""
|
||||
from r2.config.middleware import make_app
|
||||
|
||||
# defer the (hefty) import until it's actually needed. this allows
|
||||
# modules below r2 to be imported before cython files are built, also
|
||||
# provides a hefty speed boost to said imports when they don't need
|
||||
# the app initialization.
|
||||
def make_app(*args, **kwargs):
|
||||
from r2.config.middleware import make_app as real_make_app
|
||||
return real_make_app(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user