Skip to content
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

Package a swi-prolog binary with the binary wheels #14

Open
rmanhaeve opened this issue Oct 30, 2024 · 8 comments
Open

Package a swi-prolog binary with the binary wheels #14

rmanhaeve opened this issue Oct 30, 2024 · 8 comments
Labels
help wanted Extra attention is needed

Comments

@rmanhaeve
Copy link

Hi

Thank you for your work on Janus and SWI-Prolog in general.

I was wondering if you had considered packaging a (minimal) binary of SWI-Prolog along with the binary distributions of this package. This would greatly simplify the installation procedure (especially for other projects that have janus_swi as a dependency), and I would imagine this could also boost the popularity of SWI-Prolog as an easy to install package along all platforms.

Kind regards,
Robin Manhaeve

@rmanhaeve rmanhaeve changed the title Package a binary with the binary wheels Package a swi-prolog binary with the binary wheels Oct 30, 2024
@JanWielemaker
Copy link
Member

Thanks for the heads up and suggestion. Considered? Sort of 😄 There are many possible installation targets though and it is hard to me to judge the value and costs of all the alternatives. I've spent some time turning SWI-Prolog into an (ana)conda package. It sort of works with some limitations and getting it all setup and distributed seems a lot of work.

Binary wheels also come with their issues on the various platforms. I have very limited understanding of the Python binary package management. If people want to set this up, I'm happy to help from the Prolog side.

I heard some rumours that the wheel could also download and install the regular binary? Do you have any insight in that?

@JanWielemaker JanWielemaker added the help wanted Extra attention is needed label Oct 31, 2024
@rmanhaeve
Copy link
Author

I'm not an expert myself, but I have a bit of experience in compiling external dependencies for binary wheels. We can make use of cibuildwheel and the Github-hosted runners to build the binary for basically all common platform.

Is there a way to build SWI Prolog with minimal dependencies?

@JanWielemaker
Copy link
Member

Is there a way to build SWI Prolog with minimal dependencies?

Configure using cmake -DSWIPL_PACKAGES=OFF -DUSE_GM=OFF ... Then the only dependency is zlib.

I'm still a bit in doubt on how good an idea this is as it results in a quite crippled SWI-Prolog version. Possibly a better choice is to select all packages that do not pull in new dependencies. That can be done using cmake -DSWIPL_PACKAGE_LIST="clib;plunit;sgml;semweb;chr;clpqr;nlp;yaml;swipy" -DUSE_GM=OFF ... With a bit of tweaking we can probably get in some more (might even have forgotton some).

If you can get this working (even without any packages), I'm happy to jump in and try to add some more functionality.

@rmanhaeve
Copy link
Author

I'll try to get a minimal case working in a fork, I'll update here when I've made some progress.

@rmanhaeve
Copy link
Author

Which files from the build directory need to be included?

@JanWielemaker
Copy link
Member

Which files from the build directory need to be included?

You need to run make install (or ninja install). Set -DCMAKE_INSTALL_PREFIX=dir to control the base location. I'd assume there are more examples around of creating wheels from cmake configured applications.

@JanWielemaker
Copy link
Member

This issue has been mentioned on SWI-Prolog. There might be relevant details there:

https://swi-prolog.discourse.group/t/installing-janus-swi-on-windows/8629/10

@JanWielemaker
Copy link
Member

Hi @rmanhaeve , Any progress on this? It may help automating the build for janus-swi. Possibly we can do a shared session? With some knowledge on both ends it is probably done quickly 😄 Please contact me on mail or using a private message on Discourse if you like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants