Skip to content

Commit

Permalink
sync with official remote (#1)
Browse files Browse the repository at this point in the history
* build/pkgs/referencing/dependencies: Add missing dep

* add :wikipedia:`Cycle Index Theorem etc

as explained in my comments on the PR

* Fixes for reviewer comments

* fix linter

* Implement fallback mechanism of default latex engine

* fix qepcad doctest

This test started to fail on Sage 10.3.beta2

* Small edit

* adding line breaks ad suggested

* fix doctest warnings in src/sage/interfaces/

* some ruff fixes (UP034 and UP039 codes) and error links in categories

* ruff auto-fixing several details in combinat folder

* more fixes

* some ruff fixes and error links in the graphs folder

* removed 'arb' which popped up in deps

* sage.env, sage.misc.package: Use SAGE_LOCAL_SPKG_INST to avoid clash with SAGE_SPKG_INST set by sage-spkg

* fix warnings in coxeter_group.py

* fix warnings in coxeter_group.py

* Default engine is computed lazily

* fix warnings in coxeter.pyx

* fix doctest warnings in src/sage/game_theory/gambit_docs.py

* fix doctest warnings in src/sage/game_theory/parser.py

* ruff UP details and links to errors in doc in geometry folder

* fix doctest warnings in src/sage/game_theory/normal_form_game.py

* document&test corner case, empty domain without constraints

* Documented that sagemath#36527 causes erroneous results & how to avoid

* fix doctest warnings in src/sage/categories/finite_complex_reflection_groups.py

* fix doctest warnings in src/sage/coding/ag_code_decoders.pyx

* fix doctest warnings in src/sage/plot/graphics.py

* oops, correct workaround

* fix doctest warnings in src/sage/quadratic_forms/ternary_qf

* various fixes in quadratic_forms (ruff, pep8, error links, etc)

* Small language fixes; for brevity move one example to tests

* png() uses the default engine

* suggested details

* suggested details

* Changed _matrix_power_symbolic function to condier mk=0 case

This fixes sagemath#36838. Here, I have added a condition to check whether
mk=0 or not. Because whenever mk=0 we should give mk^(n-i) (i.e. 0^(n-i))
instead of only 0 considering (n-i) can be equal to zero and in this
case 0^(n-i) will be more accurate than only 0.

* Changed the _matrix_power_symbolic function to handle all the cases

This change handles all the errors which were occuring in previous
commit and this commit handles the case of mx=0 very effectively.

* Created tests covering the changes

Created tests covering the changes and checking whether the
trac:`36838` is fixed or not.

* Give more precise answer by using kroncker_delta function

Instead of returning 0^(n-i), it would be more precise if
we reutrn value of  kroncker_delta function, it will be helpful when
we try to evaluate the final matrix using the value of n.

* Rewriting tests for the PR

Changed the final answer given by test of this PR.

* Correct answers of the doctest for _matrix_power_symbolic function

Changed the answer of doctest  according to new changes.

* Corrected the doctest

Corrected the doctest and improved some code styles, which were not
correct according to guidelines for python coding for sage.

* Modified the doctest and changed the comment

Updated the old doctests which were failing before and updated the comment
to make it more readable.

* Corrected lint errors

* use file-level tag in src/sage/libs/coxeter/coxeter.pyx

* use file-level tag in src/sage/libs/coxeter/coxeter_group.py

* build/pkgs/*/distros: Remove quotes, change to one package per line

git grep -l \" build/pkgs/*/distros* | xargs sed -i.bak '/^"/s/"//g'

git grep -l -E '^([^# ]+) +([^# ][^#]+)(#.*)' build/pkgs/*/distros/*.txt | xargs sed -E -i.bak $'s/^([^# ]+) +([^# ][^#]+)(#.*)?/\\3\\\n\\1\\\n\\2/'

git grep -l -E '^([^# ]+) +([^# ][^#]+)' build/pkgs/*/distros/*.txt | xargs sed -E -i.bak $'s/^([^# ]+) +([^# ][^#]+)/\\1\\\n\\2/'

git grep -l -E ' +$' build/pkgs/*/distros/*.txt | xargs sed -E -i.bak 's/[ ]+$//'

* build/bin/sage-print-system-package-command: Shell-quote the packages

* fix precision issue for 𝑗=0 and ℓ=3

* build/bin/sage-get-system-packages: Substitute PYTHON_MINOR here

* build/bin/write-dockerfile.sh: Shell-quote system packages

* src/doc/bootstrap: Use sage-get-system-packages so that ENABLE_SYSTEM_SITEPACKAGES is respected

* sage-spkg-info, src/doc/bootstrap: Wrap command lines

* Current engine is dependent on the user's system

* Document the format of system package files

* src/doc/bootstrap: Wrap more narrowly

* Addressing reviewer comments.

* build/bin/sage-print-system-package-command: Simplify

* src/doc/bootstrap: Remove unused variable

* src/doc/bootstrap: Parallelize generation of SPKG.rst files

* build/bin/sage-spkg-info: Restore lost blank output line

* build/bin/sage-spkg-info: Fix and improve RST markup

* 36884: issue reference

Co-authored-by: Travis Scrimshaw <[email protected]>

* 36884: doctest formatting

Co-authored-by: Travis Scrimshaw <[email protected]>

* 36884: replace copy

Co-authored-by: Travis Scrimshaw <[email protected]>

* adding corolla-related methods to free pre-Lie algebras

* 36884: new list loop_crossings

* build/pkgs/_bootstrap/distros/fedora.txt: Remove outdated comment

* tox.ini: Add local-macports

* Add macports.txt

* build/pkgs/_prereq/distros: Update file comments

* build/bin/sage-print-system-package-command: Handle macports install

* tox.ini (local-macports-optlocal): Use sudo

* build/bin/sage-print-system-package-command (macports): Handle setup-build-env

* build/bin/sage-guess-package-system: Detect macports

* tox.ini: Add configuration factors macports-python{3.8,3.9}

* build/bin/sage-print-system-package-command (macports): Recommend FC as configure arg, not environment variable

This is so that the presence of the environment variable at 'make' time
does not break the build when the compiler is not actually present.

* tox.ini (macports): Pass FC as configure argument; add variants macports-gcc_{spkg,9,10,11}

* tox.ini (macports): Fix up use of ALL_EXTRA_SAGE_PACKAGES

* tox.ini (local-macports): Update macports base version to 2.7.2

* build/pkgs/gfortran/distros/macports.txt: Switch to gcc11

* tox.ini (macports): By default use FC=gfortran-mp-11

* build/bin/sage-print-system-package-command (macports): Also update to gcc11 here

* WIP

* tox.ini (macports): Remove variants that tried to use real gcc

* build/pkgs/libgd/distros/macports.txt: Disable

* build/pkgs/python3/distros/macports.txt: Use python310

* Disable more broken macports packages

* build/bin/sage-print-system-package-command [macports]: Do not describe variants that do not work

* tox.ini (macports): Set CPATH, LIBRARY_PATH

* build/pkgs/pari/distros/macports.txt: Disable

* tox.ini (macports): Use isysroot

* build/bin/sage-print-system-package-command (macports): Update use of print_shell_command

* build/pkgs/_bootstrap/distros/macports.txt: One package per line

* tox.ini: Add macports-python3.12

* revert some "a -> an" changes

* Updated SageMath version to 10.3.beta3

* Remove a redundant comment

* build/pkgs/e_antic: Update to 2.0.0

* sage.{coding,combinat}: Update # needs

* sage.combinat.root_system: Update # needs

* sage.combinat: Update # needs

* sage.combinat: Update # needs

* sage -fixdoctests src/sage/combinat

* sage.rings: Update # needs

* sage.rings: Update # needs

* sage.rings: Update # needs

* sage -fixdoctests src/sage/rings

* src/sage/rings/power_series_ring.py: Fix import

* Remove empty doctest lines

* sage.rings: Break an import cycle

* sage.rings.continued_fraction: Make imports from sage.combinat.words lazy

* sage.{categories,rings}: Modularization fixes for imports

* Remove uses of sage.PACKAGE.all...

* pkgs/sagemath-{flint,symbolics}: Fixups

* Massive modularization fixes

* Remove uses of sage.PACKAGE.all... (fixup)

* pkgs/sagemath-gap: Move reflection_group, weyl_group here from sagemath-modules

* suggested changes, arigato !

* refresh the doc about coercion and test the given example

* reverted changes and added self.is_dead(warn_only=True)

* fixing one bug in the use of valuation

* suggested detail

* add interface to nauty's genktreeg

* 36884: treat no loops first

Co-authored-by: Travis Scrimshaw <[email protected]>

* src/sage/calculus/ode.pyx: constness fix for clang 16

* sage.rings: Modularization fixes for imports of power series

* build/pkgs/normaliz/patches: Add https://github.com/Normaliz/Normaliz/issues/412\#issuecomment-1862036237

* src/sage/rings/finite_rings/element_ntl_gf2e.pyx: Fix test for libgap element

* Fixing some details.

* build/pkgs/normaliz/spkg-install.in: Override FLINT configure test

* build/pkgs/_prereq/distros/conda.txt: Pin compilers until sagemath#36840 is fixed

* build/pkgs/{normaliz,pynormaliz}: Add patchlevel to trigger build of pynormaliz in 'CI Linux incremental'

* change build/pkgs/nauty/spkg-configure.m4

* details fixed in cfinite_sequence.py

* update comment in build/pkgs/nauty/spkg-configure.m4

* src/sage/tests/gap_packages.py: Normalize package names to lower case in doctest

* suggested changes

* build/pkgs/furo/spkg-install.in: Remove

* remove one doctest, fix the other

* add some # optional - nauty tags

* some details in multi_polynomial base

* use # needs nauty

* suggested change in src/sage/features/nauty.py

* src/sage/doctest/forker.py: Use JobClient(use_cysignals=True)

* src/sage/doctest/forker.py: Do not mask ImportError while calling JobClient

* build/pkgs/gnumake_tokenpool: Update to 0.0.4

* build/pkgs/gnumake_tokenpool/install-requires.txt: require >= 0.0.4

* sage.plot: Update # needs

* sage.plot: Update # needs

* Add # needs

* sage -fixdoctests src/sage/plot

* src/sage/plot/arc.py: Fix # needs

* sage.plot: Doctest cosmetics (copied from sagemath#35095)

* src/sage/plot/plot3d/list_plot3d.py: Fix up

* src/sage/misc/replace_dot_all.py: Update doctest output

* src/sage/plot/plot.py: Fix Warning: Variable 'x' referenced here was set only in doctest marked '# long time, needs sage.symbolic'

* src/sage/doctest/sources.py: Use file-level doctest tags for the virtual doctest; fixes Warning: Variable 'sig_on_count' referenced here was set only ...

* build/pkgs/ninja_build: support samurai version scheme

Samurai is a C99 ninja implementation with an almost-compatible
version scheme, except that it has only two version components
instead of the three that ninja has. We update the "sed" call
used to parse the version number out of `ninja --version` so
that it can parse a samurai version too.

This should only matter on systems where (for example) /usr/bin/ninja
points to samurai. That's not typical, but it recently became possible
to do on Gentoo in an "official" way.

* src/sage/combinat/permutation.py: Fix # needs

* src/sage/combinat/root_system/non_symmetric_macdonald_polynomials.py: Fix # needs

* Addressing review comments for detecting subtypes.

* Updated SageMath version to 10.3.beta4

---------

Co-authored-by: Matthias Koeppe <[email protected]>
Co-authored-by: Dima Pasechnik <[email protected]>
Co-authored-by: Kwankyu Lee <[email protected]>
Co-authored-by: Frédéric Chapoton <[email protected]>
Co-authored-by: dcoudert <[email protected]>
Co-authored-by: Jukka Kohonen <[email protected]>
Co-authored-by: RuchitJagodara <[email protected]>
Co-authored-by: Release Manager <[email protected]>
Co-authored-by: Lorenz Panny <[email protected]>
Co-authored-by: Travis Scrimshaw <[email protected]>
Co-authored-by: Sebastian Oehms <[email protected]>
Co-authored-by: Travis Scrimshaw <[email protected]>
Co-authored-by: Sebastian <[email protected]>
Co-authored-by: John Cremona <[email protected]>
Co-authored-by: Heiko Knospe <[email protected]>
Co-authored-by: adrinospy <[email protected]>
Co-authored-by: Tobias Diez <[email protected]>
Co-authored-by: Michael Orlitzky <[email protected]>
  • Loading branch information
19 people authored Jan 3, 2024
1 parent e2e0f8d commit 121b7ff
Show file tree
Hide file tree
Showing 921 changed files with 7,800 additions and 5,439 deletions.
28 changes: 17 additions & 11 deletions .ci/create-changes-html.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,27 @@ for block in diff_blocks:
match = re.search(r'^diff --git a/(.*) b/\1', block, flags=re.MULTILINE)
if match:
doc = match.group(1)
path = 'html/' + doc
file_path = os.path.join('$DOC_REPOSITORY', doc)
with open(file_path, 'r') as file:
content = file.readlines()
try:
with open(file_path, 'r') as file:
content = file.readlines()
except FileNotFoundError:
content = []
count = 0
for line in block.splitlines():
if line.startswith('@@ -'):
line_number = int(re.search(r'@@ -(\d+)', line).group(1))
for i in range(line_number, -1, -1):
if content[i].startswith('<'):
count += 1
content[i] = f'<span id="hunk{count}" style="visibility: hidden;"></span>' + content[i]
break
with open(file_path, 'w') as file:
file.writelines(content)
search_result = re.search(r'@@ -(\d+),(\d+) \+(\d+),(\d+)', line)
if search_result:
line_number = int(search_result.group(3))
for i in range(line_number - 1, -1, -1):
if content[i].startswith('<'):
count += 1
content[i] = f'<span id="hunk{count}" style="visibility: hidden;"></span>' + content[i]
break
if content:
with open(file_path, 'w') as file:
file.writelines(content)
path = 'html/' + doc
hunks = '&nbsp;'.join(f'<a href="{path}#hunk{i+1}" class="hunk" target="_blank">#{i + 1}</a>' for i in range(count))
out_blocks.append(f'<p class="diff"><a href="{path}">{doc}</a>&nbsp;' + hunks + '&emsp;</p>'
+ '\n<pre><code class="language-diff">'
Expand Down
28 changes: 23 additions & 5 deletions .github/sync_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ def __init__(self, url, actor):
self._commits = None
self._commit_date = None
self._bot_login = None
self._gh_version = None

s = url.split('/')
self._owner = s[3]
Expand Down Expand Up @@ -235,13 +236,30 @@ def bot_login(self):
"""
if self._bot_login:
return self._bot_login
cmd = 'gh auth status'
from subprocess import run
cmd = 'gh version'
capt = run(cmd, shell=True, capture_output=True)
self._gh_version = str(capt.stdout).split('\\n')[0]
info('version: %s' % self._gh_version)
cmd = 'gh auth status'
capt = run(cmd, shell=True, capture_output=True)
l = str(capt.stderr).split()
if not 'as' in l:
l = str(capt.stdout).split()
self._bot_login = l[l.index('as')+1]
errtxt = str(capt.stderr)
outtxt = str(capt.stdout)
debug('auth status err: %s' % errtxt)
debug('auth status out: %s' % outtxt)
def read_login(txt, position_mark):
for t in txt:
for p in position_mark:
# the output text has changed from as to account
# around version 2.40.0
l = t.split()
if p in l:
return l[l.index(p)+1]
self._bot_login = read_login([errtxt, outtxt], ['account', 'as'])
if not self._bot_login:
self._bot_login = default_bot
warning('Bot is unknown')
return self._bot_login
if self._bot_login.endswith('[bot]'):
self._bot_login = self._bot_login.split('[bot]')[0]
info('Bot is %s' % self._bot_login)
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/ci-conda-known-test-failures.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"sage_setup.clean": {
"failed": true
},
"sage.combinat.cluster_algebra_quiver.quiver": {
"failed": true
},
"sage.geometry.cone": {
"failed": true
},
"sage.groups.matrix_gps.finitely_generated_gap": {
"failed": true
},
"sage.interfaces.expect": {
"failed": true
},
"sage.libs.gap.element": {
"failed": true
},
"sage.libs.singular.singular": {
"failed": true
},
"sage.matrix.matrix2": {
"failed": true
},
"sage.matrix.matrix_integer_sparse": {
"failed": true
},
"sage.misc.lazy_import": {
"failed": true
},
"sage.misc.weak_dict": {
"failed": true
},
"sage.modular.modform.l_series_gross_zagier": {
"failed": true
},
"sage.rings.function_field.drinfeld_modules.morphism": {
"failed": true
},
"sage.rings.polynomial.multi_polynomial_ideal": {
"failed": true
},
"sage.rings.polynomial.multi_polynomial_libsingular": {
"failed": true
},
"sage.rings.polynomial.skew_polynomial_finite_field": {
"failed": true
},
"sage.tests.gap_packages": {
"failed": true
}
}
2 changes: 1 addition & 1 deletion .github/workflows/ci-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
- name: Test
if: success() || failure()
shell: bash -l {0}
run: ./sage -t --all -p0
run: ./sage -t --all --baseline-stats-path=.github/workflows/ci-conda-known-test-failures.json -p0

- name: Print logs
if: always()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc-build-pdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
export PATH="build/bin:$PATH"
eval $(sage-print-system-package-command auto update)
eval $(sage-print-system-package-command auto --yes --no-install-recommends install zip)
eval $(sage-print-system-package-command auto --spkg --yes --no-install-recommends install git texlive)
eval $(sage-print-system-package-command auto --spkg --yes --no-install-recommends install git texlive texlive_luatex free_fonts xindy)
- name: Add prebuilt tree as a worktree
id: worktree
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ jobs:
export PATH="build/bin:$PATH"
eval $(sage-print-system-package-command auto update)
eval $(sage-print-system-package-command auto --yes --no-install-recommends install zip)
eval $(sage-print-system-package-command auto --spkg --yes --no-install-recommends install git texlive)
eval $(sage-print-system-package-command auto --spkg --yes --no-install-recommends install git texlive texlive_luatex free_fonts xindy)
export SAGE_USE_CDNS=yes
export SAGE_LIVE_DOC=yes
export SAGE_JUPYTER_SERVER=binder:sagemath/sage-binder-env/dev
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ title: SageMath
abstract: SageMath is a free open-source mathematics software system.
authors:
- name: "The SageMath Developers"
version: 10.3.beta2
version: 10.3.beta4
doi: 10.5281/zenodo.593563
date-released: 2023-12-13
date-released: 2023-12-26
repository-code: "https://github.com/sagemath/sage"
url: "https://www.sagemath.org/"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,8 @@ For installation of `sage` in python using `pip` you need to install `sagemath-s

$ python3 -m pip install sage_conf
$ ls $(sage-config SAGE_SPKG_WHEELS)
$ python3 -m pip install $(sage-config SAGE_SPKG_WHEELS)/*.whl
$ python3 -m pip install sagemath-standard
$ python3 -m pip install $(sage-config SAGE_SPKG_WHEELS)/*.whl sage_setup
$ python3 -m pip install --no-build-isolation sagemath-standard

You need to install `sage_conf`, a wheelhouse of various python packages. You can list the wheels using `ls $(sage-config SAGE_SPKG_WHEELS)`. After manual installation of these wheels, you can install the sage library, `sagemath-standard`.

Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 10.3.beta2, Release Date: 2023-12-13
SageMath version 10.3.beta4, Release Date: 2023-12-26
4 changes: 1 addition & 3 deletions build/bin/sage-dist-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ sdh_pip_install() {
# Our default after #33789 (Sage 9.7): We allow the package to provision
# its build environment using the stored wheels.
# We pass --find-links.
# The SPKG needs to declare "setuptools_wheel" as a dependency.
# The SPKG needs to declare "setuptools" as a dependency.
build_isolation_option="--find-links=$SAGE_SPKG_WHEELS"
;;
--no-build-isolation)
Expand Down Expand Up @@ -289,8 +289,6 @@ sdh_pip_install() {

sdh_pip_editable_install() {
echo "Installing $PKG_NAME (editable mode)"
# Until https://github.com/sagemath/sage/issues/34209 switches us to PEP 660 editable wheels
export SETUPTOOLS_ENABLE_FEATURES=legacy-editable
python3 -m pip install --verbose --no-deps --no-index --no-build-isolation --isolated --editable "$@" || \
sdh_die "Error installing $PKG_NAME"
}
Expand Down
2 changes: 1 addition & 1 deletion build/bin/sage-get-system-packages
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ case "$SYSTEM" in
fi
fi
SYSTEM_PACKAGES_FILE_NAMES="distros/$SYSTEM.txt"
STRIP_COMMENTS="sed s/#.*//;"
STRIP_COMMENTS="sed s/#.*//;s/\${PYTHON_MINOR}/${PYTHON_MINOR}/g"
COLLECT=echo
;;
esac
Expand Down
2 changes: 2 additions & 0 deletions build/bin/sage-guess-package-system
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ if conda --version > /dev/null 2>&1; then
fi
if brew --version > /dev/null 2>&1; then
echo homebrew
elif port version > /dev/null 2>&1; then
echo macports
elif emerge --version > /dev/null 2>&1; then
echo gentoo
elif apt-get --version > /dev/null 2>&1; then
Expand Down
63 changes: 46 additions & 17 deletions build/bin/sage-print-system-package-command
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ do
;;
--prompt)
PROMPT=' $ '
CONTINUATION=' '
;;
--continuation=*)
CONTINUATION="${1#--continuation=}"
;;
--wrap)
WRAP=78
;;
--wrap=*)
WRAP="${1#--wrap=}"
;;
--no-install-recommends)
NO_INSTALL_RECOMMENDS=yes
Expand Down Expand Up @@ -79,7 +89,13 @@ function print_shell_command()
echo ".. CODE-BLOCK:: bash"
echo
fi
echo "${PROMPT}$1"
# shell-quote arguments if necessary
quoted=$(for a in "$@"; do printf "%q " $a; done)
if [ -z "$WRAP" -o $# -lt 6 ]; then
echo "${PROMPT}${quoted}"
else
sage-bootstrap-python -c "import textwrap; print(' \\\\\n'.join(textwrap.wrap(r'''${quoted}''', $WRAP, initial_indent=r'''${PROMPT}''', subsequent_indent=r'''${CONTINUATION}''', break_long_words=False, break_on_hyphens=False)))"
fi
if [ -n "$OUTPUT_RST" ]; then
echo
fi
Expand All @@ -102,77 +118,90 @@ case $system:$command in
[ -n "$SAGE_ROOT" ] || SAGE_ROOT=.
echo "${PROMPT}source $SAGE_ROOT/.homebrew-build-env"
;;
macports*:setup-build-env)
$IF_VERBOSE echo "${COMMENT}"
$IF_VERBOSE echo "${COMMENT}WARNING: Use of MacPorts is experimental"
$IF_VERBOSE echo "${COMMENT}"
$IF_VERBOSE echo "${COMMENT}MacPorts does not provide unversioned gfortran executables by default"
$IF_VERBOSE echo "${COMMENT}To make gfortran available (and build with gcc from XCode), use:"
$IF_VERBOSE echo "${COMMENT}"
$IF_VERBOSE print_shell_command ./configure FC=gfortran-mp-11
;;
*:setup-build-env)
# Nothing needed
;;
#
# Verbs handled above are our own inventions. Verbs handled below are apt-get verbs.
#
@(debian*|ubuntu*):update)
print_shell_command "${SUDO}apt-get $command $system_packages"
print_shell_command ${SUDO}apt-get $command $system_packages
;;
@(debian*|ubuntu*):*)
[ "$NO_INSTALL_RECOMMENDS" = yes ] && options="$options --no-install-recommends"
[ "$YES" = yes ] && options="$options --yes" env="DEBIAN_FRONTEND=noninteractive "
[ -n "$system_packages" ] && print_shell_command "${SUDO}${env}apt-get $command $options $system_packages"
[ -n "$system_packages" ] && print_shell_command ${SUDO}${env}apt-get $command $options $system_packages
;;
@(fedora*|redhat*|centos*):install)
[ "$YES" = yes ] && options="$options -y"
[ -n "$system_packages" ] && print_shell_command "${SUDO}yum install $options $system_packages"
[ -n "$system_packages" ] && print_shell_command ${SUDO}yum install $options $system_packages
;;
gentoo*:install)
[ -n "$system_packages" ] && print_shell_command "${SUDO}emerge $system_packages"
[ -n "$system_packages" ] && print_shell_command ${SUDO}emerge $system_packages
;;
arch*:update)
print_shell_command "${SUDO}pacman -Sy"
;;
arch*:install)
[ "$YES" = yes ] && options="$options --noconfirm"
[ -n "$system_packages" ] && print_shell_command "${SUDO}pacman -S $options $system_packages"
[ -n "$system_packages" ] && print_shell_command ${SUDO}pacman -S $options $system_packages
;;
void*:update)
print_shell_command "${SUDO}xbps-install -Su"
;;
void*:install)
[ "$YES" = yes ] && options="$options --yes"
[ -n "$system_packages" ] && print_shell_command "${SUDO}xbps-install $options $system_packages"
[ -n "$system_packages" ] && print_shell_command ${SUDO}xbps-install $options $system_packages
;;
opensuse*:install)
[ -n "$system_packages" ] && print_shell_command "${SUDO}zypper install $system_packages"
[ -n "$system_packages" ] && print_shell_command ${SUDO}zypper install $system_packages
;;
*conda*:install)
[ "$YES" = yes ] && options="$options --yes"
[ -n "$system_packages" ] && print_shell_command "conda install $options $system_packages"
[ -n "$system_packages" ] && print_shell_command conda install $options $system_packages
;;
homebrew*:install)
[ -n "$system_packages" ] && print_shell_command "brew install $system_packages"
[ -n "$system_packages" ] && print_shell_command brew install $system_packages
;;
macports*:install)
[ "$YES" = yes ] && options="$options -N"
[ -n "$system_packages" ] && print_shell_command ${SUDO}port $options install $system_packages
;;
slackware*:install)
[ -n "$system_packages" ] && print_shell_command "${SUDO}slackpkg install $system_packages"
[ -n "$system_packages" ] && print_shell_command ${SUDO}slackpkg install $system_packages
;;
cygwin*:update)
print_comment "first install apt-cyg from https://github.com/transcode-open/apt-cyg"
;;
cygwin*:install)
[ -n "$system_packages" ] && print_shell_command "apt-cyg install $system_packages"
[ -n "$system_packages" ] && print_shell_command apt-cyg install $system_packages
;;
freebsd*:install)
[ -n "$system_packages" ] && print_shell_command "${SUDO}pkg install $system_packages"
[ -n "$system_packages" ] && print_shell_command ${SUDO}pkg install $system_packages
;;
nix*:install)
[ -n "$system_packages" ] && print_shell_command "nix-env --install $system_packages"
[ -n "$system_packages" ] && print_shell_command nix-env --install $system_packages
;;
alpine:update)
print_shell_command "apk update"
;;
alpine:install)
[ -n "$system_packages" ] && print_shell_command "apk add $system_packages"
[ -n "$system_packages" ] && print_shell_command apk add $system_packages
;;
pip:install)
[ -n "$system_packages" ] && print_shell_command "sage -pip install $system_packages"
[ -n "$system_packages" ] && print_shell_command sage -pip install $system_packages
;;
cpan:install)
[ -n "$system_packages" ] && print_shell_command "cpan -i $system_packages"
[ -n "$system_packages" ] && print_shell_command cpan -i $system_packages
;;
repology:install)
if [ -n "$system_packages" ]; then
Expand Down
12 changes: 7 additions & 5 deletions build/bin/sage-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ fi
PKG_BASE_VER=`echo $PKG_VER | sed 's/\.p[0-9][0-9]*$//'`
if [ -f "$PKG_SCRIPTS/checksums.ini" ]; then
# Normal/wheel package
PKG_NAME_UPSTREAM=`lookup_param tarball "$PKG_SCRIPTS/checksums.ini" | sed "s/VERSION/$PKG_BASE_VER/"`
PKG_NAME_UPSTREAM=`lookup_param tarball "$PKG_SCRIPTS/checksums.ini"`
fi

