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

Commit

Permalink
Merge branch 't/29500/install_all_python_packages_via_pip_wheel__crea…
Browse files Browse the repository at this point in the history
…te_pep_503_simple_repository_for_wheels' into t/30527/pep-503-simple-repository-for-wheels
  • Loading branch information
mkoeppe committed Sep 21, 2020
2 parents e66243f + f2e7075 commit 5a2491a
Show file tree
Hide file tree
Showing 213 changed files with 9,392 additions and 3,103 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
* text=auto eol=lf
# except for Windows batch files
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
*.diff_bin binary
59 changes: 59 additions & 0 deletions .github/workflows/ci-wsl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build & Test WSL

on: [push, pull_request]

jobs:
windows:
runs-on: windows-latest
name: Windows (using WSL)
# Following https://trac.sagemath.org/ticket/25206#comment:63
steps:
- name: Configure git
run: git config --global core.symlinks true
- uses: actions/checkout@v2
- name: Install Ubuntu 20.04 (in WSL)
run: |
(New-Object System.Net.WebClient).DownloadFile("https://aka.ms/wslubuntu2004", "Ubuntu.appx")
Expand-Archive Ubuntu.appx
Ubuntu\ubuntu2004.exe install --root
- name: Install dependencies
run: |
Function ExtractPackages
{
param($path)
@(Get-Content $path | Where-Object { !$_.StartsWith("#") })
}
$packages = Get-ChildItem build/pkgs -recurse -Include debian.txt, debian-bootstrap.txt | foreach-object { ExtractPackages $_.FullName } | sort -Unique
# Add tox which is use to build
$packages += 'tox'
echo "Install the following packages:" @packages
# Add deadsnakes so that libpython3.7-dev is found
& wsl sudo add-apt-repository ppa:deadsnakes/ppa
# Install
& wsl sudo apt-get update -y
& wsl sudo apt-get install -y @packages
- name: Build
run: wsl tox -e local -- SAGE_NUM_THREADS=4 build
env:
# WSL runs everything as root, so we have to enable build as root user
EXTRA_CONFIGURE_ARGS: "--enable-build-as-root"
# If make is invoked in parellel (i.e. with -jN where N > 1), then we sometimes run into errors for some reason
# So keep N small in order to minimize the risk
MAKE: "make -j2"
WSLENV: EXTRA_CONFIGURE_ARGS:MAKE
- name: Test
run: wsl tox -e local -- SAGE_NUM_THREADS=4 ptest
- name: Prepare logs artifact
run: mkdir -p "artifacts/logs"; cp -r .tox/*/log "artifacts/logs"
shell: bash
if: always()
- uses: actions/upload-artifact@v1
with:
path: artifacts
name: logs
if: always()
- name: Print out logs for immediate inspection
# and markup the output with GitHub Actions logging commands
run: .github/workflows/scan-logs.sh "artifacts/logs"
shell: bash
if: always()
2 changes: 1 addition & 1 deletion .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ jobs:
run: |
git config --global user.email "[email protected]"
git config --global user.name "Sage GitHub CI"
SAGE_ROOT=. SAGE_SRC=./src src/bin/sage-update-version $(git describe)
SAGE_ROOT=. SAGE_SRC=./src src/bin/sage-update-version $(git describe) || echo "(ignoring error)"
- name: make dist
run: |
./configure && make dist
Expand Down
3 changes: 2 additions & 1 deletion .homebrew-build-env
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ for l in readline ; do
CPATH="$HOMEBREW/opt/$l/include:$CPATH"
fi
done
for l in "gcc@9/lib/gcc/9"; do
for l in "gcc/lib/gcc/10 gcc/lib/gcc/9"; do
if [ -d "$HOMEBREW/opt/$l" ]; then
LIBRARY_PATH="$HOMEBREW/opt/$l:$LIBRARY_PATH"
break
fi
done
export LIBRARY_PATH
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.2.beta12, Release Date: 2020-09-06
SageMath version 9.2.beta13, Release Date: 2020-09-21
8 changes: 4 additions & 4 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ install_config_rpath() {
echo >&2 "your PATH. E.g. Homebrew installs them in /usr/local/opt/gettext/bin."
return 179
fi
eval `sed -n '/^prefix=.*$/p' $gettextize`
eval `sed -n '/^datarootdir=.*$/p' $gettextize`
eval `sed -n '/^: \${gettext_datadir=.*$/p' $gettextize`
eval `sed -n '/^prefix=.*$/p' "$gettextize"`
eval `sed -n '/^datarootdir=.*$/p' "$gettextize"`
eval `sed -n '/^: \${gettext_datadir=.*$/p' "$gettextize"`

if [ -z "$gettext_datadir" ]; then
eval `sed -n '/^gettext_dir=.*$/p' $gettextize`
eval `sed -n '/^gettext_dir=.*$/p' "$gettextize"`
# In older versions (before 2014) this is spelled gettext_dir
# See https://github.com/autotools-mirror/gettext/commit/ff18897068486560e2bb421004cfbd42b7cdd0f8
gettext_datadir="$gettext_dir"
Expand Down
2 changes: 1 addition & 1 deletion build/bin/sage-dist-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ sdh_store_and_pip_install_wheel() {
$sudo sage-pip-install $root "$wheel" || \
sdh_die "Error installing $wheel"
mkdir -p "${SAGE_DESTDIR}${SAGE_SPKG_WHEELS}" && \
mv "$wheel" "${SAGE_DESTDIR}${SAGE_SPKG_WHEELS}/" || \
$sudo mv "$wheel" "${SAGE_DESTDIR}${SAGE_SPKG_WHEELS}/" || \
sdh_die "Error storing $wheel"
}

Expand Down
5 changes: 1 addition & 4 deletions build/bin/sage-pip-install
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/usr/bin/env bash
# This command is specifically for pip-installing a previously
# built wheel.
#
# This ensures that any previous installations of the same package
# are uninstalled first.

# Default arguments for all packages installed with `pip install`
# --ignore-installed : Force pip to re-install package even if it thinks it's
Expand All @@ -18,7 +15,7 @@
pip_install_flags="--ignore-installed --verbose --no-deps --no-index --isolated"

# Note: We need to take care to specify the full path to Sage's Python here
# to emphasize that this command hould use it, and not the system Python;
# to emphasize that this command should use it, and not the system Python;
# see https://trac.sagemath.org/ticket/18438
# But now we delegate this to sage-python23.
PYTHON=sage-python23
Expand Down
2 changes: 1 addition & 1 deletion build/bin/sage-pip-uninstall
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [ "$1" != "." ]; then
fi

# Note: We need to take care to specify the full path to Sage's Python here
# to emphasize that this command hould use it, and not the system Python;
# to emphasize that this command should use it, and not the system Python;
# see https://trac.sagemath.org/ticket/18438
# But now we delegate this to sage-python23.
PYTHON=sage-python23
Expand Down
6 changes: 4 additions & 2 deletions build/bin/sage-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@

# Avoid surprises with character ranges [a-z] in regular expressions
# See Trac #15791; some locales can produce different results for
# character ranges (use C.UTF-8 to ensure UTF-8 default encoding in Python)
export LC_ALL=C.UTF-8
# character ranges; using C.UTF-8 to ensure UTF-8 default encoding in Python
# introduces extra complications, see #30053, so we don't do it, but
# assume we are on Python3.x, for x at least 7.
export LC_ALL=C

usage()
{
Expand Down
3 changes: 2 additions & 1 deletion build/pkgs/brial/distros/debian.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
libbrial-dev libbrial-groebner-dev
libbrial-dev
libbrial-groebner-dev
3 changes: 2 additions & 1 deletion build/pkgs/cddlib/distros/debian.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
libcdd-dev libcdd-tools
libcdd-dev
libcdd-tools
3 changes: 2 additions & 1 deletion build/pkgs/cliquer/distros/debian.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
cliquer libcliquer-dev
cliquer
libcliquer-dev
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=d0347cf03ace1769091098cfcb0e8e4e5417f031
md5=ff6158c08cb696e21b8621a657647a14
cksum=1298150702
sha1=e8cac32102815b6ff83bbb455c5d4cacc5b4ee8f
md5=caa431f870eb76bf36b0bfd47a01ba5d
cksum=2384868099
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5efa8df9cd13231bf53759c11b6910106992b7d4
85a3dc5389b6670934938f705a9366b4ba8573b8
3 changes: 2 additions & 1 deletion build/pkgs/curl/distros/debian.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
curl libcurl4-openssl-dev
curl
libcurl4-openssl-dev
6 changes: 5 additions & 1 deletion build/pkgs/debian-bootstrap.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# Packages needed for ./bootstrap
gettext autoconf automake libtool pkg-config
gettext
autoconf
automake
libtool
pkg-config
3 changes: 2 additions & 1 deletion build/pkgs/debian.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ make
m4
perl
# python3-minimal is not enough on debian buster, ubuntu bionic - it does not have urllib
python3 # system python for bootstrapping the build
# system python for bootstrapping the build
python3
tar
bc
gcc
Expand Down
42 changes: 42 additions & 0 deletions build/pkgs/ecl/patches/ecl-configure-include-stdlib-h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
--- a/src/configure 2020-04-24 03:54:52.000000000 -0700
+++ b/src/configure 2020-09-17 14:47:48.000000000 -0700
@@ -2046,6 +2046,7 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
+#include <stdlib.h>
int
main ()
{
@@ -2059,6 +2060,7 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
+#include <stdlib.h>
int
main ()
{
@@ -7421,6 +7423,7 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
+#include <stdlib.h>
int main() {
const char *int_type;
int bits;
@@ -7709,6 +7712,7 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
+#include <stdlib.h>
int main() {
const char *int_type;
int bits;
@@ -8004,6 +8008,7 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
+#include <stdlib.h>
int main() {
FILE *f = fopen("conftestval","w");
int c1, c2;
3 changes: 2 additions & 1 deletion build/pkgs/ecm/distros/debian.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
gmp-ecm libecm-dev
gmp-ecm
libecm-dev
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.p1
7.0.4.p2
Loading

0 comments on commit 5a2491a

Please sign in to comment.