-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use BinaryProvider to install Cairo and Pango #292
Conversation
So lets talk about how to get this in. I think one way would be to merge the Cairo changes but NOT making a release until Gtk.jl is ready. What do people think? |
And thank you so much for doing this! |
Ubuntu 19.04:
Will test Windows when I'm home ;) |
@SimonDanisch: How can I test this locally? |
@tknopp this is on my fork, I'm not sure if this can be done easily within Julia. What I would do is to add a remote with URL "https://github.com/giordano/Cairo.jl.git" and then check-out If anyone knows an easier way to do this (maybe all within Julia), please share 🙂 |
@giordano I set them up (I think :D ) ;) |
Codecov Report
@@ Coverage Diff @@
## master #292 +/- ##
==========================================
+ Coverage 92.12% 92.16% +0.03%
==========================================
Files 1 1
Lines 432 434 +2
==========================================
+ Hits 398 400 +2
Misses 34 34
Continue to review full report at Codecov.
|
be0e820
to
3280ce1
Compare
@tknopp I just did |
Also finally works in Nextjournal without any additional shenanigans: |
@SimonDanisch: that's exactly what I was looking for :-) |
Test woking here on OSX Mojave (10.14.6)! |
Installation and tests pass without a hiccup on Julia Version 1.2.1-pre.0
Commit 93929550b6* (2019-08-20 05:33 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
JULIAFUNCDIR = /home/tim/juliafunc
JULIA_CPU_THREADS = 2
The new package manager makes this a breeze. We should place upper bounds on the Cairo version for all previous Gtk releases. Then anyone who has Gtk installed in their current environment won't get the new version of Cairo until Gtk makes a new release that allows the new Cairo. For project environments that don't have Gtk installed, they will use the new version of Cairo and thus immediately get the benefits. In other words, even a single user might be using both depending upon which project environment is active. |
@timholy: yes thought about that as well. It requires of course to make releases of all direct and indirect dependencies of Cairo. So Winston has to be capped to the version where Gtk is capped ... |
but I am fine with that. |
Remember that compatibility of existing registered versions can be modified in the registry without needing to make any new releases! Just ask on #pkg-registration about how to do it although it’s pretty simple: just edit the registry files and make a PR. |
All tests succeeding on my system as well, Mojave 10.14.6 :) |
Awesome, works on a Mojave 10.14.4 and Windows 10 machines. It's also pretty fast to install compared to homebrew. |
Works on Mojave 10.14.5 as well. Thanks a ton, @giordano! |
All tests passing on NixOS with Julia 1.0.3, that is about as picky of a distribution as one can have, so well done!
|
Same here with Julia 1.3 and 1.4 🎉 I only had little hope that it worked (until I saw @ninjin message)... BinaryProvider is a game changer for Nixos user :) thanks so much for your effort here! |
yes absolutely, in those cases, I propose integrating all those functions into Cairo.jl, where they belong to. |
@tknopp @asinghvi17 This takes an interesting turn. Adding the cairo_ft would mean, that we make FreeType.jl (or FreeTypeAbstractions.jl) a mandatory dependency (or pray for faster implementation of optional dependencies) - as we need the type correctly. btw: who had the great idea to move from _jl_libxxx to .libxxx directly? |
I believe that's just a function of going to BinaryProvider? It's really easy to patch this on the CairoMakie end, so it's not an issue (I imagine that's why they were there in the first place). |
yes, I think those lib names should be standardized (by convention of BB). |
The name of the variable can be easily changed here: Line 9 in 3280ce1
|
I guess we could just alias it for backward compatibility...is it possible to throw a depwarn on use of a variable? |
I think it should be const _jl_libcairo = libcairo
@deprecate_binding _jl_libcairo # or however that was done^^ CairoMakie should just make a PR to Cairo, to incorporate the newly wrapped functions ;) |
Regarding library names, BB allows you to define your own mapping, but the semantic meaning behind a EDIT: Hit "submit" a little too quickly. For JLL packages, each LibraryProduct listed will be For BinaryProvider, this doesn't matter, because all libraries get duplicated for every installation, and they sit next to eachother in the same folder, so they can find eachother easily. |
This is no more WIP and can be merged whenever you want. Now I'm using the same binaries as those created by @staticfloat for #293. The last change I pushed can cause some local conflicts if you had checked out my original version of the PR. My recommendation is to just remove all |
This is excellent work @giordano! I of course cannot comment on all the BB and BP stuff but the result is that it again works on all platforms. I would merge this if there are no objections. |
Yep. @tknopp, do you need help putting retroactive bounds on the Cairo version for Gtk? I recently submitted some docs on the registry format: JuliaLang/Pkg.jl#1349. |
@timholy: It would be best if you do that. I personally would wait with the release but am fine that you do it, if you promise that things don't break ;-) |
I can't see how they would break, as long as people install what they want (e.g., ProfileView) rather than starting from the ground up (Cairo). And all they would get is a Pkg conflict, which once resolved would fix everything. |
yes, I know Tim. Just wanted to express that this should be done by someone with some more experience. |
Well that worked. Thanks for your efforts! |
This PR installs Cairo and Pango library using
BinaryProvider.jl
.I think it's good to keep this open for some time to let users play with it. So, please do test this PR and report back any issue you face. To do this, just run
in Julia REPL. I recommend then to clean the directory
Cairo/deps/
frombuild.log
anddeps.jl
, and then you can run]build Cairo
.Building these libraries has been a great stress-test for the new
BinaryBuilder.jl
framework that will land in Julia v1.3. A huge thanks to @staticfloat! 🐋 🎅 I'll probably update the URLs of somebuild.jl
files later this week (I'll use the "official" ones that will be in https://github.com/JuliaBinaryWrappers), but the content of the downloaded tarballs should be the more or less the same.When merged, this PR fixes #105, fixes #121, fixes #148, fixes #162, fixes #165, fixes #185, fixes #187, fixes #203, fixes #207, fixes #214, fixes #230, fixes #239, fixes #256, fixes #258, fixes #261, fixes #265, fixes #266, fixes #271, fixes #279, fixes #284, fixes #286, fixes #287. It supersedes #149, #196, #289.