mirror of https://github.com/kivy/kivy.git
- made logic for testing environ variables more accurate
- kivy more robust when checking for build scripts
This commit is contained in:
parent
60c9b0db80
commit
e17f65e617
|
@ -234,13 +234,14 @@ kivy_userexts_dir = ''
|
|||
|
||||
|
||||
# Don't go further if we generate documentation
|
||||
if basename(sys.argv[0]) in ('sphinx-build', 'autobuild.py'):
|
||||
if any(name in sys.argv[0] for name in ('sphinx-build', 'autobuild.py')):
|
||||
environ['KIVY_DOC'] = '1'
|
||||
if basename(sys.argv[0]) in ('sphinx-build', ):
|
||||
if 'sphinx-build' in sys.argv[0]:
|
||||
environ['KIVY_DOC_INCLUDE'] = '1'
|
||||
if basename(sys.argv[0]) in ('nosetests', ) or 'nosetests' in sys.argv:
|
||||
if any('nosetests' in arg for arg in sys.argv):
|
||||
environ['KIVY_UNITTEST'] = '1'
|
||||
if not 'KIVY_DOC_INCLUDE' in environ:
|
||||
|
||||
if not environ.get('KIVY_DOC_INCLUDE'):
|
||||
# Configuration management
|
||||
user_home_dir = expanduser('~')
|
||||
if platform() == 'android':
|
||||
|
|
|
@ -255,7 +255,7 @@ class ConfigParser(PythonConfigParser):
|
|||
return True
|
||||
|
||||
|
||||
if not 'KIVY_DOC_INCLUDE' in environ:
|
||||
if not environ.get('KIVY_DOC_INCLUDE'):
|
||||
|
||||
#
|
||||
# Read, analyse configuration file
|
||||
|
|
Loading…
Reference in New Issue