Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
build/pkgs/sagelib/spkg-install: Remove installed sage/__init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Jul 15, 2022
1 parent d3bdb46 commit 7336e9d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build/pkgs/sagelib/spkg-install
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export SAGE_SHARE=/doesnotexist
# export SAGE_DOC=/doesnotexist

SITEPACKAGESDIR=$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')

if [ "$SAGE_EDITABLE" = yes ]; then
# In an incremental build, we may need to uninstall old versions installed by distutils
# under the old distribution name "sage" (before #30912, which switched to setuptools
Expand All @@ -46,6 +47,9 @@ if [ "$SAGE_EDITABLE" = yes ]; then
(cd "$SITEPACKAGESDIR" && rm -rf sage sage_setup sage-[1-9]*.egg-info sage-[1-9]*.dist-info)
time python3 -m pip install --verbose --no-deps --no-index --no-build-isolation --isolated --editable . || exit 1
else
# Make sure that an installed old version of sagelib in which sage is an ordinary package
# does not shadow the namespace package sage during the build.
(cd "$SITEPACKAGESDIR" && rm -f sage/__init__.py)
# Likewise, we should remove the egg-link that may have been installed previously.
(cd "$SITEPACKAGESDIR" && rm -f sagemath-standard.egg-link)
time python3 -u setup.py --no-user-cfg build install || exit 1
Expand Down

0 comments on commit 7336e9d

Please sign in to comment.