正在获取pip-pystruct=0.3.2以在python=3.7下构建



由于对python<3.6并导致未找到与curexc_traceback相关的构建时错误。此外,utils.pyx文件没有与pip-tarball一起循环,导致无法重建github版本中出现的cython包,而不是pypi版本。我们如何从pip中修补和构建pystruct==0.3.2?

事实证明,如果你将github版本和pypi版本结合起来,你可以找到一种方法来构建pip版本,如下所示:

#!/usr/bin/env bash
VERSION=0.3.2
pip download pystruct==${VERSION}
git clone https://github.com/pystruct/pystruct
tar xzf pystruct-${VERSION}.tar.gz
mv pystruct-${VERSION}/src/utils.c pystruct-${VERSION}/src/utils.save
cp pystruct/src/utils.pyx pystruct-${VERSION}/src/
cython pystruct-${VERSION}/src/utils.pyx
cd pystruct-${VERSION} && python ./setup.py install

最新更新