Giter VIP home page Giter VIP logo

Comments (4)

mballance avatar mballance commented on June 20, 2024

Hmm... Unfortunately, it looks like there are two overlapping issues here. Have you been able to install PyBoolector for PyPy previously?
The first error I see involves a version mismatch. You might be able to work around this issue passing --use-deprecated=legacy-resolver, as suggested by this issue: (pypa/pip#9203).
PyBoolector doesn't provide a pre-built wheel for PyPy, so it will attempt to build the wheel from source. This assumes that you have installed Boolector locally by hand.

I'll look into both issues. However, it would be useful to know whether this is a regression (ie you used to be able to install in PyPy) vs this being an error you get when trying PyPy with PyVSC/PyBoolector for the first time.

Thanks,
Matthew

from pyvsc.

see01995 avatar see01995 commented on June 20, 2024

I try to install PyBoolector, it report the same error.
I will try your suggest, thanks.

$ pypy -mpip install PyBoolector
Collecting PyBoolector
Using cached PyBoolector-3.2.3.20230913.1.tar.gz (21 kB)
Preparing metadata (setup.py) ... done
Discarding https://files.pythonhosted.org/packages/c6/11/31a75fe4560de79c12f45ac7cafb5858b25699f24ce0ee03e89c22e1c1fd/PyBoolector-3.2.3.20230913.1.tar.gz (from https://pypi.org/simple/pyboolector/): Requested PyBoolector from https://files.pythonhosted.org/packages/c6/11/31a75fe4560de79c12f45ac7cafb5858b25699f24ce0ee03e89c22e1c1fd/PyBoolector-3.2.3.20230913.1.tar.gz has inconsistent version: expected '3.2.3.20230913.1', but metadata has '3.2.3'
Using cached PyBoolector-3.2.3.20230911.5.tar.gz (21 kB)
Preparing metadata (setup.py) ... done
Discarding https://files.pythonhosted.org/packages/b4/6c/774fd4130d45cec37468b8222f08afc9260f3abafd47f3fa47b3cf2de34f/PyBoolector-3.2.3.20230911.5.tar.gz (from https://pypi.org/simple/pyboolector/): Requested PyBoolector from https://files.pythonhosted.org/packages/b4/6c/774fd4130d45cec37468b8222f08afc9260f3abafd47f3fa47b3cf2de34f/PyBoolector-3.2.3.20230911.5.tar.gz has inconsistent version: expected '3.2.3.20230911.5', but metadata has '3.2.3'
Using cached PyBoolector-3.2.2.20230911.3.tar.gz (21 kB)
Preparing metadata (setup.py) ... done
Discarding https://files.pythonhosted.org/packages/94/01/6a7c8b476eefdabdeeaac30bf9227c55d6ccb0638b2573a3fe3ebff1bc4f/PyBoolector-3.2.2.20230911.3.tar.gz (from https://pypi.org/simple/pyboolector/): Requested PyBoolector from https://files.pythonhosted.org/packages/94/01/6a7c8b476eefdabdeeaac30bf9227c55d6ccb0638b2573a3fe3ebff1bc4f/PyBoolector-3.2.2.20230911.3.tar.gz has inconsistent version: expected '3.2.2.20230911.3', but metadata has '3.2.2'
Using cached PyBoolector-3.2.2.20230110.4.tar.gz (21 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-j6d85ori/pyboolector_8cda86cecce041eab14e7f8c9284479b/setup.py", line 14, in
with open(cmakelists_txt, "r") as f:
^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-j6d85ori/CMakeLists.txt'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

from pyvsc.

see01995 avatar see01995 commented on June 20, 2024

i modified build.sh of PyBoolector, and gen whl.
i suggested run the following script step by step to avoid network issue.

#!/usr/bin/env bash
set -e -o pipefail

mkdir -p ./build
cd ./build

echo "Hello from PyPi build.sh"

BUILD_DIR=`pwd`
N_CORES=`nproc`

#test -n "$PYTHON_VERSIONS" || { echo PYTHON_VERSIONS must be set.; exit 1; }

echo "copy start"

cp -r ../boolector .

echo "copy end"

# Setup dependencies
cd boolector
#/bin/sh ./contrib/setup-btor2tools.sh
#/bin/sh ./contrib/setup-cadical.sh
#/bin/sh ./contrib/setup-lingeling.sh
./contrib/setup-btor2tools.sh
./contrib/setup-cadical.sh
./contrib/setup-lingeling.sh

#********************************************************************
#* boolector
#********************************************************************
cd ${BUILD_DIR}

cd boolector

#./configure.sh --python --shared --prefix output
./configure.sh --python --shared --prefix /usr/local
cd build

echo "make"

make -j${N_CORES}

make install

#********************************************************************
#* pyboolector
#********************************************************************

cd ${BUILD_DIR}
rm -rf pyboolector

export CC=gcc
export CXX=g++

# Specify path to CmakeLists.txt so setup.py can extract the version
export CMAKELISTS_TXT=${BUILD_DIR}/boolector/CMakeLists.txt

cp -r ${BUILD_DIR}/boolector/pypi pyboolector

# Prepare the artifact directory.
rm -rf ${BUILD_DIR}/boolector/result
mkdir -p ${BUILD_DIR}/boolector/result

# Grab the main license file
cp ${BUILD_DIR}/boolector/COPYING pyboolector/LICENSE

cd pyboolector

#for py in $PYTHON_VERSIONS; do
#  python=$(ls /opt/python/${py}-*/bin/python)
#  echo "Python: ${python}"
#  ${python} -m pip install cython wheel
#  cd ${BUILD_DIR}/pyboolector
#  rm -rf src
#  cp -r ${BUILD_DIR}/boolector/src/api/python src
#  sed -i -e 's/override//g' \
#     -e 's/noexcept/_GLIBCXX_USE_NOEXCEPT/g' \
#     -e 's/\(BoolectorException (const.*\)/\1\n    virtual ~BoolectorException() _GLIBCXX_USE_NOEXCEPT {}/' \
#       src/pyboolector_abort.cpp
#  mkdir -p src/utils
#  cp ${BUILD_DIR}/boolector/src/*.h src
#  cp ${BUILD_DIR}/boolector/src/utils/*.h src/utils
#  $python ./src/mkenums.py ./src/btortypes.h ./src/pyboolector_enums.pxd
#  $python setup.py sdist bdist_wheel
#done

echo "python"

  python=/usr/bin/pypy
  echo "Python: ${python}"
  ${python} -m pip install cython wheel
  cd ${BUILD_DIR}/pyboolector
  rm -rf src
  cp -r ${BUILD_DIR}/boolector/src/api/python src
  sed -i -e 's/override//g' \
     -e 's/noexcept/_GLIBCXX_USE_NOEXCEPT/g' \
     -e 's/\(BoolectorException (const.*\)/\1\n    virtual ~BoolectorException() _GLIBCXX_USE_NOEXCEPT {}/' \
       src/pyboolector_abort.cpp
  mkdir -p src/utils
  cp ${BUILD_DIR}/boolector/src/*.h src
  cp ${BUILD_DIR}/boolector/src/utils/*.h src/utils
  $python ./src/mkenums.py ./src/btortypes.h ./src/pyboolector_enums.pxd
  $python setup.py sdist bdist_wheel

# Copy the source distribution into the artifact directory.
cp dist/*.tar.gz ${BUILD_DIR}/boolector/result

# Repair wheels and place them into the artifact directory.
for whl in dist/*.whl; do
  auditwheel repair --plat manylinux_2_24_x86_64 --wheel-dir ${BUILD_DIR}/boolector/result/dist $whl
done

from pyvsc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.