forked from hypothesis/h
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun
More file actions
executable file
·33 lines (27 loc) · 1003 Bytes
/
run
File metadata and controls
executable file
·33 lines (27 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env python
from distutils.core import run_setup
from os import environ
from os.path import abspath, dirname, exists, join
import sys
def activate():
# Activate the virtual environment if it is present.
activate = abspath(join(dirname(__file__), 'bin', 'activate_this.py'))
if exists(activate):
with open(activate) as f:
code = compile(f.read(), activate, 'exec')
exec(code, {}, dict(__file__=activate))
if __name__ == '__main__':
if 'VIRTUAL_ENV' not in environ:
activate()
# If the distribution has not been set up for development, do so.
if not environ.get('PYTHONSETUP'):
# Use an environment variable to signal not to do this on reload
environ['PYTHONSETUP'] = 'True'
try:
start_args = list(sys.argv)
run_setup('setup.py', ['develop'])
finally:
sys.argv = start_args
# Start the application
from h.script import start
start(sys.argv[1:])