Skip to content

Commit

Permalink
Merge branch 'conda_remove_broken_packages' into 10.2.beta5+updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Sep 30, 2023
2 parents 1bd5712 + 9fff931 commit c112057
Show file tree
Hide file tree
Showing 39 changed files with 169 additions and 110 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/onCreate-conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e
# Create conda environment
./bootstrap-conda
conda install mamba -n base -c conda-forge -y
mamba env create --file src/environment-dev.yml || mamba env update --file src/environment-dev.yml
mamba env create --file src/environment-dev-3.11.yml || mamba env update --file src/environment-dev-3.11.yml
conda init bash

# Build sage
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,17 @@ jobs:
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ hashFiles('src/environment.yml') }}
${{ runner.os }}-conda-${{ hashFiles('src/environment-3.11.yml') }}

- name: Setup Conda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python }}
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
channel-priority: strict
activate-environment: sage-build
environment-file: src/${{ matrix.conda-env }}.yml
environment-file: src/${{ matrix.conda-env }}-${{ matrix.python }}.yml

- name: Print Conda environment
shell: bash -l {0}
Expand All @@ -101,7 +101,7 @@ jobs:
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 --exclude rpy2); do echo --with-system-$pkg=force; done)
./configure --enable-build-as-root --with-python=$CONDA_PREFIX/bin/python --prefix=$CONDA_PREFIX --enable-system-site-packages $(for pkg in $(./sage -package list :standard: --has-file spkg-configure.m4 --has-file distros/conda.txt --exclude rpy2); do echo --with-system-$pkg=force; done)
echo "::remove-matcher owner=configure-system-package-warning::"
echo "::remove-matcher owner=configure-system-package-error::"
Expand All @@ -110,7 +110,7 @@ jobs:
run: |
# Use --no-deps and pip check below to verify that all necessary dependencies are installed via conda.
pip install --no-build-isolation --no-deps -v -v -e ./pkgs/sage-conf ./pkgs/sage-setup
pip install --no-build-isolation --no-deps -v -v -e ./src
pip install --no-build-isolation --no-deps --config-settings editable_mode=compat -v -v -e ./src
env:
SAGE_NUM_THREADS: 2

Expand Down
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,29 @@
# no longer generated, but may still be in user worktrees
/src/lib/pkgconfig

# Environment files generated by bootstrap-conda.
# The files without Python version are no longer generated
# but may still be in users' directories.
/environment.yml
/environment-3.9.yml
/environment-3.10.yml
/environment-3.11.yml
/environment-optional.yml
/environment-optional-3.9.yml
/environment-optional-3.10.yml
/environment-optional-3.11.yml
/src/environment.yml
/src/environment-3.9.yml
/src/environment-3.10.yml
/src/environment-3.11.yml
/src/environment-dev.yml
/src/environment-dev-3.9.yml
/src/environment-dev-3.10.yml
/src/environment-dev-3.11.yml
/src/environment-optional.yml
/src/environment-optional-3.9.yml
/src/environment-optional-3.10.yml
/src/environment-optional-3.11.yml

