Skip to content

Commit d8dd0ec

Browse files
author
Matthias Koeppe
committed
Merge branch 'no-cygwin-distro-support' into spkg-legacy-uninstall-remove
2 parents 77c6c04 + 989dde5 commit d8dd0ec

File tree

89 files changed

+59
-1359
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+59
-1359
lines changed

.github/workflows/cygwin.yml

Lines changed: 0 additions & 151 deletions
This file was deleted.

.github/workflows/extract-sage-local.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ fi
88
# Show all tar files
99
ls -l $*
1010

11-
# Cygwin note: We specifically use the cygwin tar so that symlinks are saved/restored correctly on Windows.
1211
for a in $*; do
1312
echo Extracting $a
1413
(cd / && tar xf -) < $a
@@ -33,10 +32,3 @@ fi
3332

3433
# Show how we are doing on free space.
3534
df -h
36-
37-
# Rebase!
38-
case "$(uname)" in
39-
CYGWIN*)
40-
exec src/bin/sage-rebase.sh --all "$SAGE_LOCAL"
41-
;;
42-
esac

build/bin/sage-apply-patches

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
# the root of the package source.
1111
#
1212
# An optional patch subdirectory may be specified with the -d flag.
13-
# For example `sage-apply-patches -d cygwin` applies only those
14-
# patches under <patch-dir>/cygwin.
13+
# For example `sage-apply-patches -d macos` applies only those
14+
# patches under <patch-dir>/macos.
1515
#
1616
# The -p<num> arg is the argument accepted by the `patch` command,
1717
# and overrides the default -p1

build/bin/sage-bootstrap-python

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ SAGE_ORIG_PATH=${NEW_PATH%%':'}
3737

3838
# Trac #30177: Also check for hashlib.sha1 to guard against broken python2
3939
# from old homebrew installations. Also check whether the current directory
40-
# is accessible by this python; this is to guard on Cygwin against Pythons
40+
# is accessible by this python; this is to guard on WSL against Pythons
4141
# installed somewhere else in Windows.
4242

4343
# Trac #29285: Do not accept pythons that manipulate PATH, such as

build/bin/sage-dist-helpers

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,9 @@ sdh_configure() {
170170
if [ -z "$CONFIG_SHELL" ]; then
171171
export CONFIG_SHELL=`command -v bash`
172172
fi
173-
if [ "$UNAME" = "CYGWIN" ]; then
174-
# TODO: To use --disable-static for all packages on Cygwin, need
175-
# #30814: Cygwin: Fix remaining packages to build shared libraries, using AM_LDFLAGS=-no-undefined
176-
DISABLE_STATIC=
177-
else
178-
DISABLE_STATIC=--disable-static
179-
fi
180-
./configure --prefix="$SAGE_INST_LOCAL" --libdir="$SAGE_INST_LOCAL/lib" $DISABLE_STATIC --disable-maintainer-mode --disable-dependency-tracking "$@"
173+
./configure --prefix="$SAGE_INST_LOCAL" --libdir="$SAGE_INST_LOCAL/lib" --disable-static --disable-maintainer-mode --disable-dependency-tracking "$@"
181174
if [ $? -ne 0 ]; then # perhaps it is a non-autoconf'd project
182-
./configure --prefix="$SAGE_INST_LOCAL" --libdir="$SAGE_INST_LOCAL/lib" $DISABLE_STATIC "$@"
175+
./configure --prefix="$SAGE_INST_LOCAL" --libdir="$SAGE_INST_LOCAL/lib" --disable-static "$@"
183176
if [ $? -ne 0 ]; then
184177
if [ -f "$(pwd)/config.log" ]; then
185178
sdh_die <<_EOF_

build/bin/sage-spkg

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -624,23 +624,6 @@ export https_proxy=$http_proxy
624624
export ftp_proxy=$http_proxy
625625
export rsync_proxy=$http_proxy
626626

627-
# We need to run sage-rebase.sh for each package installed, but it
628-
# can be dangerous to do this while other packages are installing
629-
# so we need to use a lock to manage when rebase is allowed to
630-
# run. Because of this, if multiple sage-spkg runs are waiting on
631-
# the rebase lock, we can end up with multiple consecutive rebase
632-
# calls that are redundant, but I don't see an obvious way around
633-
# that. This also unfortunately slows down parallel builds since
634-
# all packages will eventually need to wait for this lock, but
635-
# again there's no simple way around that.
636-
if [ "$UNAME" = "CYGWIN" ]; then
637-
# This is a global lock - so we use SAGE_LOCAL, not SAGE_INST_LOCAL.
638-
if [ ! -d "$SAGE_LOCAL/var/lock" ]; then
639-
mkdir -p "$SAGE_LOCAL/var/lock"
640-
fi
641-
exec 200>"$SAGE_LOCAL/var/lock/rebase.lock"
642-
sage-flock -s $lock_type 200
643-
fi
644627

645628
# First uninstall the previous version of this package, if any
646629
if [ "$KEEP_EXISTING" != "yes" ]; then
@@ -776,19 +759,6 @@ if [ -f spkg-postinst ]; then
776759
exit 1
777760
fi
778761
fi
779-
780-
if [ "$UNAME" = "CYGWIN" ]; then
781-
# Drop our sage-spkg's shared lock, and try to call sage-rebase.sh
782-
# under an exclusive lock
783-
sage-flock -u 200
784-
785-
# Rebase after installing each package--in case any packages load this
786-
# package at build time we need to ensure during the build that no binaries
787-
# have conflicting address spaces
788-
echo "Waiting for rebase lock"
789-
sage-flock -x "$SAGE_LOCAL/var/lock/rebase.lock" \
790-
sage-rebase.sh "$SAGE_LOCAL" 2>/dev/null
791-
fi
792762
} ################################################### post_install
793763

