[aur-general] IJulia and Julia library/module packages
Hello everyone. Julia [1], a scientific/numerical computing-focussed programming language, recently went 1.0. It primarily focuses on user-local module installation (into $HOME/.julia), similar to conda, rustup, zef, etc. This is obviously fine for individuals but not great for deployment on a larger scale. Currently, no distributions that I'm aware of (i.e. Debian, Fedora, Gentoo, Arch) package modules for system-wide installation. I spent a few hours this afternoon putting together a package chain for IJulia [2] (which adds a Julia back-end/kernel to Jupyter). As there's no precedent or approach (I'm aware of) for system-wide Julia module installation I'm looking for some testing and feedback to ensure this approach will operate in an equivalent way to the standard Pkg.add("IJulia"). From the limited testing I've done IJulia _appears_ to work OK but I've not tried anything particularly fancy. I'm also interested in any general PKGBUILD feedback, including any depends which should be makedepends or checkdepends. If you find an easy way to tell what should be what then I'm all ears! Of particular note is the very hacky way of creating files which would otherwise be generated by Pkg.build()... there _must_ be a cleaner way of doing that. Best, Jonathon [1] https://julialang.org/ [2] https://aur.archlinux.org/packages/julia-ijulia
On 9/2/18 1:13 PM, Jonathon Fernyhough wrote:
I'm also interested in any general PKGBUILD feedback, including any depends which should be makedepends or checkdepends. If you find an easy way to tell what should be what then I'm all ears!
The things which immediately jumped out at me were: - declaring a "custom" license when it is in fact MIT - not quoting srcdir/pkgdir
Of particular note is the very hacky way of creating files which would otherwise be generated by Pkg.build()... there _must_ be a cleaner way of doing that.
Try to see if Pkg.build() can run in a "$srcdir" environment to "build" the project in build(), complete with necessary runtime-generated files. Then cp this over instead. Anyway, you probably want to provide the files in source=() rather than inlined through messy, difficult-to-read-and-review heredocs. It would separate the data you're trying to install, from the process you use to install it... -- Eli Schwartz Bug Wrangler and Trusted User
Thanks Eli. :) On 02/09/2018 17:42, Eli Schwartz via aur-general wrote:
- declaring a "custom" license when it is in fact MIT
Hmm... while the GitHub page (https://github.com/JuliaLang/IJulia.jl/blob/master/LICENSE.md) says MIT in the top banner, the file itself doesn't mention MIT... but looking more closely at the text itself, it's the MIT license.
- not quoting srcdir/pkgdir
Ah, yes.
Of particular note is the very hacky way of creating files which would otherwise be generated by Pkg.build()... there _must_ be a cleaner way of doing that.
Try to see if Pkg.build() can run in a "$srcdir" environment to "build" the project in build(), complete with necessary runtime-generated files. Then cp this over instead.
That was... interesting. It's possible to run the modules' "build.jl" script but it has to be tweaked/patched to prevent installing files under $HOME. I couldn't see an easy way of setting e.g. $PREFIX which may mean Julia does things in its own way - or most modules aren't designed for installing system-wide.
Anyway, you probably want to provide the files in source=() rather than inlined through messy, difficult-to-read-and-review heredocs. It would separate the data you're trying to install, from the process you use to install it...
Now I've mostly worked out how to wrangle "build.jl" to work with a "custom" location/prefix I'll have to go back through the other julia-* dependent packages and get those in line. J
On 9/2/18 4:33 PM, Jonathon Fernyhough wrote:
Thanks Eli. :)
On 02/09/2018 17:42, Eli Schwartz via aur-general wrote:
- declaring a "custom" license when it is in fact MIT
Hmm... while the GitHub page (https://github.com/JuliaLang/IJulia.jl/blob/master/LICENSE.md) says MIT in the top banner, the file itself doesn't mention MIT... but looking more closely at the text itself, it's the MIT license.
- not quoting srcdir/pkgdir
Ah, yes.
Of particular note is the very hacky way of creating files which would otherwise be generated by Pkg.build()... there _must_ be a cleaner way of doing that.
Try to see if Pkg.build() can run in a "$srcdir" environment to "build" the project in build(), complete with necessary runtime-generated files. Then cp this over instead.
That was... interesting. It's possible to run the modules' "build.jl" script but it has to be tweaked/patched to prevent installing files under $HOME. I couldn't see an easy way of setting e.g. $PREFIX which may mean Julia does things in its own way - or most modules aren't designed for installing system-wide.
Anyway, you probably want to provide the files in source=() rather than inlined through messy, difficult-to-read-and-review heredocs. It would separate the data you're trying to install, from the process you use to install it...
You can lie and use: HOME="$srcdir/temp" julia ... Generally, software will believe you when you export the $HOME variable yourself. :) -- Eli Schwartz Bug Wrangler and Trusted User
On 02-09-18 18:13:31 +0100, Jonathon Fernyhough wrote:
As there's no precedent or approach (I'm aware of) for system-wide Julia module installation I'm looking for some testing and feedback to ensure this approach will operate in an equivalent way to the standard Pkg.add("IJulia"). From the limited testing I've done IJulia _appears_ to work OK but I've not tried anything particularly fancy. I found out that one of the contributor uses Arch and he has a bunch of PKGBUILDs on https://github.com/yuyichao/arch-pkg/tree/master/pkg/all
Like Eli said https://github.com/yuyichao/arch-pkg/blob/master/pkg/all/ijulia-git/PKGBUILD redefines $HOME running build.jl. The author also seems to be part of archlinuxcn so maybe they are reading these emails :) -- Regards Jagan PUBKEY: https://j605.tk/pgp
participants (3)
-
Eli Schwartz
-
Jagannathan Tiruvallur Eachambadi
-
Jonathon Fernyhough