Clyngor with clingo
This is a python package installing a clingo binary along the clyngor package, so the end-user will not have to care about the clingo installation.
The clingo binary is taken for Linux, OSX and Windows on the official release page
Installation
When someone (who doesn't understand "install clingo binary in your path") have to install clyngor, give them that line instead:
pip install clyngor-with-clingo
A clingo executable will appear in their bin. May need root access if the said someone is working at system level.
Maintenance
The package must be updated to use new clingo binaries.
Since clingo 5.4.0, potassco no longer publishes prebuilt per-OS binaries on
the clingo GitHub releases page
(source tarballs only). For clingo > 5.4.0, binaries are instead fetched
from conda-forge, which
still builds and publishes real Linux/macOS/Windows binaries for every
release, and made relocatable (no conda environment needed at runtime) by
fetch_clingo.py:
python fetch_clingo.py <clingo version> [conda-executable]
This must run once per OS (see .github/workflows/build-binaries.yml, which
does exactly that on GitHub-hosted Linux/macOS/Windows runners and
smoke-tests each binary natively, including a #script (python) block).
Notes on the fetched binaries:
-
Python scripting (
#script (python)) is supported, with the needed Python runtime bundled alongside the binary; Lua is not. -
sqlite3andtkinterare pruned from the bundled Python runtime (their native deps are huge and pointless inside an ASP solver). -
Releases publish one platform-tagged wheel per OS/arch (Linux x86_64, macOS arm64 + x86_64, Windows x86_64), no sdist -- each wheel stays under PyPI's size limit and users only download their own OS's binaries.
-
Script
retrieve-clingo.sh <clingo version>/put-clingo-version.sh <clingo version>are kept only for rebuilding older versions (<= 5.4.0), back when potassco still shipped prebuilt archives on GitHub releases.
Use zest.releaser to upload new versions ; be careful to match clingo version with package version.
How to perform this magic
The current solution: faking clingo as a python script
Link to the way of doing that. Thanks !
I end up reproducing the same entry point implementation, using pkg_resource, and it works: binaries are embedded in the package using the MANIFEST.in, and the package only real operation is to delegate command line arguments to the proper clingo binary.
This seems to work, but:
- user has not control over the installed binary (however that package is all about having the user to not have to cope with that, but still… Experienced users should never use it)
- the 3 binaries are sent to the user, and the choice is made at execution time.
The on-the-fly solution: hack upon setuptools to download binary at installation
Method used by pyasp.
Has a lot of drawbacks, such as binary downloading from the client side, and necessity to use --no-cache-dir pip flag to force pip to execute the hack.
The proper but non-working solution: embed a platform-specific binary into a python package
The python part of the package is simplistic (well, there could be no python in this package), be we still need a basic architecture.
platform-specific magic
Setuptools provides since PEP 508 the environment markers, theoretically usable in setup.cfg with setuptools:
[options.data_files]
bin/clingo =
bin/linux/clingo; platform_system=="Linux"
bin/macos/clingo; platform_system=="Darwin"
bin/win/clingo.exe; platform_system=="Windows"
But it does not works. A question has been asked about it, also on SO.
Probably it's because data_files does not support environment markers. Hence this solution has been abandoned.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clyngor_with_clingo-5.8.0.post1-py3-none-win_amd64.whl.
File metadata
- Download URL: clyngor_with_clingo-5.8.0.post1-py3-none-win_amd64.whl
- Upload date:
- Size: 88.0 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9918290b719480fe156d720666a6c94ab2a2d6e7021c2dda86b7f2696a059212
|
|
| MD5 |
10ec337ee66eb47dba94fc634b8b73a6
|
|
| BLAKE2b-256 |
5a5a5d127e3a37a76f2c145bc64d6be19b88f90e0a74836282c748c6fc18baad
|
Provenance
The following attestation bundles were made for clyngor_with_clingo-5.8.0.post1-py3-none-win_amd64.whl:
Publisher:
python-publish.yml on Aluriak/clyngor-with-clingo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clyngor_with_clingo-5.8.0.post1-py3-none-win_amd64.whl -
Subject digest:
9918290b719480fe156d720666a6c94ab2a2d6e7021c2dda86b7f2696a059212 - Sigstore transparency entry: 2300328334
- Sigstore integration time:
-
Permalink:
Aluriak/clyngor-with-clingo@7f359df8f355ff76977de56fa3c50e2e3c5468bd -
Branch / Tag:
refs/tags/v5.8.0.post1 - Owner: https://github.com/Aluriak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7f359df8f355ff76977de56fa3c50e2e3c5468bd -
Trigger Event:
push
-
Statement type:
File details
Details for the file clyngor_with_clingo-5.8.0.post1-py3-none-manylinux2014_x86_64.whl.
File metadata
- Download URL: clyngor_with_clingo-5.8.0.post1-py3-none-manylinux2014_x86_64.whl
- Upload date:
- Size: 43.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01d0de4d34bdf594df87027da6ad109140917d4baf5ec8f6fc11661920e07aaa
|
|
| MD5 |
304026f3a82c0acb65f550bd62f30220
|
|
| BLAKE2b-256 |
b4e47bf64594b41101784b6bf1d885eb8019e15146e2e81fd32390369275a053
|
Provenance
The following attestation bundles were made for clyngor_with_clingo-5.8.0.post1-py3-none-manylinux2014_x86_64.whl:
Publisher:
python-publish.yml on Aluriak/clyngor-with-clingo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clyngor_with_clingo-5.8.0.post1-py3-none-manylinux2014_x86_64.whl -
Subject digest:
01d0de4d34bdf594df87027da6ad109140917d4baf5ec8f6fc11661920e07aaa - Sigstore transparency entry: 2300328362
- Sigstore integration time:
-
Permalink:
Aluriak/clyngor-with-clingo@7f359df8f355ff76977de56fa3c50e2e3c5468bd -
Branch / Tag:
refs/tags/v5.8.0.post1 - Owner: https://github.com/Aluriak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7f359df8f355ff76977de56fa3c50e2e3c5468bd -
Trigger Event:
push
-
Statement type:
File details
Details for the file clyngor_with_clingo-5.8.0.post1-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: clyngor_with_clingo-5.8.0.post1-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 56.8 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd10374a95039ce215292099fa12e497d12b78f3b019b4dbae9dac9f69e45df5
|
|
| MD5 |
17883b4c3bcd4595dcd85fb59164fc67
|
|
| BLAKE2b-256 |
57d4620d7942832c8f82ef76c6cdf60453f9a21a5ed167f98331a4f7d9601cbc
|
Provenance
The following attestation bundles were made for clyngor_with_clingo-5.8.0.post1-py3-none-macosx_11_0_arm64.whl:
Publisher:
python-publish.yml on Aluriak/clyngor-with-clingo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clyngor_with_clingo-5.8.0.post1-py3-none-macosx_11_0_arm64.whl -
Subject digest:
cd10374a95039ce215292099fa12e497d12b78f3b019b4dbae9dac9f69e45df5 - Sigstore transparency entry: 2300328389
- Sigstore integration time:
-
Permalink:
Aluriak/clyngor-with-clingo@7f359df8f355ff76977de56fa3c50e2e3c5468bd -
Branch / Tag:
refs/tags/v5.8.0.post1 - Owner: https://github.com/Aluriak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7f359df8f355ff76977de56fa3c50e2e3c5468bd -
Trigger Event:
push
-
Statement type:
File details
Details for the file clyngor_with_clingo-5.8.0.post1-py3-none-macosx_10_13_x86_64.whl.
File metadata
- Download URL: clyngor_with_clingo-5.8.0.post1-py3-none-macosx_10_13_x86_64.whl
- Upload date:
- Size: 71.2 MB
- Tags: Python 3, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a67045952c624d8a1d33d5b578e95ac23bbae75823562ab016f23b83c40b70e0
|
|
| MD5 |
b7f478b5b486697354a60338161c2ff9
|
|
| BLAKE2b-256 |
b33d6823b55e2d8b215ef62beb1cb22b779697b2c0ef41f38c2cb4e741d3fe70
|
Provenance
The following attestation bundles were made for clyngor_with_clingo-5.8.0.post1-py3-none-macosx_10_13_x86_64.whl:
Publisher:
python-publish.yml on Aluriak/clyngor-with-clingo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clyngor_with_clingo-5.8.0.post1-py3-none-macosx_10_13_x86_64.whl -
Subject digest:
a67045952c624d8a1d33d5b578e95ac23bbae75823562ab016f23b83c40b70e0 - Sigstore transparency entry: 2300328419
- Sigstore integration time:
-
Permalink:
Aluriak/clyngor-with-clingo@7f359df8f355ff76977de56fa3c50e2e3c5468bd -
Branch / Tag:
refs/tags/v5.8.0.post1 - Owner: https://github.com/Aluriak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@7f359df8f355ff76977de56fa3c50e2e3c5468bd -
Trigger Event:
push
-
Statement type: