Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devel/py-dm-tree: New port: Library for working with nested data stru…
…ctures
- Loading branch information
Showing
6 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
PORTNAME= dm-tree | ||
DISTVERSION= 0.1.8 | ||
CATEGORIES= devel | ||
MASTER_SITES= PYPI | ||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} | ||
|
||
MAINTAINER= yuri@FreeBSD.org | ||
COMMENT= Library for working with nested data structures | ||
WWW= https://tree.readthedocs.io/en/latest/ | ||
|
||
LICENSE= APACHE20 | ||
LICENSE_FILE= ${WRKSRC}/LICENSE | ||
|
||
BUILD_DEPENDS= cmake:devel/cmake-core \ | ||
pybind11>0:devel/pybind11 | ||
LIB_DEPENDS= libabsl_strings.so:devel/abseil | ||
|
||
USES= localbase python | ||
USE_PYTHON= distutils concurrent | ||
|
||
MAKE_ENV= FREEBSD_LOCALBASE=${LOCALBASE} | ||
|
||
.include <bsd.port.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
TIMESTAMP = 1712465713 | ||
SHA256 (dm-tree-0.1.8.tar.gz) = 0fcaabbb14e7980377439e7140bd05552739ca5e515ecb3119f234acee4b9430 | ||
SIZE (dm-tree-0.1.8.tar.gz) = 35384 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- tree/CMakeLists.txt.orig 2022-12-18 09:35:42 UTC | ||
+++ tree/CMakeLists.txt | ||
@@ -52,17 +52,18 @@ set(PYBIND_VER v2.10.1) | ||
|
||
# Fetch pybind to be able to use pybind11_add_module symbol. | ||
set(PYBIND_VER v2.10.1) | ||
-include(FetchContent) | ||
-FetchContent_Declare( | ||
- pybind11 | ||
- GIT_REPOSITORY https://github.com/pybind/pybind11 | ||
- GIT_TAG ${PYBIND_VER} | ||
-) | ||
-if(NOT pybind11_POPULATED) | ||
- FetchContent_Populate(pybind11) | ||
- add_subdirectory(${pybind11_SOURCE_DIR} ${pybind11_BINARY_DIR}) | ||
- include_directories(${pybind11_INCLUDE_DIR}) | ||
-endif() | ||
+#include(FetchContent) | ||
+#FetchContent_Declare( | ||
+# pybind11 | ||
+# GIT_REPOSITORY https://github.com/pybind/pybind11 | ||
+# GIT_TAG ${PYBIND_VER} | ||
+#) | ||
+#if(NOT pybind11_POPULATED) | ||
+# FetchContent_Populate(pybind11) | ||
+# add_subdirectory(${pybind11_SOURCE_DIR} ${pybind11_BINARY_DIR}) | ||
+# include_directories(${pybind11_INCLUDE_DIR}) | ||
+#endif() | ||
+find_package(pybind11) | ||
|
||
# Needed to disable Abseil tests. | ||
set (BUILD_TESTING OFF) | ||
@@ -83,27 +84,28 @@ endif() | ||
${ABSEIL_CMAKE_ARGS} | ||
"-DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}") | ||
endif() | ||
-ExternalProject_Add(abseil-cpp | ||
- GIT_REPOSITORY https://github.com/abseil/abseil-cpp.git | ||
- GIT_TAG ${ABSEIL_VER} | ||
- PREFIX ${CMAKE_SOURCE_DIR}/abseil-cpp | ||
- CMAKE_ARGS ${ABSEIL_CMAKE_ARGS} | ||
-) | ||
-ExternalProject_Get_Property(abseil-cpp install_dir) | ||
-set(abseil_install_dir ${install_dir}) | ||
+#ExternalProject_Add(abseil-cpp | ||
+# GIT_REPOSITORY https://github.com/abseil/abseil-cpp.git | ||
+# GIT_TAG ${ABSEIL_VER} | ||
+# PREFIX ${CMAKE_SOURCE_DIR}/abseil-cpp | ||
+# CMAKE_ARGS ${ABSEIL_CMAKE_ARGS} | ||
+#) | ||
+#ExternalProject_Get_Property(abseil-cpp install_dir) | ||
+find_package(absl REQUIRED) | ||
+set(abseil_install_dir $ENV{FREEBSD_LOCALBASE}) | ||
include_directories (${abseil_install_dir}/include) | ||
|
||
|
||
# Define pybind11 tree module. | ||
pybind11_add_module(_tree tree.h tree.cc) | ||
-add_dependencies(_tree abseil-cpp) | ||
+add_dependencies(_tree absl::strings absl::config) | ||
|
||
if (WIN32 OR MSVC) | ||
set(ABSEIL_LIB_PREF "absl") | ||
set(LIB_SUFF "lib") | ||
else() | ||
set(ABSEIL_LIB_PREF "libabsl") | ||
- set(LIB_SUFF "a") | ||
+ set(LIB_SUFF "so") | ||
endif() | ||
|
||
# Link abseil static libs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
tree is a library for working with nested data structures. In a way, tree | ||
generalizes the builtin map function which only supports flat sequences, and | ||
allows to apply a function to each "leaf" preserving the overall structure. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
%%PYTHON_SITELIBDIR%%/tree/__init__.py | ||
%%PYTHON_SITELIBDIR%%/tree/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.opt-1.pyc | ||
%%PYTHON_SITELIBDIR%%/tree/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc | ||
%%PYTHON_SITELIBDIR%%/tree/__pycache__/sequence%%PYTHON_EXT_SUFFIX%%.opt-1.pyc | ||
%%PYTHON_SITELIBDIR%%/tree/__pycache__/sequence%%PYTHON_EXT_SUFFIX%%.pyc | ||
%%PYTHON_SITELIBDIR%%/tree/__pycache__/tree_benchmark%%PYTHON_EXT_SUFFIX%%.opt-1.pyc | ||
%%PYTHON_SITELIBDIR%%/tree/__pycache__/tree_benchmark%%PYTHON_EXT_SUFFIX%%.pyc | ||
%%PYTHON_SITELIBDIR%%/tree/__pycache__/tree_test%%PYTHON_EXT_SUFFIX%%.opt-1.pyc | ||
%%PYTHON_SITELIBDIR%%/tree/__pycache__/tree_test%%PYTHON_EXT_SUFFIX%%.pyc | ||
%%PYTHON_SITELIBDIR%%/tree/_tree%%PYTHON_EXT_SUFFIX%%.so | ||
%%PYTHON_SITELIBDIR%%/tree/sequence.py | ||
%%PYTHON_SITELIBDIR%%/tree/tree_benchmark.py | ||
%%PYTHON_SITELIBDIR%%/tree/tree_test.py |