aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/backend/vs2010backend.py2
-rw-r--r--mesonbuild/compilers.py2
-rw-r--r--setup.py6
3 files changed, 8 insertions, 2 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index 3516ac7..3afe3cd 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -467,7 +467,7 @@ class Vs2010Backend(backends.Backend):
for l, args in target.extra_args.items():
if l in extra_args:
extra_args[l] += args
- general_args = compiler.get_buildtype_args(self.buildtype)
+ general_args = compiler.get_buildtype_args(self.buildtype).copy()
# FIXME all the internal flags of VS (optimization etc) are represented
# by their own XML elements. In theory we should split all flags to those
# that have an XML element and those that don't and serialise them
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py
index f1868dd..3079c5e 100644
--- a/mesonbuild/compilers.py
+++ b/mesonbuild/compilers.py
@@ -574,7 +574,7 @@ int main(int argc, char **argv) {
'''
res = self.run(templ % (prefix, element), extra_args)
if not res.compiled:
- raise EnvironmentException('Could not compile sizeof test.')
+ return -1
if res.returncode != 0:
raise EnvironmentException('Could not run sizeof test binary.')
return int(res.stdout)
diff --git a/setup.py b/setup.py
index 0acce4d..1c96435 100644
--- a/setup.py
+++ b/setup.py
@@ -14,6 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import sys
+
+if sys.version_info[0] < 3:
+ print('Tried to install with Python 2, Meson only supports Python 3.')
+ sys.exit(1)
+
# We need to support Python installations that have nothing but the basic
# Python installation. Use setuptools when possible and fall back to
# plain distutils when setuptools is not available.