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

Commit

Permalink
Merge #33866
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed May 27, 2022
2 parents be053cb + cea777c commit 731424b
Show file tree
Hide file tree
Showing 477 changed files with 9,754 additions and 5,938 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/ci-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,8 @@ jobs:
bash ~/miniconda.sh -b -p $HOME/miniconda
echo "CONDA=$HOME/miniconda" >> $GITHUB_ENV
- name: Install bootstrap prerequisites
run: |
export PATH="$(pwd)/build/bin:$PATH"
SYSTEM=$(sage-guess-package-system)
eval $(sage-print-system-package-command $SYSTEM --sudo install $(sage-get-system-packages $SYSTEM _bootstrap))
# Create conda environment file
- name: Bootstrap
run: ./bootstrap
- name: Create conda environment files
run: ./bootstrap-conda

- name: Cache conda packages
uses: actions/cache@v2
Expand Down Expand Up @@ -80,6 +73,7 @@ jobs:
shell: bash -l {0}
continue-on-error: true
run: |
./bootstrap
echo "::add-matcher::.github/workflows/configure-systempackage-problem-matcher.json"
./configure --enable-build-as-root --with-python=$CONDA_PREFIX/bin/python --prefix=$CONDA_PREFIX $(for pkg in $(./sage -package list :standard: --has-file spkg-configure.m4 --has-file distros/conda.txt); do echo --with-system-$pkg=force; done)
echo "::remove-matcher owner=configure-system-package-warning::"
Expand All @@ -88,8 +82,8 @@ jobs:
- name: Build
shell: bash -l {0}
run: |
pip install --no-build-isolation -v -v -e pkgs/sage-conf pkgs/sage-setup
pip install --no-build-isolation -v -v -e src
pip install --no-build-isolation -v -v -e ./pkgs/sage-conf ./pkgs/sage-setup
pip install --no-build-isolation -v -v -e ./src
env:
SAGE_NUM_THREADS: 2

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
/environment.yml
/environment-optional.yml
/src/environment.yml
/src/environment-dev.yml
/src/environment-optional.yml