794764
run_test_suite() { ###############################################

build/bin/sage-venv

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,13 @@ options = parser.parse_args()
3737
if options.upgrade and options.clear:
3838
raise ValueError('you cannot supply --upgrade and --clear together.')
3939

40-
if sys.platform == 'cygwin':
41-
# default for Cygwin; see https://github.com/sagemath/sage/issues/30149
42-
use_symlinks = False
43-
else:
44-
# default for posix
45-
# On macOS, definitely need symlinks=True (which matches what we test in build/pkgs/spkg-configure.m4)
46-
# or it may fail with 'dyld: Library not loaded: @executable_path/../Python3' on macOS.
47-
use_symlinks = True
48-
40+
41+
# On macOS, definitely need symlinks=True (which matches what we test in build/pkgs/spkg-configure.m4)
42+
# or it may fail with 'dyld: Library not loaded: @executable_path/../Python3' on macOS.
4943
b = venv.EnvBuilder(system_site_packages=options.system_site,
5044
clear=options.clear,
5145
upgrade=options.upgrade,
52-
symlinks=use_symlinks)
46+
symlinks=True)
5347
c = b.ensure_directories(options.env_dir)
5448
b.setup_python(c)
5549
b.create_configuration(c)

build/pkgs/ecl/spkg-install.in

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
cd src
22

3-
if [ "$UNAME" = "CYGWIN" ]; then
4-
# Some of ECL's sources rely on GNU-isms that are allowed by default on
5-
# most glibcs, but not in newlib; https://github.com/sagemath/sage/issues/25057
6-
CFLAGS="$CFLAGS -D_GNU_SOURCE"
7-
CXXFLAGS="$CXXFLAGS -D_GNU_SOURCE"
8-
fi
9-
103
export CFLAGS
114
export CXXFLAGS
125
export LDFLAGS

build/pkgs/ecm/spkg-install.in

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,6 @@ else
7373
echo "to, or '--with-pic' was given in ECM_CONFIGURE."
7474
fi
7575

76-
if [ "$UNAME" == "CYGWIN" ]; then
77-
# Force shared library build only on Cygwin; it will not build otherwise
78-
ECM_CONFIGURE="$ECM_CONFIGURE --enable-shared --disable-static"
79-
fi
80-
81-
8276
if [ "$SAGE_DEBUG" = yes ]; then
8377
# Add debug symbols and disable optimization:
8478
echo >&2 "Warning: Setting SAGE_DEBUG=yes completely disables optimization."

build/pkgs/fplll/spkg-check.in

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
11
cd src
2-
3-
if [ "$UNAME" = "CYGWIN" ]; then
4-
echo "Disable parallel testing on Cygwin"
5-
MAKE="$MAKE -j1"
6-
fi
7-
82
$MAKE check

0 commit comments

Comments
 (0)