Opened 5 months ago

Closed 4 months ago

#30177 closed defect (fixed)

build/bin/sage-system-python: Improve check for a suitable python

Reported by: mkoeppe Owned by:
Priority: minor Milestone: sage-9.2
Component: build: configure Keywords:
Cc: dimpase, embray, slelievre Merged in:
Authors: Matthias Koeppe Reviewers: Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: 4f5b1b7 (Commits) Commit: 4f5b1b78ee5af57616ecddfab9b923b5ec0d14dd
Dependencies: Stopgaps:

Description (last modified by mkoeppe)

(from #29929/#30154)

#29890 (build/bin/sage-system-python: Try "python" first) may cause failures on Cygwin if python is something strange coming through from the Windows installation as observed in https://github.com/mkoeppe/arb/runs/839201503:

+ sage-package create arb --version git --tarball arb-git.tar.gz --type=optional
C:\hostedtoolcache\windows\Python\3.7.7\x64\python.exe: can't open file '/cygdrive/d/a/arb/arb/build/bin/sage-package': [Errno 2] No such file or directory
##[error]Process completed with exit code 1.

So sage-system-python needs better checks for the suitability of python.

Also, a python 2 from an outdated or broken homebrew installation on mac needs to be rejected (https://groups.google.com/d/msg/sage-devel/DoiswEtlKs4/aCNNKBixCAAJ). Symptom: hashlib.sha1() not available - similar to https://stackoverflow.com/questions/22133167/python-error-attributeerror-module-object-has-no-attribute-sha1

Change History (13)

comment:1 Changed 5 months ago by mkoeppe

  • Description modified (diff)

comment:2 Changed 5 months ago by mkoeppe

  • Branch set to u/mkoeppe/build_bin_sage_system_python__improve_check_for_a_suitable_python

comment:3 Changed 5 months ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Commit set to 3e991c7ba4067e7467eb871ce45598dea32a6f5d
  • Status changed from new to needs_review

New commits:

3e991c7build/bin/sage-system-python: Improve check for a suitable python

comment:4 Changed 5 months ago by dimpase

  • Reviewers set to Dima Pasechnik
  • Status changed from needs_review to positive_review

lgtm

comment:5 Changed 5 months ago by mkoeppe

Thanks!

comment:6 Changed 4 months ago by git

  • Commit changed from 3e991c7ba4067e7467eb871ce45598dea32a6f5d to af2abe49b968b8098aa8b426b1da1dca009b9d14
  • Status changed from positive_review to needs_review

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

af2abe4build/bin/sage-system-python: Suppress error output while testing python binaries

comment:7 Changed 4 months ago by mkoeppe

This was working fine but was too noisy, as I just observed in https://github.com/mkoeppe/Sources/runs/907998067:

sage-package create singular --version git --tarball singular-git.tar.gz --type=optional
Traceback (most recent call last):
  File "<string>", line 1, in <module>
FileNotFoundError: [WinError 3] The system cannot find the path specified: '/cygdrive/d/a/Sources/Sources/upstream'

comment:8 Changed 4 months ago by dimpase

  • Status changed from needs_review to positive_review

ok

comment:9 Changed 4 months ago by mkoeppe

Thanks!

comment:10 Changed 4 months ago by vbraun

  • Status changed from positive_review to needs_work

Merge conflict

comment:11 Changed 4 months ago by git

  • Commit changed from af2abe49b968b8098aa8b426b1da1dca009b9d14 to 4f5b1b78ee5af57616ecddfab9b923b5ec0d14dd

Branch pushed to git repo; I updated commit sha1. New commits:

4f5b1b7Merge tag '9.2.beta7' into t/30177/build_bin_sage_system_python__improve_check_for_a_suitable_python

comment:12 Changed 4 months ago by mkoeppe

  • Status changed from needs_work to positive_review

comment:13 Changed 4 months ago by vbraun

  • Branch changed from u/mkoeppe/build_bin_sage_system_python__improve_check_for_a_suitable_python to 4f5b1b78ee5af57616ecddfab9b923b5ec0d14dd
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.