/src/setup.cfg
/src/requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tasks:
# Create conda environment, then configure and build sage
init: >-
./bootstrap-conda
&& mamba env create --file src/environment-dev.yml --prefix venv
&& mamba env create --file src/environment-dev-3.11.yml --prefix venv
&& conda config --append envs_dirs $(pwd)
&& conda activate $(pwd)/venv
&& ./bootstrap
Expand Down
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,7 @@ bootstrap-clean:
rm -rf config/install-sh config/compile config/config.guess config/config.sub config/missing configure build/make/Makefile-auto.in
rm -f src/doc/en/installation/*.txt
rm -rf src/doc/en/reference/spkg/*.rst
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
for a in environment environment-optional src/environment src/environment-dev src/environment-optional; do rm -f $$a.yml $$a-3.[89].yml $$a-3.1[0-9].yml; done
rm -f src/Pipfile
rm -f src/pyproject.toml
rm -f src/requirements.txt
Expand Down
8 changes: 4 additions & 4 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,10 @@ save () {
build/make/Makefile-auto.in \
src/doc/en/installation/*.txt \
src/doc/en/reference/spkg/*.rst \
environment.yml \
src/environment.yml \
environment-optional.yml \
src/environment-optional.yml \
environment-3.[89].yml environment-3.1[0-9].yml \
src/environment-3.[89].yml src/environment-3.1[0-9].yml \
environment-optional-3.[89].yml environment-optional-3.1[0-9].yml \
src/environment-optional-3.[89].yml src/environment-optional-3.1[0-9].yml \
src/Pipfile \
src/pyproject.toml \
src/requirements.txt \
Expand Down
135 changes: 69 additions & 66 deletions bootstrap-conda
Original file line number Diff line number Diff line change
Expand Up @@ -51,72 +51,75 @@ for PKG_BASE in $(sage-package list --has-file distros/conda.txt --exclude _sage
fi
done
echo >&2 $0:$LINENO: generate conda environment files
(
echo "name: sage-build"
echo "channels:"
echo " - conda-forge"
echo " - nodefaults"
echo "dependencies:"
for pkg in $SYSTEM_PACKAGES; do
echo " - $pkg"
done
echo " # Packages needed for ./bootstrap"
for pkg in $BOOTSTRAP_PACKAGES; do
echo " - $pkg"
done
) > environment.yml
for python_version in 3.9 3.10 3.11; do
(
echo "name: sage-build"
echo "channels:"
echo " - conda-forge"
echo " - nodefaults"
echo "dependencies:"
echo " - python=$python_version"
for pkg in $SYSTEM_PACKAGES; do
echo " - $pkg"
done
echo " # Packages needed for ./bootstrap"
for pkg in $BOOTSTRAP_PACKAGES; do
echo " - $pkg"
done
) > environment-$python_version.yml
(
sed 's/name: sage-build/name: sage/' environment-$python_version.yml
echo " # Additional packages providing all dependencies for the Sage library"
for pkg in $SAGELIB_SYSTEM_PACKAGES; do
echo " - $pkg"
done
) > src/environment-$python_version.yml

(
sed 's/name: sage-build/name: sage/' environment.yml
echo " # Additional packages providing all dependencies for the Sage library"
for pkg in $SAGELIB_SYSTEM_PACKAGES; do
echo " - $pkg"
done
) > src/environment.yml
(
cat environment-$python_version.yml
echo " # optional packages"
for pkg in $OPTIONAL_SYSTEM_PACKAGES; do
echo " - $pkg"
done
) > environment-optional-$python_version.yml

(
sed 's/name: sage/name: sage-dev/' src/environment.yml
echo " # Additional dev tools"
for pkg in $DEVELOP_SYSTEM_PACKAGES; do
echo " - $pkg"
done
) > src/environment-dev.yml

(
cat environment.yml
echo " # optional packages"
for pkg in $OPTIONAL_SYSTEM_PACKAGES; do
echo " - $pkg"
done
) > environment-optional.yml

(
cat src/environment.yml
echo " # optional packages"
for pkg in $OPTIONAL_SYSTEM_PACKAGES $SAGELIB_OPTIONAL_SYSTEM_PACKAGES; do
echo " - $pkg"
done
) > src/environment-optional.yml
(
echo >&4 " - pip:"
echo >&5 " - pip:"
for PKG_BASE in $((sage-package list :standard: :optional: --has-file requirements.txt --no-file distros/conda.txt --no-file src; sage-package list :standard: :optional: --has-file install-requires.txt --no-file requirements.txt --no-file distros/conda.txt --no-file src) | sort); do
PKG_SCRIPTS=build/pkgs/$PKG_BASE
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/requirements.txt
if [ ! -f $SYSTEM_PACKAGES_FILE ]; then
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/install-requires.txt
fi
PKG_TYPE=$(cat $PKG_SCRIPTS/type)
if grep -q SAGERUNTIME $PKG_SCRIPTS/dependencies $PKG_SCRIPTS/dependencies_order_only 2>/dev/null; then
: # cannot install packages that depend on the Sage library
else
case "$PKG_BASE:$PKG_TYPE" in
$DEVELOP_SPKG_PATTERN:*) FD=4;;
*) FD=5;;
esac
${STRIP_COMMENTS} $SYSTEM_PACKAGES_FILE | while read -r line; do
[ -n "$line" ] && echo >&$FD " - $line"
(
(
sed 's/name: sage/name: sage-dev/' src/environment-$python_version.yml
echo " # Additional dev tools"
for pkg in $DEVELOP_SYSTEM_PACKAGES; do
echo " - $pkg"
done
fi
done
) 4>> src/environment-dev.yml 5>> src/environment-optional.yml
) >&4
(
cat src/environment-$python_version.yml
echo " # optional packages"
for pkg in $OPTIONAL_SYSTEM_PACKAGES $SAGELIB_OPTIONAL_SYSTEM_PACKAGES; do
echo " - $pkg"
done
) >&5
echo >&4 " - pip:"
echo >&5 " - pip:"
echo >&6 " - pip:"
for PKG_BASE in $((sage-package list :standard: :optional: --has-file requirements.txt --no-file distros/conda.txt --no-file src; sage-package list :standard: :optional: --has-file install-requires.txt --no-file requirements.txt --no-file distros/conda.txt --no-file src) | sort); do
PKG_SCRIPTS=build/pkgs/$PKG_BASE
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/requirements.txt
if [ ! -f $SYSTEM_PACKAGES_FILE ]; then
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/install-requires.txt
fi
PKG_TYPE=$(cat $PKG_SCRIPTS/type)
if grep -q SAGERUNTIME $PKG_SCRIPTS/dependencies $PKG_SCRIPTS/dependencies_order_only 2>/dev/null; then
: # cannot install packages that depend on the Sage library
else
case "$PKG_BASE:$PKG_TYPE" in
$DEVELOP_SPKG_PATTERN:*) FD=4;;
*:standard) FD="4 5 6";;
*) FD=5;;
esac
${STRIP_COMMENTS} $SYSTEM_PACKAGES_FILE | while read -r line; do
[ -n "$line" ] && for fd in $FD; do echo >&$fd " - $line"; done
done
fi
done
) 4>> src/environment-dev-$python_version.yml 5>> src/environment-optional-$python_version.yml 6>> src/environment-$python_version.yml
done
1 change: 1 addition & 0 deletions build/pkgs/argon2_cffi_bindings/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
argon2-cffi-bindings
1 change: 1 addition & 0 deletions build/pkgs/cachetools/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cachetools
1 change: 1 addition & 0 deletions build/pkgs/calver/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
calver
1 change: 1 addition & 0 deletions build/pkgs/chardet/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
chardet
1 change: 1 addition & 0 deletions build/pkgs/colorama/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
colorama
1 change: 1 addition & 0 deletions build/pkgs/contourpy/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
contourpy
3 changes: 2 additions & 1 deletion build/pkgs/cryptominisat/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
cryptominisat
# This is not yet compatible with Python 3.11: https://github.com/conda-forge/cryptominisat-feedstock/pull/45
#cryptominisat
1 change: 1 addition & 0 deletions build/pkgs/hatch_fancy_pypi_readme/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hatch-fancy-pypi-readme
1 change: 1 addition & 0 deletions build/pkgs/hatch_nodejs_version/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hatch-nodejs-version
1 change: 1 addition & 0 deletions build/pkgs/hatch_vcs/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hatch-vcs
2 changes: 1 addition & 1 deletion build/pkgs/ipywidgets/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ipywidgets<8.0.0
ipywidgets>=7.5.1
1 change: 1 addition & 0 deletions build/pkgs/jupymake/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# The presence of this file ensures that we do not try to pip-install JuPyMake (there is no polymake conda package).
1 change: 1 addition & 0 deletions build/pkgs/jupyterlab_widgets/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
jupyterlab_widgets
1 change: 0 additions & 1 deletion build/pkgs/mathics/distros/conda.txt

This file was deleted.

2 changes: 1 addition & 1 deletion build/pkgs/matplotlib/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Trac #33642: For unknown reasons, without the version constraint, conda installs only 3.3.2
"matplotlib>=3.5.1"
matplotlib>=3.5.1
1 change: 1 addition & 0 deletions build/pkgs/meson/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
meson
1 change: 1 addition & 0 deletions build/pkgs/meson_python/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
meson-python
2 changes: 1 addition & 1 deletion build/pkgs/networkx/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
networkx<3.0,>=2.4
networkx<3.2,>=2.4
12 changes: 12 additions & 0 deletions build/pkgs/numpy/patches/cython3-legacy.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/tools/cythonize.py b/tools/cythonize.py
index 002b2fa..c04422e 100755
--- a/tools/cythonize.py
+++ b/tools/cythonize.py
@@ -47,6 +47,7 @@ def process_pyx(fromfile, tofile):
flags = ['-3', '--fast-fail']
if tofile.endswith('.cxx'):
flags.append('--cplus')
+ flags += ['--directive', 'legacy_implicit_noexcept=true']

subprocess.check_call(
[sys.executable, '-m', 'cython'] + flags + ["-o", tofile, fromfile])
1 change: 0 additions & 1 deletion build/pkgs/patchelf/distros/conda.txt

This file was deleted.

1 change: 1 addition & 0 deletions build/pkgs/pycygwin/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# The presence of this file ensures that we do not try to pip-install pycygwin -- which would fail with a compilation error
1 change: 1 addition & 0 deletions build/pkgs/pyproject_api/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pyproject-api
1 change: 1 addition & 0 deletions build/pkgs/pyproject_metadata/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pyproject-metadata
2 changes: 1 addition & 1 deletion build/pkgs/sagenb_export/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sagenb_export >=3.3
git+https://github.com/vbraun/ExportSageNB.git#egg=sagenb_export
2 changes: 1 addition & 1 deletion build/pkgs/scipy/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
scipy<1.11,>=1.5
scipy<1.12,>=1.5
5 changes: 1 addition & 4 deletions build/pkgs/setuptools/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
# Set this bound until https://github.com/sagemath/sage/issues/34209 adds support for PEP660 editable builds
# By setting this version bound, we avoid having to include the following in our installation instructions.
# export SETUPTOOLS_ENABLE_FEATURES=legacy-editable
"setuptools<64"
setuptools
1 change: 1 addition & 0 deletions build/pkgs/setuptools_wheel/distros
1 change: 0 additions & 1 deletion build/pkgs/setuptools_wheel/distros/repology.txt

This file was deleted.

2 changes: 1 addition & 1 deletion build/pkgs/sphinx/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sphinx<8,>=5.2
sphinx>=5.2,<8
1 change: 1 addition & 0 deletions build/pkgs/trove_classifiers/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
trove-classifiers
Loading

0 comments on commit c112057

Please sign in to comment.