# Set the $SAGE_DESTDIR variable to be passed to the spkg-install
Expand Down Expand Up @@ -396,11 +396,11 @@ ensure_pkg_src() { ###############################################
if [ ! -f "$PKG_SRC" ]; then
if [ -n "$PKG_NAME_UPSTREAM" ]; then
# Normal or wheel package
if ! sage-download-file $SAGE_DOWNLOAD_FILE_OPTIONS "$PKG_NAME_UPSTREAM"; then
error_msg "Error downloading $PKG_NAME_UPSTREAM"
PKG_SRC=$(sage-package download $SAGE_DOWNLOAD_FILE_OPTIONS $PKG_BASE)
if [ $? != 0 ]; then
error_msg "Error downloading tarball of $PKG_BASE"
exit 1
fi
PKG_SRC="$SAGE_DISTFILES/$PKG_NAME_UPSTREAM"
# Do a final check that PKG_SRC is a file with an absolute path
cd /
if [ ! -f "$PKG_SRC" ]; then
Expand Down Expand Up @@ -509,7 +509,9 @@ else
# just copy to dist/ and create a simple install script.
mkdir -p dist
cp "$PKG_SRC" dist/
echo "sdh_store_and_pip_install_wheel ." > spkg-install.in
if [ ! -f spkg-install.in ]; then
echo "sdh_store_and_pip_install_wheel ." > spkg-install.in
fi
;;
*)
# Source tarball
Expand Down
Loading

0 comments on commit 121b7ff

Please sign in to comment.