FreeBSD Bugzilla – Attachment 225710 Details for
Bug 256427
[NEW PORT] finance/py-chiapos: Chia proof of space plotting, proving, and verifying (wraps C++)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Final staged git diff of python bindings only.
fpc.diff (text/plain), 6.33 KB, created by
risner
on 2021-06-10 16:34:16 UTC
(
hide
)
Description:
Final staged git diff of python bindings only.
Filename:
MIME Type:
Creator:
risner
Created:
2021-06-10 16:34:16 UTC
Size:
6.33 KB
patch
obsolete
>diff --git a/finance/py-chiapos/Makefile b/finance/py-chiapos/Makefile >new file mode 100644 >index 0000000..186228d >--- /dev/null >+++ b/finance/py-chiapos/Makefile >@@ -0,0 +1,39 @@ >+# $FreeBSD$ >+ >+PORTNAME= chiapos >+DISTVERSION= 1.0.3 >+CATEGORIES= finance python >+MASTER_SITES= CHEESESHOP >+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} >+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} >+ >+MAINTAINER= risner@stdio.com >+COMMENT= Chia proof of space plotting, proving, and verifying (wraps C++) >+ >+LICENSE= APACHE20 >+LICENSE_FILE= ${WRKSRC}/LICENSE >+ >+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=3.5.0:devel/py-setuptools_scm@${PY_FLAVOR} \ >+ cmake:devel/cmake \ >+ pybind11>0:devel/pybind11 >+ >+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}flake8>0:devel/py-flake8@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}mypy>0:devel/py-mypy@${PY_FLAVOR} >+ >+USES= python:3.7+ >+USE_GITHUB= nodefault >+GH_TUPLE= jarro2783:cxxopts:302302b30839505703d37fb82f536c53cf9172fa:c/src-ext/cxxopts \ >+ gulrak:filesystem:4e21ab305794f5309a1454b4ae82ab9a0f5e0d25:g/src-ext/gulrak >+USE_PYTHON= autoplist concurrent distutils >+ >+PYDISTUTILS_INSTALLARGS+= --skip-build >+ >+post-extract: >+# Remove extraneous unused files to prevent confusion >+ @${RM} ${WRKSRC}/lib/FiniteStateEntropy/fetch-content-CMakeLists.txt >+ @${RM} ${WRKSRC}/pyproject.toml >+ >+do-test: stage >+ @(cd ${WRKSRC}; py.test ./tests -s -v) >+ >+.include <bsd.port.mk> >diff --git a/finance/py-chiapos/files/patch-CMakeLists.txt b/finance/py-chiapos/files/patch-CMakeLists.txt >new file mode 100644 >index 0000000..1a818c0 >--- /dev/null >+++ b/finance/py-chiapos/files/patch-CMakeLists.txt >@@ -0,0 +1,94 @@ >+--- CMakeLists.txt.orig 2021-05-28 02:40:44 UTC >++++ CMakeLists.txt >+@@ -14,29 +14,8 @@ endif() >+ project(chiapos C CXX ASM) >+ >+ # CMake 3.14+ >+-include(FetchContent) >++include(${CMAKE_INSTALL_PREFIX}/share/cmake/pybind11/pybind11Config.cmake) >+ >+-FetchContent_Declare( >+- pybind11-src >+- GIT_REPOSITORY https://github.com/pybind/pybind11.git >+- GIT_TAG v2.6.2 >+-) >+-FetchContent_MakeAvailable(pybind11-src) >+- >+-FetchContent_Declare( >+- cxxopts >+- GIT_REPOSITORY https://github.com/jarro2783/cxxopts.git >+- GIT_TAG v2.2.1 >+-) >+-FetchContent_MakeAvailable(cxxopts) >+- >+-FetchContent_Declare( >+- gulrak >+- GIT_REPOSITORY https://github.com/gulrak/filesystem.git >+- GIT_TAG v1.5.6 >+-) >+-FetchContent_MakeAvailable(gulrak) >+- >+ set(FSE_LIB ${CMAKE_CURRENT_SOURCE_DIR}/lib/FiniteStateEntropy/lib) >+ set(FSE_FILES >+ ${FSE_LIB}/fse_compress.c >+@@ -48,8 +27,8 @@ set(FSE_FILES >+ include_directories( >+ ${INCLUDE_DIRECTORIES} >+ ${CMAKE_CURRENT_SOURCE_DIR}/../lib/include >+- ${cxxopts_SOURCE_DIR}/include >+- ${gulrak_SOURCE_DIR}/include/ghc >++ ${CMAKE_CURRENT_SOURCE_DIR}/src-ext/cxxopts/include >++ ${CMAKE_CURRENT_SOURCE_DIR}/src-ext/gulrak/include/ghc >+ ${CMAKE_CURRENT_SOURCE_DIR}/../lib/FiniteStateEntropy/lib >+ ${CMAKE_CURRENT_SOURCE_DIR}/src >+ ${CMAKE_CURRENT_SOURCE_DIR}/test >+@@ -132,19 +111,6 @@ ENDIF() >+ >+ pybind11_add_module(chiapos ${CMAKE_CURRENT_SOURCE_DIR}/python-bindings/chiapos.cpp src/chacha8.c ${BLAKE3_SRC}) >+ >+-add_executable(ProofOfSpace >+- src/cli.cpp >+- src/chacha8.c >+- ${BLAKE3_SRC} >+-) >+- >+-add_executable(RunTests >+- tests/test-main.cpp >+- tests/test.cpp >+- src/chacha8.c >+- ${BLAKE3_SRC} >+-) >+- >+ find_package(Threads REQUIRED) >+ >+ add_library(uint128 STATIC uint128_t/uint128_t.cpp) >+@@ -152,29 +118,15 @@ target_include_directories(uint128 PUBLIC uint128_t) >+ >+ target_compile_features(fse PUBLIC cxx_std_17) >+ target_compile_features(chiapos PUBLIC cxx_std_17) >+-target_compile_features(RunTests PUBLIC cxx_std_17) >+ >+ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") >+ target_link_libraries(chiapos PRIVATE fse Threads::Threads) >+- target_link_libraries(ProofOfSpace fse Threads::Threads) >+- target_link_libraries(RunTests fse Threads::Threads) >+ elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") >+ target_link_libraries(chiapos PRIVATE fse Threads::Threads) >+- target_link_libraries(ProofOfSpace fse Threads::Threads) >+- target_link_libraries(RunTests fse Threads::Threads) >+ elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") >+ target_link_libraries(chiapos PRIVATE fse Threads::Threads) >+- target_link_libraries(ProofOfSpace fse Threads::Threads) >+- target_link_libraries(RunTests fse Threads::Threads) >+ elseif (MSVC) >+ target_link_libraries(chiapos PRIVATE fse Threads::Threads uint128) >+- target_link_libraries(ProofOfSpace fse Threads::Threads uint128) >+- target_link_libraries(RunTests fse Threads::Threads uint128) >+ else() >+ target_link_libraries(chiapos PRIVATE fse stdc++fs Threads::Threads) >+- target_link_libraries(ProofOfSpace fse stdc++fs Threads::Threads) >+- target_link_libraries(RunTests fse stdc++fs Threads::Threads) >+ endif() >+- >+-enable_testing() >+-add_test(NAME RunTests COMMAND RunTests) >diff --git a/finance/py-chiapos/files/patch-setup.py b/finance/py-chiapos/files/patch-setup.py >new file mode 100644 >index 0000000..3cfe712 >--- /dev/null >+++ b/finance/py-chiapos/files/patch-setup.py >@@ -0,0 +1,19 @@ >+--- setup.py.orig 2021-05-28 02:40:44 UTC >++++ setup.py >+@@ -202,6 +202,7 @@ if platform.system() == "Windows": >+ else: >+ setup( >+ name="chiapos", >++ version="1.0.3", >+ author="Mariano Sorgente", >+ author_email="mariano@chia.net", >+ description="Chia proof of space plotting, proving, and verifying (wraps C++)", >+@@ -209,7 +210,7 @@ else: >+ python_requires=">=3.7", >+ long_description=open("README.md").read(), >+ long_description_content_type="text/markdown", >+- url="https://github.com/Chia-Network/chiavdf", >++ url="https://github.com/Chia-Network/chiapos", >+ ext_modules=[CMakeExtension("chiapos", ".")], >+ cmdclass=dict(build_ext=CMakeBuild), >+ zip_safe=False, >diff --git a/finance/py-chiapos/pkg-descr b/finance/py-chiapos/pkg-descr >new file mode 100644 >index 0000000..71602a9 >--- /dev/null >+++ b/finance/py-chiapos/pkg-descr >@@ -0,0 +1,11 @@ >+Chia's proof of space is written in C++. Includes a plotter, prover, and >+verifier. It exclusively runs on 64 bit architectures. Read the Proof of >+Space document to learn about what proof of space is and how it works. >+ >+Notes: >+Any ghc references are not Haskell related, rather a developer initials. >+The HellmanAttacks example is experimental and incomplete upstream. >+ >+This port is for the Python module (library). >+ >+WWW: https://github.com/Chia-Network/chiapos
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 256427
:
225570
|
225596
|
225615
|
225667
|
225709
|
225710
|
225734
|
225779
|
225783