Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove most spkg-legacy-uninstall scripts #36839

Merged
merged 26 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0b995ea
build/bin: drop cygwin support
orlitzky Nov 26, 2023
ac7b464
don't need no rebase, no
dimpase Nov 26, 2023
6bd341b
no, no rebase - apart from git rebase
dimpase Nov 26, 2023
002c984
no CYGWIN-related studd from installation scrips and CI
dimpase Nov 26, 2023
8acab5a
more removals
dimpase Nov 26, 2023
df62048
remove easy cygwin things in build and tox.ini
dimpase Nov 26, 2023
99099b0
remove cygwin stuff in src/, pkgs/, configure.ac
dimpase Nov 26, 2023
7861f3b
remove outdated section in SPKG.rst
dimpase Nov 26, 2023
7b45aaf
keep verbatim notice from Singular
dimpase Nov 26, 2023
68c4600
build/pkgs/iconv: Reduce to a dummy package
mkoeppe Nov 28, 2023
1713eed
src/sage/env.py: Remove commented-out cygwin code
mkoeppe Nov 28, 2023
128e348
src/bin/sage-env: Restore lost setting of UNAME
mkoeppe Nov 28, 2023
822a9f9
src/sage/libs/singular/singular.pyx: Remove unused import
mkoeppe Nov 28, 2023
76aad01
src/sage/interfaces/mathematica.py: Restore AUTHORS item
mkoeppe Nov 28, 2023
52a657a
build/bin/sage-bootstrap-python: Restore pwd checking - for WSL
mkoeppe Nov 28, 2023
d9d8e14
Merge remote-tracking branch 'upstream/develop' into no-cygwin-distro…
mkoeppe Dec 6, 2023
989dde5
Merge tag '10.3.beta1' into no-cygwin-distro-support
mkoeppe Dec 10, 2023
99796ad
Fix spkg-installs of packages with legacy uninstall commands; moving …
embray Apr 10, 2018
25ce68f
Remove redundant spkg-legacy-uninstall scripts
mkoeppe Dec 8, 2023
0772646
Remove remaining redundant spkg-legacy-uninstall scripts
mkoeppe Dec 8, 2023
04c327f
build/pkgs/openblas: Move removal of pkgconfig symlinks to spkg-prein…
mkoeppe Dec 8, 2023
be27325
build/pkgs/ipython/spkg-install.in: Remove legacy uninstall
mkoeppe Dec 8, 2023
cc2f2a1
build/pkgs/cvxopt/spkg-install.in: Remove legacy uninstall of docs
mkoeppe Dec 8, 2023
96b7196
build/pkgs/frobby: Stage in DESTDIR, create spkg-legacy-uninstall
mkoeppe Dec 8, 2023
77c6c04
build/pkgs/sagetex/spkg-install.in: Remove legacy uninstall
mkoeppe Dec 8, 2023
d8dd0ec
Merge branch 'no-cygwin-distro-support' into spkg-legacy-uninstall-re…
mkoeppe Dec 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 0 additions & 151 deletions .github/workflows/cygwin.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .github/workflows/extract-sage-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ fi
# Show all tar files
ls -l $*

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

# Show how we are doing on free space.
df -h

# Rebase!
case "$(uname)" in
CYGWIN*)
exec src/bin/sage-rebase.sh --all "$SAGE_LOCAL"
;;
esac
4 changes: 2 additions & 2 deletions build/bin/sage-apply-patches
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
# the root of the package source.
#
# An optional patch subdirectory may be specified with the -d flag.
# For example `sage-apply-patches -d cygwin` applies only those
# patches under <patch-dir>/cygwin.
# For example `sage-apply-patches -d macos` applies only those
# patches under <patch-dir>/macos.
#
# The -p<num> arg is the argument accepted by the `patch` command,
# and overrides the default -p1
Expand Down
2 changes: 1 addition & 1 deletion build/bin/sage-bootstrap-python
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ SAGE_ORIG_PATH=${NEW_PATH%%':'}

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

# Trac #29285: Do not accept pythons that manipulate PATH, such as
Expand Down
11 changes: 2 additions & 9 deletions build/bin/sage-dist-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,9 @@ sdh_configure() {
if [ -z "$CONFIG_SHELL" ]; then
export CONFIG_SHELL=`command -v bash`
fi
if [ "$UNAME" = "CYGWIN" ]; then
# TODO: To use --disable-static for all packages on Cygwin, need
# #30814: Cygwin: Fix remaining packages to build shared libraries, using AM_LDFLAGS=-no-undefined
DISABLE_STATIC=
else
DISABLE_STATIC=--disable-static
fi
./configure --prefix="$SAGE_INST_LOCAL" --libdir="$SAGE_INST_LOCAL/lib" $DISABLE_STATIC --disable-maintainer-mode --disable-dependency-tracking "$@"
./configure --prefix="$SAGE_INST_LOCAL" --libdir="$SAGE_INST_LOCAL/lib" --disable-static --disable-maintainer-mode --disable-dependency-tracking "$@"
if [ $? -ne 0 ]; then # perhaps it is a non-autoconf'd project
./configure --prefix="$SAGE_INST_LOCAL" --libdir="$SAGE_INST_LOCAL/lib" $DISABLE_STATIC "$@"
./configure --prefix="$SAGE_INST_LOCAL" --libdir="$SAGE_INST_LOCAL/lib" --disable-static "$@"
if [ $? -ne 0 ]; then
if [ -f "$(pwd)/config.log" ]; then
sdh_die <<_EOF_
Expand Down
30 changes: 0 additions & 30 deletions build/bin/sage-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -624,23 +624,6 @@ export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
export rsync_proxy=$http_proxy

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

# First uninstall the previous version of this package, if any
if [ "$KEEP_EXISTING" != "yes" ]; then
Expand Down Expand Up @@ -776,19 +759,6 @@ if [ -f spkg-postinst ]; then
exit 1
fi
fi

if [ "$UNAME" = "CYGWIN" ]; then
# Drop our sage-spkg's shared lock, and try to call sage-rebase.sh
# under an exclusive lock
sage-flock -u 200

# Rebase after installing each package--in case any packages load this
# package at build time we need to ensure during the build that no binaries
# have conflicting address spaces
echo "Waiting for rebase lock"
sage-flock -x "$SAGE_LOCAL/var/lock/rebase.lock" \
sage-rebase.sh "$SAGE_LOCAL" 2>/dev/null
fi
} ################################################### post_install