/src/setup.cfg
Expand Down
1 change: 1 addition & 0 deletions .lgtm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ queries:
path_classifiers:
imports_only:
- "**/all.py"
- "**/all_*.py"
- "**/*catalog*.py"
- "**/species/library.py"
- "**/categories/basic.py"
Expand Down
13 changes: 12 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Sage: Pytest",
"type": "python",
"request": "launch",
"module": "pytest",
"args": [
"${file}"
],
"console": "integratedTerminal",
"justMyCode": false
},
{
"name": "Python: Current File",
"type": "python",
Expand All @@ -22,4 +33,4 @@
"justMyCode": false
}
],
}
}
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@
},
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": [
"src"
"--rootdir=src/sage",
"-c=src/tox.ini",
"--doctest-modules",
],
"python.testing.unittestEnabled": false,
"cSpell.words": [
"Conda",
"Cython"
],
}
8 changes: 4 additions & 4 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"description": "Mirror of the Sage https://sagemath.org/ source tree",
"license": "other-open",
"title": "sagemath/sage: 9.6",
"version": "9.6",
"title": "sagemath/sage: 9.7.beta1",
"version": "9.7.beta1",
"upload_type": "software",
"publication_date": "2022-05-15",
"publication_date": "2022-05-26",
"creators": [
{
"affiliation": "SageMath.org",
Expand All @@ -15,7 +15,7 @@
"related_identifiers": [
{
"scheme": "url",
"identifier": "https://github.com/sagemath/sage/tree/9.6",
"identifier": "https://github.com/sagemath/sage/tree/9.7.beta1",
"relation": "isSupplementTo"
},
{
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ bootstrap-clean:
rm -f src/doc/en/reference/repl/*.txt
rm -f environment.yml
rm -f src/environment.yml
rm -f src/environment-dev.yml
rm -f environment-optional.yml
rm -f src/environment-optional.yml
rm -f src/Pipfile
Expand All @@ -196,7 +197,7 @@ micro_release:
@echo "Removing unnecessary files & directories - make will not be functional afterwards anymore"
@# We keep src/sage for some doctests that it expect it to be there and
@# also because it does not add any weight with rdfind below.
@# We need src/sage/bin/ for the scripts that invoke Sage
@# We need src/bin/ for the scripts that invoke Sage
@# We need sage, the script to start Sage
@# We need local/, the dependencies and the built Sage library itself.
@# We keep VERSION.txt.
Expand Down
26 changes: 11 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,15 +413,18 @@ in the Installation Guide.
get a list by typing `./sage --optional` or by visiting the
[packages documentation page](https://doc.sagemath.org/html/en/reference/spkg/).

18. Optional: Create a symlink to the `sage` executable somewhere in your
`PATH`, so you can start Sage by typing `sage` from anywhere rather
than having to either type the full path or navigate to the Sage
18. Optional: Create a symlink to the installed `sage` script in a
directory in your `PATH`, for example ``/usr/local``. This will
allow you to start Sage by typing `sage` from anywhere rather than
having to either type the full path or navigate to the Sage
directory and type `./sage`. This can be done by running:

$ ln -s $HOME/sage/sage-x.y/sage /usr/local/bin
$ sudo ln -s $(./sage -sh -c 'ls $SAGE_ROOT/venv/bin/sage') /usr/local/bin

The `$HOME/sage/sage-x.y/` part may need adapting. One way to decide
how to adapt it is to run `print(SAGE_ROOT)` in a Sage session.
19. Optional: Set up SageMath as a Jupyter kernel in an existing Jupyter notebook
or JupyterLab installation, as described in [section
"Launching SageMath"](https://doc.sagemath.org/html/en/installation/launching.html)
in the installation manual.

Troubleshooting
---------------
Expand Down Expand Up @@ -580,17 +583,10 @@ Relocation

It is not supported to move the `SAGE_ROOT` or `SAGE_LOCAL` directory
after building Sage. If you do move the directories, you will have to
build Sage again from scratch.

If you copy the `sage` script or make a symbolic link to it, you
should modify the script to reflect this (as instructed at the top of
the script). It is important that the path to Sage does not have any
spaces and non-ASCII characters in it.
run ``make distclean`` and build Sage again from scratch.

For a system-wide installation, you have to build Sage as a "normal" user
and then as root you can change permissions. Afterwards, you need to start up
Sage as root at least once prior to using the system-wide Sage as a
normal user. See the [Installation Guide](https://doc.sagemath.org/html/en/installation/source.html#installation-in-a-multiuser-environment)
and then as root you can change permissions. See the [Installation Guide](https://doc.sagemath.org/html/en/installation/source.html#installation-in-a-multiuser-environment)
for further information.

Redistribution
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 9.6, Release Date: 2022-05-15
SageMath version 9.7.beta1, Release Date: 2022-05-26
1 change: 1 addition & 0 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ SAGE_SPKG_FINALIZE([$pkgname], [$pkgtype], [$SPKG_SOURCE], [$SPKG_TREE_VAR])"
# ONLY stderr, and to re-output the results back to stderr leaving
# stdout alone. Basically we swap the two descriptors using a
# third, filter, and then swap them back.
./bootstrap-conda && \
src/doc/bootstrap && \
install_config_rpath && \
aclocal -I m4 && \
Expand Down
78 changes: 78 additions & 0 deletions bootstrap-conda
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#!/usr/bin/env bash

########################################################################
# Generate auto-generated conda environment files
#########################################################################

STRIP_COMMENTS="sed s/#.*//;"
RECOMMENDED_SPKG_PATTERN="@(_recommended$(for a in $(head -n 1 build/pkgs/_recommended/dependencies); do echo -n "|"$a; done))"

BOOTSTRAP_PACKAGES=$(echo $(${STRIP_COMMENTS} build/pkgs/_bootstrap/distros/conda.txt))
SYSTEM_PACKAGES=
OPTIONAL_SYSTEM_PACKAGES=
SAGELIB_SYSTEM_PACKAGES=
SAGELIB_OPTIONAL_SYSTEM_PACKAGES=
RECOMMENDED_SYSTEM_PACKAGES=
for PKG_BASE in $(./sage --package list --has-file distros/conda.txt); do
PKG_SCRIPTS=build/pkgs/$PKG_BASE
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/distros/conda.txt
PKG_TYPE=$(cat $PKG_SCRIPTS/type)
PKG_SYSTEM_PACKAGES=$(echo $(${STRIP_COMMENTS} $SYSTEM_PACKAGES_FILE))
if [ -n "PKG_SYSTEM_PACKAGES" ]; then
if [ -f $PKG_SCRIPTS/spkg-configure.m4 ]; then
case "$PKG_BASE:$PKG_TYPE" in
*:standard)
SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
;;
$RECOMMENDED_SPKG_PATTERN:*)
RECOMMENDED_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
;;
*)
OPTIONAL_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
;;
esac
else
case "$PKG_TYPE" in
standard)
SAGELIB_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
;;
*)
SAGELIB_OPTIONAL_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
;;
esac
fi
fi
done
echo >&2 $0:$LINENO: generate conda enviroment files
echo "name: sage-build" > environment.yml
echo "channels:" >> environment.yml
echo " - conda-forge" >> environment.yml
echo " - nodefaults" >> environment.yml
echo "dependencies:" >> environment.yml
for pkg in $SYSTEM_PACKAGES; do
echo " - $pkg" >> environment.yml
done
echo " # Packages needed for ./bootstrap" >> environment.yml
for pkg in $BOOTSTRAP_PACKAGES; do
echo " - $pkg" >> environment.yml
done
sed 's/name: sage-build/name: sage/' environment.yml > src/environment.yml
for pkg in $SAGELIB_SYSTEM_PACKAGES; do
echo " - $pkg" >> src/environment.yml
done
sed 's/name: sage/name: sage-dev/' src/environment.yml > src/environment-dev.yml
echo " # Additional dev tools" >> src/environment-dev.yml
echo " - openssh" >> src/environment-dev.yml
echo " - pycodestyle" >> src/environment-dev.yml
echo " - pytest" >> src/environment-dev.yml

