mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Move src/moulinette to the root
This commit is contained in:
parent
f4d2f2b062
commit
7258e21adb
13 changed files with 13 additions and 9 deletions
|
@ -4,10 +4,13 @@
|
||||||
import sys
|
import sys
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
|
from_source = False
|
||||||
|
|
||||||
# Run from source
|
# Run from source
|
||||||
basedir = os.path.abspath('%s/../' % os.path.dirname(__file__))
|
basedir = os.path.abspath('%s/../' % os.path.dirname(__file__))
|
||||||
if os.path.isdir('%s/src' % basedir):
|
if os.path.isdir('%s/moulinette' % basedir):
|
||||||
sys.path.insert(0, '%s/src' % basedir)
|
sys.path.insert(0, basedir)
|
||||||
|
from_source = True
|
||||||
|
|
||||||
from moulinette import init, cli, MoulinetteError
|
from moulinette import init, cli, MoulinetteError
|
||||||
from moulinette.helpers import YunoHostError, colorize
|
from moulinette.helpers import YunoHostError, colorize
|
||||||
|
@ -17,7 +20,7 @@ from moulinette.helpers import YunoHostError, colorize
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# Run from source
|
# Run from source
|
||||||
init(_from_source=True)
|
init(_from_source=from_source)
|
||||||
|
|
||||||
# Additional arguments
|
# Additional arguments
|
||||||
use_cache = True
|
use_cache = True
|
||||||
|
|
|
@ -4,10 +4,13 @@
|
||||||
import sys
|
import sys
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
|
from_source = False
|
||||||
|
|
||||||
# Run from source
|
# Run from source
|
||||||
basedir = os.path.abspath(os.path.dirname(__file__) +'/../')
|
basedir = os.path.abspath('%s/../' % os.path.dirname(__file__))
|
||||||
if os.path.isdir(basedir +'/src'):
|
if os.path.isdir('%s/moulinette' % basedir):
|
||||||
sys.path.append(basedir +'/src')
|
sys.path.insert(0, basedir)
|
||||||
|
from_source = True
|
||||||
|
|
||||||
from moulinette import init, api, MoulinetteError
|
from moulinette import init, api, MoulinetteError
|
||||||
|
|
||||||
|
@ -29,15 +32,13 @@ def is_installed():
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# Run from source
|
# Run from source
|
||||||
init(_from_source=True)
|
init(_from_source=from_source)
|
||||||
|
|
||||||
# Additional arguments
|
# Additional arguments
|
||||||
use_cache = True
|
use_cache = True
|
||||||
if '--no-cache' in sys.argv:
|
if '--no-cache' in sys.argv:
|
||||||
use_cache = False
|
use_cache = False
|
||||||
sys.argv.remove('--no-cache')
|
sys.argv.remove('--no-cache')
|
||||||
if '--debug' in sys.argv:
|
|
||||||
sys.argv.remove('--debug')
|
|
||||||
# TODO: Add log argument
|
# TODO: Add log argument
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Reference in a new issue