meilof / python-libsnark Goto Github PK
View Code? Open in Web Editor NEWPython bindings for a minimal subset of libsnark
License: MIT License
Python bindings for a minimal subset of libsnark
License: MIT License
I'm having trouble installing on Ubuntu 20.04.3 with pip install python-libsnark
.
Here's the full output. Any ideas what's happening?
Collecting python-libsnark
Using cached python-libsnark-0.3.3.tar.gz (61 kB)
Building wheels for collected packages: python-libsnark
Building wheel for python-libsnark (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/circleci/.pyenv/versions/3.7.11/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-o8uun16k/python-libsnark_1f40ce2c0e5b44d28aaf4b033636ea82/setup.py'"'"'; __file__='"'"'/tmp/pip-install-o8uun16k/python-libsnark_1f40ce2c0e5b44d28aaf4b033636ea82/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-7up1st2b
cwd: /tmp/pip-install-o8uun16k/python-libsnark_1f40ce2c0e5b44d28aaf4b033636ea82/
Complete output (22 lines):
* To update the wrapper, use swig -python -c++ -o alt_bn128_wrap.cpp libsnark.i
sh: 1: swig: not found
/home/circleci/.local/lib/python3.7/site-packages/setuptools/dist.py:700: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
% (opt, underscore_opt))
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/libsnark
copying ./__init__.py -> build/lib.linux-x86_64-3.7/libsnark
copying ./alt_bn128.py -> build/lib.linux-x86_64-3.7/libsnark
copying ./setup-win32.py -> build/lib.linux-x86_64-3.7/libsnark
running build_ext
building 'libsnark._alt_bn128' extension
creating build/temp.linux-x86_64-3.7
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/circleci/.pyenv/versions/3.7.11/include/python3.7m -c alt_bn128_wrap.cpp -o build/temp.linux-x86_64-3.7/alt_bn128_wrap.o -std=c++14 -Wno-sign-compare -Wno-delete-non-virtual-dtor -Wno-unused-variable -DCURVE_ALT_BN128 -DBN_SUPPORT_SNARK=1 -DMONTGOMERY_OUTPUT -DNO_PROCPS -I/usr/local/Cellar/[email protected]/1.1.1i/include
alt_bn128_wrap.cpp:2827:10: fatal error: libff/algebra/curves/alt_bn128/alt_bn128_pp.hpp: No such file or directory
2827 | #include <libff/algebra/curves/alt_bn128/alt_bn128_pp.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for python-libsnark
Running setup.py clean for python-libsnark
Failed to build python-libsnark
Installing collected packages: python-libsnark
Running setup.py install for python-libsnark ... error
ERROR: Command errored out with exit status 1:
command: /home/circleci/.pyenv/versions/3.7.11/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-o8uun16k/python-libsnark_1f40ce2c0e5b44d28aaf4b033636ea82/setup.py'"'"'; __file__='"'"'/tmp/pip-install-o8uun16k/python-libsnark_1f40ce2c0e5b44d28aaf4b033636ea82/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-i5ql3xbr/install-record.txt --single-version-externally-managed --compile --install-headers /home/circleci/.pyenv/versions/3.7.11/include/python3.7m/python-libsnark
cwd: /tmp/pip-install-o8uun16k/python-libsnark_1f40ce2c0e5b44d28aaf4b033636ea82/
Complete output (22 lines):
* To update the wrapper, use swig -python -c++ -o alt_bn128_wrap.cpp libsnark.i
sh: 1: swig: not found
/home/circleci/.local/lib/python3.7/site-packages/setuptools/dist.py:700: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
% (opt, underscore_opt))
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/libsnark
copying ./__init__.py -> build/lib.linux-x86_64-3.7/libsnark
copying ./alt_bn128.py -> build/lib.linux-x86_64-3.7/libsnark
copying ./setup-win32.py -> build/lib.linux-x86_64-3.7/libsnark
running build_ext
building 'libsnark._alt_bn128' extension
creating build/temp.linux-x86_64-3.7
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/circleci/.pyenv/versions/3.7.11/include/python3.7m -c alt_bn128_wrap.cpp -o build/temp.linux-x86_64-3.7/alt_bn128_wrap.o -std=c++14 -Wno-sign-compare -Wno-delete-non-virtual-dtor -Wno-unused-variable -DCURVE_ALT_BN128 -DBN_SUPPORT_SNARK=1 -DMONTGOMERY_OUTPUT -DNO_PROCPS -I/usr/local/Cellar/[email protected]/1.1.1i/include
alt_bn128_wrap.cpp:2827:10: fatal error: libff/algebra/curves/alt_bn128/alt_bn128_pp.hpp: No such file or directory
2827 | #include <libff/algebra/curves/alt_bn128/alt_bn128_pp.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/circleci/.pyenv/versions/3.7.11/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-o8uun16k/python-libsnark_1f40ce2c0e5b44d28aaf4b033636ea82/setup.py'"'"'; __file__='"'"'/tmp/pip-install-o8uun16k/python-libsnark_1f40ce2c0e5b44d28aaf4b033636ea82/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-i5ql3xbr/install-record.txt --single-version-externally-managed --compile --install-headers /home/circleci/.pyenv/versions/3.7.11/include/python3.7m/python-libsnark Check the logs for full command output.
Data generated on Windows:
The pyproject.toml
format, defined in PEP 518 and elaborated in here has become the dominant interface for packaging. PEP 517 build systems, such as poetry-core
and its build backend poetry.core.masonry.api
are unable to install python-libsnark
via the PyPi package as well as direct from source given that python-libsnark
does not currently support PEP 517 builds. So far, even direct pip installs into environments which were managed by Poetry are also failing.
Utilizing setuptools
to help with compatibility it appears that utilizing the existing setup.py
is still an option as long as a minimal pyproject.toml
is present and the project metadata is present. See Building Extension Modules on the setuptools documentation for a reference. Additional backwards compatibility with setup.py
and setup.cfg
methods while supporting PEP 517 systems can be seen in the pip repository.
It seems that this should help in maintaining backwards compatibility while supporting modern build systems. As such I would propose a minor version bump, pushing the version to 0.4.0
given that PEP 517 build is the added functionality, and a dividing line would be formed between PEP 517 and non-PEP 517 builds of python-libsnark
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.