Skip to content

Commit 37352e0

Browse files
committed
Added small changes to find sage in system.
1 parent d220315 commit 37352e0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.travis-test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
#! /bin/sh
1+
#! /bin/bash
22
# Copying and distribution of this file, with or without modification,
33
# are permitted in any medium without royalty provided the copyright
44
# notice and this notice are preserved. This file is offered as-is,
55
# without any warranty.
66
set -e
7+
export PATH=$PATH:$HOME/SageMath
78
$HOME/SageMath/sage -pip install --upgrade -i https://pypi.python.org/pypi -v sagemath
89
$HOME/SageMath/sage -pip install --upgrade --no-index -v .
910
$HOME/SageMath/sage setup.py test

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ def readfile(filename):
3030
# Check the right Sage version
3131
class build(build_module.build):
3232
def run(self):
33-
errno = os.system('''sage -python -c "from sagemath.check_version import check_version; check_version('%s')"'''%sage_required_version)
33+
try:
34+
errno = os.system('''sage -python -c "from sagemath.check_version import check_version; check_version('%s')"'''%sage_required_version)
35+
except ValueError:
36+
errno = -1
3437
if errno != 0:
3538
sys.exit(1)
3639
# from sagemath.check_version import check_version

0 commit comments

Comments
 (0)