cp environment.yml environment-optional.yml
echo " # optional packages" >> environment-optional.yml
for pkg in $OPTIONAL_SYSTEM_PACKAGES; do
echo " - $pkg" >> environment-optional.yml
done
cp src/environment.yml src/environment-optional.yml
echo " # optional packages" >> src/environment-optional.yml
for pkg in $OPTIONAL_SYSTEM_PACKAGES $SAGELIB_OPTIONAL_SYSTEM_PACKAGES; do
echo " - $pkg" >> src/environment-optional.yml
done
13 changes: 0 additions & 13 deletions build/make/install
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,3 @@ fi

# Build succeeded.
echo "Sage build/upgrade complete!"

if [ "$1" = "all" ]; then
echo
echo "To install small scripts to directly run Sage's versions of GAP,"
echo "the PARI/GP interpreter, Maxima, or Singular etc. (by typing e.g."
echo "just 'gap' or 'gp') into a standard 'bin' directory, start Sage"
echo "by typing 'sage' (or './sage') and enter something like"
echo
echo " install_scripts('/usr/local/bin')"
echo
echo "at the Sage command prompt ('sage:')."
echo
fi
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=f0ab7c18b3a169fdf7238fe8d70f8bce29373ef4
md5=37b7220d90d9ec624e126ebb12cc8547
cksum=3498005086
sha1=e147a1128d59e97feef980eb3847798d1838565b
md5=134802b2602846ef70dba2d0740be18c
cksum=2068092591
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
888d18eb851f892097a0a683c01e3a95db863495
8501c7398215556ff4a4c8b05c6699949c8dfca3
2 changes: 1 addition & 1 deletion build/pkgs/ecm/SPKG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Description

GMP-ECM - Elliptic Curve Method for Integer Factorization

Sources can be obtained from http://gforge.inria.fr/projects/ecm/
Sources can be obtained from https://gitlab.inria.fr/zimmerma/ecm

License
-------
Expand Down
7 changes: 4 additions & 3 deletions build/pkgs/ecm/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
tarball=ecm-VERSION.tar.gz
sha1=407e41af6f93214509810b954b88251e4b89e82b
md5=559b13454b2094fbf26b33ff4fc824b7
cksum=3785569195
sha1=f35d225d1d44f9b8ad420bf9b50a92582f681337
md5=cfbb789d76cf538fc4dbb99d8e6e4b81
cksum=2195620014
upstream_url=https://gitlab.inria.fr/zimmerma/ecm/uploads/89f6f0d65d3e980cef33dc922004e4b2/ecm-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/ecm/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.4.p2
7.0.5
Loading

0 comments on commit 731424b

Please sign in to comment.