Opened 2 years ago
Closed 2 years ago
#29558 closed enhancement (fixed)
Autogenerated parts of installation guide
Reported by: | jhpalmieri | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | sage-9.1 |
Component: | documentation | Keywords: | |
Cc: | mkoeppe, dimpase, embray | Merged in: | |
Authors: | John Palmieri, Matthias Koeppe | Reviewers: | Matthias Koeppe, John Palmieri |
Report Upstream: | N/A | Work issues: | |
Branch: | 8f064f4 (Commits, GitHub, GitLab) | Commit: | 8f064f475195ae3561a26c41c0cdd13a10cfc06d |
Dependencies: | Stopgaps: |
Description
- Add a homebrew section, which requires producing good autogenerated homebrew files
- Clean up the cygwin autogenerated files
Change History (23)
comment:1 follow-up: ↓ 13 Changed 2 years ago by
comment:2 Changed 2 years ago by
- Branch set to u/jhpalmieri/homebrew
comment:3 Changed 2 years ago by
- Commit set to 155965f08f45f714ae3aa193642f46c3b3ff5eb3
comment:4 Changed 2 years ago by
build/bin/sage-print-system-package-command
could certainly be made more flexible in what it prints in order to support prettier output.
comment:5 Changed 2 years ago by
I'm not a whiz at shell scripts. My current attempt works, but maybe there are better ways:
-
build/bin/sage-print-system-package-command
diff --git a/build/bin/sage-print-system-package-command b/build/bin/sage-print-system-package-command index 7802d447df..38b7966bcd 100755
a b if [ -n "$system_packages" ]; then 26 26 ;; 27 27 homebrew*:install) 28 28 echo "brew install $system_packages" 29 echo "# Afterwards: " 29 if [ -z "$SAGE_STRIP_COMMENTS" ]; then 30 echo "# Afterwards: " 31 fi 30 32 ;; 31 33 slackware*:install) 32 34 echo "sudo slackpkg install $system_packages" 33 35 ;; 34 36 cygwin*:install) 35 echo "# first install apt-cyg from https://github.com/transcode-open/apt-cyg" 37 if [ -z "$SAGE_STRIP_COMMENTS" ]; then 38 echo "# first install apt-cyg from https://github.com/transcode-open/apt-cyg" 39 fi 36 40 echo "apt-cyg install $system_packages" 37 41 ;; 38 42 *) 39 echo "# $command the following packages: $system_packages" 43 if [ -z "$SAGE_STRIP_COMMENTS" ]; then 44 echo "# $command the following packages: $system_packages" 45 fi 40 46 ;; 41 47 esac 42 48 fi 43 49 # Messages that should go out even if not packages need to be installed 44 50 case $system:$command in 45 51 homebrew*:install) 46 echo "# To automatically take care of homebrew messages regarding " 47 echo "# keg-only packages for the current shell session:" 48 [ -n "$SAGE_ROOT" ] || SAGE_ROOT=. 49 echo "# $ source $SAGE_ROOT/.homebrew-build-env" 50 echo "# Add this to your shell profile if you want it to persist between shell sessions." 52 if [ -z "$SAGE_STRIP_COMMENTS" ]; then 53 echo "# To automatically take care of homebrew messages regarding " 54 echo "# keg-only packages for the current shell session:" 55 [ -n "$SAGE_ROOT" ] || SAGE_ROOT=. 56 echo "# $ source $SAGE_ROOT/.homebrew-build-env" 57 echo "# Add this to your shell profile if you want it to persist between shell sessions." 58 fi 51 59 ;; 52 60 esac -
src/doc/bootstrap
diff --git a/src/doc/bootstrap b/src/doc/bootstrap index 3ac1f5b767..283798635b 100755
a b for SYSTEM in arch debian fedora cygwin homebrew; do 46 46 fi 47 47 done 48 48 echo >&2 $0:$LINENO: installing "$OUTPUT_DIR"/$SYSTEM.txt and "$OUTPUT_DIR"/$SYSTEM-optional.txt 49 echo "$PROMPT$( sage-print-system-package-command $SYSTEM install $(echo $(echo $SYSTEM_PACKAGES | xargs -n 1 echo | sort)))" > "$OUTPUT_DIR"/$SYSTEM.txt50 echo "$PROMPT$( sage-print-system-package-command $SYSTEM install $(echo $(echo $OPTIONAL_SYSTEM_PACKAGES | xargs -n 1 echo | sort)))" > "$OUTPUT_DIR"/$SYSTEM-optional.txt49 echo "$PROMPT$(SAGE_STRIP_COMMENTS=yes sage-print-system-package-command $SYSTEM install $(echo $(echo $SYSTEM_PACKAGES | xargs -n 1 echo | sort)))" > "$OUTPUT_DIR"/$SYSTEM.txt 50 echo "$PROMPT$(SAGE_STRIP_COMMENTS=yes sage-print-system-package-command $SYSTEM install $(echo $(echo $OPTIONAL_SYSTEM_PACKAGES | xargs -n 1 echo | sort)))" > "$OUTPUT_DIR"/$SYSTEM-optional.txt 51 51 done
comment:6 Changed 2 years ago by
- Commit changed from 155965f08f45f714ae3aa193642f46c3b3ff5eb3 to 66c07d82db0246bec89dac3af61a3b22371e2736
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
66c07d8 | trac 29558: first draft
|
comment:7 Changed 2 years ago by
(No changes to sage-print-system-package-command
in the branch yet, just minor changes.)
comment:8 Changed 2 years ago by
For sage-print-system-package-command
, maybe better to split install
into prepare
and install
and setup-env
or something like this, instead of using an environment variable
comment:9 Changed 2 years ago by
I'll give it a shot
comment:10 Changed 2 years ago by
- Branch changed from u/jhpalmieri/homebrew to u/mkoeppe/homebrew
comment:11 Changed 2 years ago by
- Commit changed from 66c07d82db0246bec89dac3af61a3b22371e2736 to 272f01bcafb3645399e22e4b8a631b31240f8c76
comment:12 Changed 2 years ago by
- Cc embray added
comment:13 in reply to: ↑ 1 ; follow-up: ↓ 14 Changed 2 years ago by
Replying to jhpalmieri:
Is the URL
https://github.com/transcode-open/apt-cyg
stable enough that it should just be included in the text? Then we would really want this to just say$ apt-cyg install R ...
.
I don't really know. @embray added this part.
comment:14 in reply to: ↑ 13 Changed 2 years ago by
Replying to mkoeppe:
Replying to jhpalmieri:
Is the URL
https://github.com/transcode-open/apt-cyg
stable enough that it should just be included in the text? Then we would really want this to just say$ apt-cyg install R ...
.I don't really know. @embray added this part.
I realized this actually doesn't matter: the document already includes instructions for installing apt-cyg
.
comment:15 Changed 2 years ago by
- Priority changed from major to blocker
comment:16 follow-up: ↓ 21 Changed 2 years ago by
- Priority changed from blocker to major
Did the addition of the line
OPTIONAL_SYSTEM_PACKAGES=
cut down on the repetitions in the commands? I'm not seeing nearly as much as I did before, and I can't figure out why.
comment:17 Changed 2 years ago by
- Priority changed from major to blocker
comment:18 Changed 2 years ago by
- Branch changed from u/mkoeppe/homebrew to u/jhpalmieri/homebrew
comment:19 Changed 2 years ago by
- Commit changed from 272f01bcafb3645399e22e4b8a631b31240f8c76 to 8f064f475195ae3561a26c41c0cdd13a10cfc06d
I'm happy with this. How about you?
New commits:
8f064f4 | trac 29558: correct some markup, change the date at end of file
|
comment:20 Changed 2 years ago by
- Reviewers set to Matthias Koeppe, John Palmieri
- Status changed from new to needs_review
comment:21 in reply to: ↑ 16 Changed 2 years ago by
Replying to jhpalmieri:
Did the addition of the line
OPTIONAL_SYSTEM_PACKAGES=cut down on the repetitions in the commands? I'm not seeing nearly as much as I did before, and I can't figure out why.
Yes, that's right. I actually had thought that was fixed before.
comment:22 Changed 2 years ago by
- Status changed from needs_review to positive_review
Looks good to me.
comment:23 Changed 2 years ago by
- Branch changed from u/jhpalmieri/homebrew to 8f064f475195ae3561a26c41c0cdd13a10cfc06d
- Resolution set to fixed
- Status changed from positive_review to closed
Regarding a homebrew section: I am having problems with figuring out how to autogenerate the files
homebrew.txt
andhomebrew-optional.txt
. If I just addhomebrew
to the list ofSYSTEM
s insrc/doc/bootstrap
, I end up with this forhomebrew.txt
:I really just want the first line, and then I can add the rest by hand. Along the same lines, the files for
cygwin
are a little broken.cygwin.txt
looks likeand the resulting output in the installation guide doesn't look perfect.
Is the URL
https://github.com/transcode-open/apt-cyg
stable enough that it should just be included in the text? Then we would really want this to just say$ apt-cyg install R ...
.