Skip to content

Commit

Permalink
Trac #23059: Fix Python 2 build on Cygwin
Browse files Browse the repository at this point in the history
[https://git.sagemath.org/sage.git/commit/?h=2179ac895c8d8aa9611837a0f53
84199e526bd3a&id=dc46ea2dfa97be79d7ef8ddbe9130d4c717acc3d This commit]
broke the build of Python 2 on Cygwin by moving the definition of the
`PYTHON_VERSION` variable used for the Cygwin install as well as OSX.

I didn't notice before since I was just doing incremental builds.

URL: https://trac.sagemath.org/23059
Reported by: embray
Ticket author(s): Erik Bray
Reviewer(s): Travis Scrimshaw
  • Loading branch information
Release Manager authored and vbraun committed May 24, 2017
2 parents 1f6a0cd + 609393a commit 7369303
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build/pkgs/python2/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,14 @@ rm -f "$SAGE_LOCAL/lib/python"

build

PYTHON_VERSION=$("$SAGE_LOCAL/bin/python2" -c 'import sys; print("%d.%d" % sys.version_info[:2])')

# On OS X with XCode 4, the presence of
# $SAGE_LOCAL/lib/python2.*/config/libpython2.x.a causes problems with
# GiNaC -- see #11967. It is easiest to test the version of OS X; we
# delete this file if using OS X 10.6 or later (so `uname -r` returns
# x.y.z with x >= 10).
if [ "$UNAME" = "Darwin" ] && \
PYTHON_VERSION=$("$SAGE_LOCAL/bin/python2" -c 'import sys; print("%d.%d" % sys.version_info[:2])')
[ `uname -r | cut '-d.' -f1` -gt 9 ]; then
rm -f "$SAGE_LOCAL/lib/python$PYTHON_VERSION/config/libpython${PYTHON_VERSION}.a"
elif [ "$UNAME" = "CYGWIN" ]; then
Expand Down

0 comments on commit 7369303

Please sign in to comment.