Boolector / boolector

A Satisfiability Modulo Theories (SMT) solver for the theories of fixed-size bit-vectors, arrays and uninterpreted functions.
http://boolector.github.io
Other
324 stars 63 forks source link

PyBoolector metadata version mismatch causing install failure #224

Open enathang opened 1 month ago

enathang commented 1 month ago

Hello!

I'm trying to setup a repo that required PyBoolector. However, installing it through pip fails with a version mismatch:

Collecting PyBoolector
  Downloading PyBoolector-3.2.3.20240305.1.tar.gz (21 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Discarding https://files.pythonhosted.org/packages/27/c3/897087f7bf6ddfadc7dde21c4c38c6b0f0569e0ddff581265e4679a60ed9/PyBoolector-3.2.3.20240305.1.tar.gz (from https://pypi.org/simple/pyboolector/): Requested PyBoolector from https://files.pythonhosted.org/packages/27/c3/897087f7bf6ddfadc7dde21c4c38c6b0f0569e0ddff581265e4679a60ed9/PyBoolector-3.2.3.20240305.1.tar.gz has inconsistent version: expected '3.2.3.20240305.1', but metadata has '3.2.3'
  Downloading PyBoolector-3.2.3.20240215.1.tar.gz (21 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done

and loops through earlier versions until it fails.

There are a few reasons this could be happening, per:

Mostly, it seems that the version does not remove the minor version before doing the version check. I've tried downloading the code and manually fixing the version, but then I run into issues trying to compile the code.

Do you know if this is an issue on my end or is the repo not configured to work with the more strict pip versioning checks?

What I tried:

Local info: Python 3.12.1 Pip 24.0

mballance commented 1 month ago

What platform are you using, @enathang? I tried out Python 3.12 (hopefully close enough?) and Pip 24.0 on Linux (Centos 8) and was able to install PyBoolector without issues.

enathang commented 1 month ago

Thanks for taking a look!

Interesting. I'm running Asahi Linux (Fedora remix) on a Apple M1 Pro. Very much could be a local issue since I'm apparently the first one to run into this on this repo. However, what's confusing is that it's through pip and not something more obviously OS-centric.

I'll try nuking my python setup and starting from scratch (currently using pyenv, but might try Conda) and see if that helps anything. This is the only repo I'm running into this issue from though. Let me know if you find anything on your end!

mballance commented 1 month ago

Ah... That's a twist I wasn't expecting -- Linux on M1. It looks like pip is trying to install the source package, which assumes that you've already independently installed Boolector from source. Does it appear that pip is attempting to install the source package?

enathang commented 1 month ago

Not 100% sure what you're asking, but I think so. Pip seems to be downloading .tar.gz artefacts from a server, and then rejecting them locally due to version mismatch. I'll attach two text files, which are the stdout and stderr of the following commands:

pip install PyBoolector -v --no-cache-dir > pyboolector_error.txt 2>&1 pip install PyBoolector -v --no-cache-dir --use-pep517 > pyboolector_error.txt 2>&1

pyboolector_error.txt pyboolector_error_pep517.txt

I'm running with the --no-cache-dir flag just to prevent weird caching issues. I've also flushed the pip cache, with no change in result. It could be a local aberrant package is building the metadata version in a weird way, but I'm not familiar with the build system so nothing looks obviously wrong.