pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel
Module Name: pkgsrc
Committed By: adam
Date: Mon Aug 5 20:38:39 UTC 2024
Modified Files:
pkgsrc/devel: Makefile
Added Files:
pkgsrc/devel/py-dm-tree: DESCR Makefile PLIST distinfo
pkgsrc/devel/py-dm-tree/patches: patch-setup.py
patch-tree_CMakeLists.txt
Log Message:
py-dm-tree: added version 0.1.8
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.
To generate a diff of this commit:
cvs rdiff -u -r1.4325 -r1.4326 pkgsrc/devel/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/py-dm-tree/DESCR \
pkgsrc/devel/py-dm-tree/Makefile pkgsrc/devel/py-dm-tree/PLIST \
pkgsrc/devel/py-dm-tree/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/py-dm-tree/patches/patch-setup.py \
pkgsrc/devel/py-dm-tree/patches/patch-tree_CMakeLists.txt
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/Makefile
diff -u pkgsrc/devel/Makefile:1.4325 pkgsrc/devel/Makefile:1.4326
--- pkgsrc/devel/Makefile:1.4325 Mon Aug 5 20:37:05 2024
+++ pkgsrc/devel/Makefile Mon Aug 5 20:38:39 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4325 2024/08/05 20:37:05 adam Exp $
+# $NetBSD: Makefile,v 1.4326 2024/08/05 20:38:39 adam Exp $
#
COMMENT= Development utilities
@@ -2553,6 +2553,7 @@ SUBDIR+= py-dirty-equals
SUBDIR+= py-distlib
SUBDIR+= py-distorm3
SUBDIR+= py-distro
+SUBDIR+= py-dm-tree
SUBDIR+= py-doc8
SUBDIR+= py-docopt
SUBDIR+= py-docstyle
Added files:
Index: pkgsrc/devel/py-dm-tree/DESCR
diff -u /dev/null pkgsrc/devel/py-dm-tree/DESCR:1.1
--- /dev/null Mon Aug 5 20:38:39 2024
+++ pkgsrc/devel/py-dm-tree/DESCR Mon Aug 5 20:38:39 2024
@@ -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.
Index: pkgsrc/devel/py-dm-tree/Makefile
diff -u /dev/null pkgsrc/devel/py-dm-tree/Makefile:1.1
--- /dev/null Mon Aug 5 20:38:39 2024
+++ pkgsrc/devel/py-dm-tree/Makefile Mon Aug 5 20:38:39 2024
@@ -0,0 +1,29 @@
+# $NetBSD: Makefile,v 1.1 2024/08/05 20:38:39 adam Exp $
+
+DISTNAME= dm-tree-0.1.8
+PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
+CATEGORIES= devel python
+MASTER_SITES= ${MASTER_SITE_PYPI:=d/dm-tree/}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://github.com/google-deepmind/tree
+COMMENT= Library for working with nested data structures
+LICENSE= apache-2.0
+
+TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools-[0-9]*:../../devel/py-setuptools
+TOOL_DEPENDS+= ${PYPKGPREFIX}-wheel-[0-9]*:../../devel/py-wheel
+TEST_DEPENDS+= ${PYPKGPREFIX}-absl-py>=0.6.1:../../devel/py-absl-py
+TEST_DEPENDS+= ${PYPKGPREFIX}-attrs>=18.2.0:../../devel/py-attrs
+TEST_DEPENDS+= ${PYPKGPREFIX}-numpy>=1.15.4:../../math/py-numpy
+TEST_DEPENDS+= ${PYPKGPREFIX}-wrapt>=1.11.2:../../devel/py-wrapt
+
+USE_CXX_FEATURES= c++14
+USE_LANGUAGES= c++
+USE_TOOLS+= cmake
+
+PYTHON_VERSIONS_INCOMPATIBLE= 27
+
+.include "../../devel/abseil/buildlink3.mk"
+.include "../../devel/py-pybind11/buildlink3.mk"
+.include "../../lang/python/wheel.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/devel/py-dm-tree/PLIST
diff -u /dev/null pkgsrc/devel/py-dm-tree/PLIST:1.1
--- /dev/null Mon Aug 5 20:38:39 2024
+++ pkgsrc/devel/py-dm-tree/PLIST Mon Aug 5 20:38:39 2024
@@ -0,0 +1,19 @@
+@comment $NetBSD: PLIST,v 1.1 2024/08/05 20:38:39 adam Exp $
+${PYSITELIB}/${WHEEL_INFODIR}/LICENSE
+${PYSITELIB}/${WHEEL_INFODIR}/METADATA
+${PYSITELIB}/${WHEEL_INFODIR}/RECORD
+${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
+${PYSITELIB}/${WHEEL_INFODIR}/top_level.txt
+${PYSITELIB}/tree/__init__.py
+${PYSITELIB}/tree/__init__.pyc
+${PYSITELIB}/tree/__init__.pyo
+${PYSITELIB}/tree/_tree.so
+${PYSITELIB}/tree/sequence.py
+${PYSITELIB}/tree/sequence.pyc
+${PYSITELIB}/tree/sequence.pyo
+${PYSITELIB}/tree/tree_benchmark.py
+${PYSITELIB}/tree/tree_benchmark.pyc
+${PYSITELIB}/tree/tree_benchmark.pyo
+${PYSITELIB}/tree/tree_test.py
+${PYSITELIB}/tree/tree_test.pyc
+${PYSITELIB}/tree/tree_test.pyo
Index: pkgsrc/devel/py-dm-tree/distinfo
diff -u /dev/null pkgsrc/devel/py-dm-tree/distinfo:1.1
--- /dev/null Mon Aug 5 20:38:39 2024
+++ pkgsrc/devel/py-dm-tree/distinfo Mon Aug 5 20:38:39 2024
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2024/08/05 20:38:39 adam Exp $
+
+BLAKE2s (dm-tree-0.1.8.tar.gz) = f3c5b7d86694838f606c97cc7b8cc25ca0b9e98f82a3514c4a53626415e62dc0
+SHA512 (dm-tree-0.1.8.tar.gz) = c0a5f5b1ab84c735949d1de922cc4efdd8dc17f521c8ee4b049e288d04f233c272d769260406b1cdefecfb3e0ac9a0836bdded557cf747e70229076254ec6468
+Size (dm-tree-0.1.8.tar.gz) = 35384 bytes
+SHA1 (patch-setup.py) = 92af74d15b7c1663ee237a2080723ffc09899349
+SHA1 (patch-tree_CMakeLists.txt) = f1657471a712fe19538e9eef21c02bea61db4064
Index: pkgsrc/devel/py-dm-tree/patches/patch-setup.py
diff -u /dev/null pkgsrc/devel/py-dm-tree/patches/patch-setup.py:1.1
--- /dev/null Mon Aug 5 20:38:39 2024
+++ pkgsrc/devel/py-dm-tree/patches/patch-setup.py Mon Aug 5 20:38:39 2024
@@ -0,0 +1,26 @@
+$NetBSD: patch-setup.py,v 1.1 2024/08/05 20:38:39 adam Exp $
+
+Allow cmake to find pybind11 config files.
+
+--- setup.py.orig 2024-08-05 19:53:30.832882276 +0000
++++ setup.py
+@@ -16,6 +16,7 @@
+
+ import os
+ import platform
++import site
+ import shutil
+ import subprocess
+ import sys
+@@ -86,9 +87,11 @@ class BuildCMakeExtension(build_ext.buil
+ extension_dir = os.path.abspath(
+ os.path.dirname(self.get_ext_fullpath(ext.name)))
+ build_cfg = 'Debug' if self.debug else 'Release'
++ site_dir = site.getsitepackages()[0]
+ cmake_args = [
+ f'-DPython3_ROOT_DIR={sys.prefix}',
+ f'-DPython3_EXECUTABLE={sys.executable}',
++ f'-Dpybind11_DIR={site_dir}/pybind11/share/cmake/pybind11',
+ f'-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={extension_dir}',
+ f'-DCMAKE_BUILD_TYPE={build_cfg}'
+ ]
Index: pkgsrc/devel/py-dm-tree/patches/patch-tree_CMakeLists.txt
diff -u /dev/null pkgsrc/devel/py-dm-tree/patches/patch-tree_CMakeLists.txt:1.1
--- /dev/null Mon Aug 5 20:38:39 2024
+++ pkgsrc/devel/py-dm-tree/patches/patch-tree_CMakeLists.txt Mon Aug 5 20:38:39 2024
@@ -0,0 +1,79 @@
+$NetBSD: patch-tree_CMakeLists.txt,v 1.1 2024/08/05 20:38:39 adam Exp $
+
+Use system pybind11 and absl.
+https://github.com/google-deepmind/tree/pull/73
+
+--- tree/CMakeLists.txt.orig 2024-08-05 19:44:05.774867683 +0000
++++ tree/CMakeLists.txt
+@@ -51,68 +51,12 @@ if(APPLE)
+ endif()
+
+ # 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()
+-
+-# Needed to disable Abseil tests.
+-set (BUILD_TESTING OFF)
+-
+-# Include abseil-cpp.
+-set(ABSEIL_VER 20210324.2)
+-include(ExternalProject)
+-set(ABSEIL_CMAKE_ARGS
+- "-DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/abseil-cpp"
+- "-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}"
+- "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
+- "-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}"
+- "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
+- "-DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE}"
+- "-DLIBRARY_OUTPUT_PATH=${CMAKE_SOURCE_DIR}/abseil-cpp/lib")
+-if(DEFINED CMAKE_OSX_ARCHITECTURES)
+- set(ABSEIL_CMAKE_ARGS
+- ${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})
+-include_directories (${abseil_install_dir}/include)
+-
++find_package(pybind11 REQUIRED CONFIG)
++find_package(absl REQUIRED)
+
+ # Define pybind11 tree module.
+ pybind11_add_module(_tree tree.h tree.cc)
+-add_dependencies(_tree abseil-cpp)
+-
+-if (WIN32 OR MSVC)
+- set(ABSEIL_LIB_PREF "absl")
+- set(LIB_SUFF "lib")
+-else()
+- set(ABSEIL_LIB_PREF "libabsl")
+- set(LIB_SUFF "a")
+-endif()
+-
+-# Link abseil static libs.
+-# We don't use find_library here to force cmake to build abseil before linking.
+-set(ABSEIL_LIBS int128 raw_hash_set raw_logging_internal strings throw_delegate)
+-foreach(ABSEIL_LIB IN LISTS ABSEIL_LIBS)
+- target_link_libraries(_tree PRIVATE
+- "${abseil_install_dir}/lib/${ABSEIL_LIB_PREF}_${ABSEIL_LIB}.${LIB_SUFF}")
+-endforeach()
++target_link_libraries(_tree PRIVATE absl::int128 absl::raw_hash_set absl::raw_logging_internal absl::strings absl::throw_delegate)
+
+ # Make the module private to tree package.
+ set_target_properties(_tree PROPERTIES OUTPUT_NAME tree/_tree)
Home |
Main Index |
Thread Index |
Old Index