Tom, Stephen,

Many thanks for the advice.

In the end, I gave up on a single homebrew-able install. I could not find a way 
to have homebrew manage an app I created in Racket. During the 
homebrew-controlled installation process, Racket’s package manager tries to 
download other Racket packages; and that fails because, as Tom noted, Racket’s 
package manger needs to write to somewhere that homebrew won’t let it.

Stephen, I think bottles are indeed the way to go — but homebrew will only make 
a bottle if you can in principle compile from source. I initially tried a 
version of your other suggestion: I made a distributable executable and then 
lied to homebrew and told it this was “source code”. But I felt bad about it!

My workaround is to tell my colleagues to use homebrew to install Racket; then 
use `raco pkg` to install the app; and to specify `(define 
racket-launcher-names …)` in the info.rkt file to make an executable. 

It’s a workaround because it requires an additional step beyond this: the 
default location for such executables is not typically in one’s PATH, so my 
users have to set the PATH. For most of them that’s fine, but for some it’s not 
great.

In general, I now have the sense that there are OS-specific package managers, 
and there are language-specific package managers, and they do not play nicely 
with each other.

Racket has such a great cross-platform story; it would be nice to have a good 
“distribute your own apps” story. 

(On the question of uptake of different languages, I wonder whether part of 
Excel’s appeal might be that it supports a model in which technically 
sophisticated “spreadsheet developers" can make spreadsheets for “spreadsheet 
users”, and then distribution is straightforward; and this is a space that most 
programming languages have not yet colonised.)

Many thanks again,

James





 



> On 23 Jul 2019, at 08:43, Tom Gillespie <tgb...@gmail.com> wrote:
> 
> I have periodically investigated installing racket packages via gentoo in a 
> dev-racket/package way that matches how python packages are installed (a far 
> saner experience than any of python's native packaging tools). I always hit 
> roadblocks because raco wants to hit an sqlite database that is outside the 
> build sandbox. I usually attempt to do this via raco, but perhaps there are 
> other ways, which might apply in this case as well. If your colleagues just 
> need the compiled program and do not need the underlying code, why not use 
> raco exe and distribute the standalone binary? Best,
> Tom
> 
> On Tue, Jul 23, 2019 at 12:17 AM Stephen De Gabrielle 
> <spdegabrie...@gmail.com> wrote:
> Hi James
> 
> Did you have any luck with using homebrew to package and distribute your 
> Racket program?
> 
> I thought Bottles might be the way to go but I’m not sure: 
> https://docs.brew.sh/Bottles
> 
> I have two ideas
> a) add installing racket from homebrew to a bash script that launches your 
> prog
> b) using the create executable function in DrRacket (or raco) to build a 
> stand-alone version that can be modified to distribute via homebrew
> 
> Kind regards
> 
> Stephen
> 
> PS I think this is a great idea that I’m sure others will use.
> 
> On Mon, 22 Jul 2019  at 14:05, James Geddes <james.ged...@gmail.com> wrote:
> Dear All,
> 
> For reasons (explained below, possibly foolish reasons) I am trying to do the 
> following:
> 
> 1. Have `raco pkg install` install a package X to a specific directory, 
> including, in the same directory, all of the dependencies of X, but excluding 
> those dependencies that are already present in the current installation's 
> collections; and
> 
> 2. Have `raco exe myprok.rkt` look in that custom directory for `(require X)`?
> 
> I tried the `--scope-dir` option to `raco pkg install` but that installed 
> what looks like the entire racket standard library (see below).  
> 
> Many thanks,
> 
> James
> 
> 
> 
> PS. What I'm /really/ trying to do is distribute a little command-line 
> programme that I wrote in Racket to my colleagues using the homebrew package 
> manager. My programme depends on the gregor library.
> 
> Most of my colleagues don't have Racket. Homebrew likes to compile from 
> source, so I will need to have homebrew download the dependencies I need for 
> compilation. But now, homebrew really doesn't like you to write outside a 
> very small set of directories during the installation process, and those 
> don't appear to include the standard Racket collections directories.
> 
> (I could well have misunderstood this. I don't understand at all how homebrew 
> interacts with language-specific package managers like raco, pip, cabal, and 
> so on. My sense is that the non-raco ones install dependencies in 
> project-specific directories and I suspect homebrew has specific support for 
> Python libraries.)
> 
> Anyway, my program depends on the gregor library, so I tried this:
> 
> $ raco pkg install --scope-dir tmp gregor-lib
> 
> $ ls tmp
> 
> 2d-lib                     pict-doc
> at-exp-lib                 pict-lib
> base                       pict-snip-lib
> cext-lib                   pkgs.rktd
> class-iop-lib              plai-lib
> cldr-bcp47                 planet-doc
> :
> [ ~100 rows omitted]
> :
> net-doc                    web-server-doc
> net-lib                    web-server-lib
> option-contract-lib        wxme-lib
> parser-tools-doc           xrepl
> parser-tools-lib           xrepl-doc
> pconvert-lib               xrepl-lib
> pict                       zo-lib
> 
> 
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/2C6D9102-2F63-4A0E-A033-C7FECC5F9CF8%40gmail.com.
> -- 
> ----
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/CAGHj7-%2BqQLRNVf3_EntEsyS8uYofgHo3DMz_%2B0WdFMuN7uk0cw%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/55A8A95D-7FE0-41ED-8BDB-0C441AE03F04%40gmail.com.

Reply via email to