From 3de94a45efde5241fd3c731a42b496ddb32b8902 Mon Sep 17 00:00:00 2001 From: Hong Minhee Date: Fri, 6 Jun 2014 00:22:22 +0900 Subject: [PATCH] Error if submodules are not initialized yet --- .gitignore | 1 + setup.py | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 86ae6780..21641e3d 100644 --- a/.gitignore +++ b/.gitignore @@ -54,6 +54,7 @@ sassc/ sass-spec/ # libsass-python +._.DS_Store build/ dist/ docs/_build diff --git a/setup.py b/setup.py index f85529e5..430cff11 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -from __future__ import with_statement +from __future__ import print_function, with_statement import ast import distutils.cmd @@ -44,6 +44,13 @@ sources = ['pysass.c'] sources.extend(libsass_sources) +if not os.path.isdir('sass2scss') and os.path.isdir('.git'): + print('Submodules seem not initialized yet.' + 'You can initialize it by the following command:', + file=sys.stderr) + print('\tgit submodule update --init', file=sys.stderr) + raise SystemExit(1) + if sys.platform == 'win32': from distutils.msvc9compiler import get_build_version vscomntools_env = 'VS{0}{1}COMNTOOLS'.format(