run_test_suite() { ###############################################
Expand Down
14 changes: 4 additions & 10 deletions build/bin/sage-venv
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,13 @@ options = parser.parse_args()
if options.upgrade and options.clear:
raise ValueError('you cannot supply --upgrade and --clear together.')

if sys.platform == 'cygwin':
# default for Cygwin; see https://github.com/sagemath/sage/issues/30149
use_symlinks = False
else:
# default for posix
# On macOS, definitely need symlinks=True (which matches what we test in build/pkgs/spkg-configure.m4)
# or it may fail with 'dyld: Library not loaded: @executable_path/../Python3' on macOS.
use_symlinks = True


# On macOS, definitely need symlinks=True (which matches what we test in build/pkgs/spkg-configure.m4)
# or it may fail with 'dyld: Library not loaded: @executable_path/../Python3' on macOS.
b = venv.EnvBuilder(system_site_packages=options.system_site,
clear=options.clear,
upgrade=options.upgrade,
symlinks=use_symlinks)
symlinks=True)
c = b.ensure_directories(options.env_dir)
b.setup_python(c)
b.create_configuration(c)
Expand Down
2 changes: 0 additions & 2 deletions build/pkgs/boost_cropped/spkg-legacy-uninstall

This file was deleted.

5 changes: 0 additions & 5 deletions build/pkgs/brial/spkg-legacy-uninstall

This file was deleted.

4 changes: 0 additions & 4 deletions build/pkgs/cvxopt/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ sdh_pip_install .

if [ "x$SAGE_SPKG_INSTALL_DOCS" = xyes ] ; then
cd doc
# checking to see if there is previously installed documentation.
if [ -d $SAGE_LOCAL/share/doc/cvxopt/html ] ; then
rm -rf $SAGE_LOCAL/share/doc/cvxopt/html
fi
mkdir -p "${SAGE_DESTDIR}${SAGE_LOCAL}/share/doc/cvxopt/html"
cp -r html/* "${SAGE_DESTDIR}${SAGE_LOCAL}/share/doc/cvxopt/html/"
fi
Expand Down
7 changes: 0 additions & 7 deletions build/pkgs/ecl/spkg-install.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
cd src

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

export CFLAGS
export CXXFLAGS
export LDFLAGS
Expand Down
6 changes: 0 additions & 6 deletions build/pkgs/ecl/spkg-legacy-uninstall

This file was deleted.

14 changes: 0 additions & 14 deletions build/pkgs/eclib/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,6 @@ CXXFLAGS="$CXXFLAGS_O3_NON_NATIVE"

export CFLAGS CXXFLAGS


echo "Deleting old versions of eclib libraries, which"
echo "would interfere with new builds..."
# Delete any pre-autotools libraries:
rm -f "$SAGE_LOCAL"/lib/lib{curvesntl,g0nntl,jcntl,rankntl,mwrank}.*
# Delete autotools libraries:
rm -f "$SAGE_LOCAL"/lib/lib{e,j}c.*
if [ "$UNAME" = "CYGWIN" ]; then
rm -f "$SAGE_LOCAL"/lib/cyg{e,j}c-*.dll
fi
echo "Deleting old include directory..."
rm -rf "$SAGE_LOCAL"/include/eclib/


cd src/

#############################################################
Expand Down
17 changes: 0 additions & 17 deletions build/pkgs/ecm/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,6 @@ else
echo "to, or '--with-pic' was given in ECM_CONFIGURE."
fi

if [ "$UNAME" == "CYGWIN" ]; then
# Force shared library build only on Cygwin; it will not build otherwise
ECM_CONFIGURE="$ECM_CONFIGURE --enable-shared --disable-static"
fi


if [ "$SAGE_DEBUG" = yes ]; then
# Add debug symbols and disable optimization:
echo >&2 "Warning: Setting SAGE_DEBUG=yes completely disables optimization."
Expand Down Expand Up @@ -238,17 +232,6 @@ sdh_configure $SAGE_CONFIGURE_GMP $ECM_CONFIGURE

sdh_make

###############################################################################
# Remove old executable/header/libraries/manpage:
###############################################################################

echo
echo "Build succeeded. Now removing old binary, header file, manual page and libraries..."
rm -f "$SAGE_LOCAL"/bin/ecm
rm -f "$SAGE_LOCAL"/lib/libecm.*
rm -f "$SAGE_LOCAL"/include/ecm.h
rm -f "$SAGE_LOCAL"/share/man/man1/ecm.1

###############################################################################
# Now install ECM:
###############################################################################
Expand Down
6 changes: 0 additions & 6 deletions build/pkgs/fplll/spkg-check.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
cd src

if [ "$UNAME" = "CYGWIN" ]; then
echo "Disable parallel testing on Cygwin"
MAKE="$MAKE -j1"
fi

$MAKE check
Loading
Loading