GithubHelp home page GithubHelp logo

Comments (1)

see01995 avatar see01995 commented on July 29, 2024

i modified .build.sh, and gen whl:

#!/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 boolector.

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.