pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Import py27-llvmlite-0.14.0.dev as wip/py-llvmlite.



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Mon Sep 19 04:09:42 2016 +0200
Changeset:	206dac4af42767719790dcab332d486f2f4c0456

Added Files:
	py-llvmlite/DESCR
	py-llvmlite/Makefile
	py-llvmlite/PLIST
	py-llvmlite/distinfo
	py-llvmlite/patches/patch-conda-recipes_llvmdev_build.sh
	py-llvmlite/patches/patch-ffi_Makefile.netbsd
	py-llvmlite/patches/patch-ffi_build.py

Log Message:
Import py27-llvmlite-0.14.0.dev as wip/py-llvmlite.

A lightweight LLVM python binding for writing JIT compilers

The old llvmpy binding exposes a lot of LLVM APIs but the mapping of C++-style
memory management to Python is error prone. Numba and many JIT compilers do not
need a full LLVM API. Only the IR builder, optimizer, and JIT compiler APIs are
necessary.

llvmlite is a project originally tailored for Numba's needs, using the
following approach:
 * A small C wrapper around the parts of the LLVM C++ API we need that are not
   already exposed by the LLVM C API.
 * A ctypes Python wrapper around the C API.
 * A pure Python implementation of the subset of the LLVM IR builder that we
   need for Numba.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=206dac4af42767719790dcab332d486f2f4c0456

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 py-llvmlite/DESCR                                  |  14 +++
 py-llvmlite/Makefile                               |  25 +++++
 py-llvmlite/PLIST                                  | 115 +++++++++++++++++++++
 py-llvmlite/distinfo                               |   9 ++
 .../patches/patch-conda-recipes_llvmdev_build.sh   |  15 +++
 py-llvmlite/patches/patch-ffi_Makefile.netbsd      |  25 +++++
 py-llvmlite/patches/patch-ffi_build.py             |  15 +++
 7 files changed, 218 insertions(+)

diffs:
diff --git a/py-llvmlite/DESCR b/py-llvmlite/DESCR
new file mode 100644
index 0000000..be8c6d3
--- /dev/null
+++ b/py-llvmlite/DESCR
@@ -0,0 +1,14 @@
+A lightweight LLVM python binding for writing JIT compilers
+
+The old llvmpy binding exposes a lot of LLVM APIs but the mapping of C++-style
+memory management to Python is error prone. Numba and many JIT compilers do not
+need a full LLVM API. Only the IR builder, optimizer, and JIT compiler APIs are
+necessary.
+
+llvmlite is a project originally tailored for Numba's needs, using the
+following approach:
+ * A small C wrapper around the parts of the LLVM C++ API we need that are not
+   already exposed by the LLVM C API.
+ * A ctypes Python wrapper around the C API.
+ * A pure Python implementation of the subset of the LLVM IR builder that we
+   need for Numba.
diff --git a/py-llvmlite/Makefile b/py-llvmlite/Makefile
new file mode 100644
index 0000000..c5042ef
--- /dev/null
+++ b/py-llvmlite/Makefile
@@ -0,0 +1,25 @@
+# $NetBSD$
+
+DISTNAME=	llvmlite-0.14.0.dev
+GITHUB_PROJECT=	llvmlite
+PKGNAME=	${PYPKGPREFIX}-${DISTNAME}
+CATEGORIES=	devel python
+MASTER_SITES=	${MASTER_SITE_GITHUB:=numba/}
+GITHUB_TAG=	v${PKGVERSION_NOREV}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	http://llvmlite.pydata.org/
+COMMENT=	Lightweight LLVM python binding for JIT compilers
+LICENSE=	2-clause-bsd
+
+USE_LANGUAGES=	c++
+
+DEPENDS+=	${PYPKGPREFIX}-enum-[0-9]*:../../devel/py-enum
+DEPENDS+=	${PYPKGPREFIX}-six-[0-9]*:../../lang/py-six
+
+EGG_NAME=	llvmlite-0.13.0
+
+.include "../../lang/llvm/buildlink3.mk"
+.include "../../lang/python/application.mk"
+.include "../../lang/python/egg.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/py-llvmlite/PLIST b/py-llvmlite/PLIST
new file mode 100644
index 0000000..eb07aa1
--- /dev/null
+++ b/py-llvmlite/PLIST
@@ -0,0 +1,115 @@
+@comment $NetBSD$
+${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
+${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
+${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
+${PYSITELIB}/${EGG_INFODIR}/requires.txt
+${PYSITELIB}/${EGG_INFODIR}/top_level.txt
+${PYSITELIB}/llvmlite/__init__.py
+${PYSITELIB}/llvmlite/__init__.pyc
+${PYSITELIB}/llvmlite/__init__.pyo
+${PYSITELIB}/llvmlite/_version.py
+${PYSITELIB}/llvmlite/_version.pyc
+${PYSITELIB}/llvmlite/_version.pyo
+${PYSITELIB}/llvmlite/binding/__init__.py
+${PYSITELIB}/llvmlite/binding/__init__.pyc
+${PYSITELIB}/llvmlite/binding/__init__.pyo
+${PYSITELIB}/llvmlite/binding/common.py
+${PYSITELIB}/llvmlite/binding/common.pyc
+${PYSITELIB}/llvmlite/binding/common.pyo
+${PYSITELIB}/llvmlite/binding/dylib.py
+${PYSITELIB}/llvmlite/binding/dylib.pyc
+${PYSITELIB}/llvmlite/binding/dylib.pyo
+${PYSITELIB}/llvmlite/binding/executionengine.py
+${PYSITELIB}/llvmlite/binding/executionengine.pyc
+${PYSITELIB}/llvmlite/binding/executionengine.pyo
+${PYSITELIB}/llvmlite/binding/ffi.py
+${PYSITELIB}/llvmlite/binding/ffi.pyc
+${PYSITELIB}/llvmlite/binding/ffi.pyo
+${PYSITELIB}/llvmlite/binding/initfini.py
+${PYSITELIB}/llvmlite/binding/initfini.pyc
+${PYSITELIB}/llvmlite/binding/initfini.pyo
+${PYSITELIB}/llvmlite/binding/libllvmlite.so
+${PYSITELIB}/llvmlite/binding/linker.py
+${PYSITELIB}/llvmlite/binding/linker.pyc
+${PYSITELIB}/llvmlite/binding/linker.pyo
+${PYSITELIB}/llvmlite/binding/module.py
+${PYSITELIB}/llvmlite/binding/module.pyc
+${PYSITELIB}/llvmlite/binding/module.pyo
+${PYSITELIB}/llvmlite/binding/options.py
+${PYSITELIB}/llvmlite/binding/options.pyc
+${PYSITELIB}/llvmlite/binding/options.pyo
+${PYSITELIB}/llvmlite/binding/passmanagers.py
+${PYSITELIB}/llvmlite/binding/passmanagers.pyc
+${PYSITELIB}/llvmlite/binding/passmanagers.pyo
+${PYSITELIB}/llvmlite/binding/targets.py
+${PYSITELIB}/llvmlite/binding/targets.pyc
+${PYSITELIB}/llvmlite/binding/targets.pyo
+${PYSITELIB}/llvmlite/binding/transforms.py
+${PYSITELIB}/llvmlite/binding/transforms.pyc
+${PYSITELIB}/llvmlite/binding/transforms.pyo
+${PYSITELIB}/llvmlite/binding/value.py
+${PYSITELIB}/llvmlite/binding/value.pyc
+${PYSITELIB}/llvmlite/binding/value.pyo
+${PYSITELIB}/llvmlite/ir/__init__.py
+${PYSITELIB}/llvmlite/ir/__init__.pyc
+${PYSITELIB}/llvmlite/ir/__init__.pyo
+${PYSITELIB}/llvmlite/ir/_utils.py
+${PYSITELIB}/llvmlite/ir/_utils.pyc
+${PYSITELIB}/llvmlite/ir/_utils.pyo
+${PYSITELIB}/llvmlite/ir/builder.py
+${PYSITELIB}/llvmlite/ir/builder.pyc
+${PYSITELIB}/llvmlite/ir/builder.pyo
+${PYSITELIB}/llvmlite/ir/context.py
+${PYSITELIB}/llvmlite/ir/context.pyc
+${PYSITELIB}/llvmlite/ir/context.pyo
+${PYSITELIB}/llvmlite/ir/instructions.py
+${PYSITELIB}/llvmlite/ir/instructions.pyc
+${PYSITELIB}/llvmlite/ir/instructions.pyo
+${PYSITELIB}/llvmlite/ir/module.py
+${PYSITELIB}/llvmlite/ir/module.pyc
+${PYSITELIB}/llvmlite/ir/module.pyo
+${PYSITELIB}/llvmlite/ir/transforms.py
+${PYSITELIB}/llvmlite/ir/transforms.pyc
+${PYSITELIB}/llvmlite/ir/transforms.pyo
+${PYSITELIB}/llvmlite/ir/types.py
+${PYSITELIB}/llvmlite/ir/types.pyc
+${PYSITELIB}/llvmlite/ir/types.pyo
+${PYSITELIB}/llvmlite/ir/values.py
+${PYSITELIB}/llvmlite/ir/values.pyc
+${PYSITELIB}/llvmlite/ir/values.pyo
+${PYSITELIB}/llvmlite/llvmpy/__init__.py
+${PYSITELIB}/llvmlite/llvmpy/__init__.pyc
+${PYSITELIB}/llvmlite/llvmpy/__init__.pyo
+${PYSITELIB}/llvmlite/llvmpy/core.py
+${PYSITELIB}/llvmlite/llvmpy/core.pyc
+${PYSITELIB}/llvmlite/llvmpy/core.pyo
+${PYSITELIB}/llvmlite/llvmpy/passes.py
+${PYSITELIB}/llvmlite/llvmpy/passes.pyc
+${PYSITELIB}/llvmlite/llvmpy/passes.pyo
+${PYSITELIB}/llvmlite/six.py
+${PYSITELIB}/llvmlite/six.pyc
+${PYSITELIB}/llvmlite/six.pyo
+${PYSITELIB}/llvmlite/tests/__init__.py
+${PYSITELIB}/llvmlite/tests/__init__.pyc
+${PYSITELIB}/llvmlite/tests/__init__.pyo
+${PYSITELIB}/llvmlite/tests/__main__.py
+${PYSITELIB}/llvmlite/tests/__main__.pyc
+${PYSITELIB}/llvmlite/tests/__main__.pyo
+${PYSITELIB}/llvmlite/tests/customize.py
+${PYSITELIB}/llvmlite/tests/customize.pyc
+${PYSITELIB}/llvmlite/tests/customize.pyo
+${PYSITELIB}/llvmlite/tests/test_binding.py
+${PYSITELIB}/llvmlite/tests/test_binding.pyc
+${PYSITELIB}/llvmlite/tests/test_binding.pyo
+${PYSITELIB}/llvmlite/tests/test_ir.py
+${PYSITELIB}/llvmlite/tests/test_ir.pyc
+${PYSITELIB}/llvmlite/tests/test_ir.pyo
+${PYSITELIB}/llvmlite/tests/test_llvmpy.py
+${PYSITELIB}/llvmlite/tests/test_llvmpy.pyc
+${PYSITELIB}/llvmlite/tests/test_llvmpy.pyo
+${PYSITELIB}/llvmlite/tests/test_valuerepr.py
+${PYSITELIB}/llvmlite/tests/test_valuerepr.pyc
+${PYSITELIB}/llvmlite/tests/test_valuerepr.pyo
+${PYSITELIB}/llvmlite/utils.py
+${PYSITELIB}/llvmlite/utils.pyc
+${PYSITELIB}/llvmlite/utils.pyo
diff --git a/py-llvmlite/distinfo b/py-llvmlite/distinfo
new file mode 100644
index 0000000..a91a53c
--- /dev/null
+++ b/py-llvmlite/distinfo
@@ -0,0 +1,9 @@
+$NetBSD$
+
+SHA1 (llvmlite-0.14.0.dev.tar.gz) = 6a20e83932585c82c2c0fb507e3f500ad5497846
+RMD160 (llvmlite-0.14.0.dev.tar.gz) = 8e81a7b84cfd7b3a165b9c6ac648d4855a2e4933
+SHA512 (llvmlite-0.14.0.dev.tar.gz) = 671dd9df4892d483904621809e0e6b914b1fe742b78823e1b3f9b8c5e485b8cc3e4fcd374c798390d88afc732d1c378c6c2b8231d531a31b6c855642641a1701
+Size (llvmlite-0.14.0.dev.tar.gz) = 139120 bytes
+SHA1 (patch-conda-recipes_llvmdev_build.sh) = fda7e75f79058e68f12630d087ec05e7d7466ee8
+SHA1 (patch-ffi_Makefile.netbsd) = 28a7a3363376e7b4e13a78afea5705b6009ba5f8
+SHA1 (patch-ffi_build.py) = a86eb25dd4172c61ed782bebf84597a910c7b030
diff --git a/py-llvmlite/patches/patch-conda-recipes_llvmdev_build.sh b/py-llvmlite/patches/patch-conda-recipes_llvmdev_build.sh
new file mode 100644
index 0000000..9a197fc
--- /dev/null
+++ b/py-llvmlite/patches/patch-conda-recipes_llvmdev_build.sh
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Add NetBSD support.
+
+--- conda-recipes/llvmdev/build.sh.orig	2016-08-24 14:49:54.000000000 +0000
++++ conda-recipes/llvmdev/build.sh
+@@ -13,6 +13,8 @@ if [[ "$unamestr" == 'Linux' ]]; then
+     platform='linux'
+ elif [[ "$unamestr" == 'FreeBSD' ]]; then
+     platform='freebsd'
++elif [[ "$unamestr" == 'NetBSD' ]]; then
++    platform='netbsd'
+ elif [[ "$unamestr" == 'Darwin' ]]; then
+     platform='osx'
+ fi
diff --git a/py-llvmlite/patches/patch-ffi_Makefile.netbsd b/py-llvmlite/patches/patch-ffi_Makefile.netbsd
new file mode 100644
index 0000000..3d8726e
--- /dev/null
+++ b/py-llvmlite/patches/patch-ffi_Makefile.netbsd
@@ -0,0 +1,25 @@
+$NetBSD$
+
+Add NetBSD support
+
+--- ffi/Makefile.netbsd.orig	2016-09-19 01:45:04.243949019 +0000
++++ ffi/Makefile.netbsd
+@@ -0,0 +1,18 @@
++
++CXX = clang++ -std=c++11 -stdlib=libstdc++
++CXXFLAGS = $(LLVM_CXXFLAGS)
++LDFLAGS = $(LLVM_LDFLAGS)
++LIBS = $(LLVM_LIBS)
++INCLUDE = core.h
++SRC = assembly.cpp bitcode.cpp core.cpp initfini.cpp module.cpp value.cpp \
++	executionengine.cpp transforms.cpp passmanagers.cpp targets.cpp dylib.cpp \
++	linker.cpp
++OUTPUT = libllvmlite.so
++
++all: $(OUTPUT)
++
++$(OUTPUT): $(SRC) $(INCLUDE)
++	$(CXX) -shared $(CXXFLAGS) $(SRC) -o $(OUTPUT) $(LDFLAGS) $(LIBS)
++
++clean:
++	rm -rf test
diff --git a/py-llvmlite/patches/patch-ffi_build.py b/py-llvmlite/patches/patch-ffi_build.py
new file mode 100644
index 0000000..c2612fa
--- /dev/null
+++ b/py-llvmlite/patches/patch-ffi_build.py
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Add NetBSD support
+
+--- ffi/build.py.orig	2016-08-24 14:49:54.000000000 +0000
++++ ffi/build.py
+@@ -142,6 +142,8 @@ def main():
+         main_posix('linux', '.so')
+     elif sys.platform.startswith('freebsd'):
+         main_posix('freebsd', '.so')
++    elif sys.platform.startswith('netbsd'):
++        main_posix('netbsd', '.so')
+     elif sys.platform == 'darwin':
+         main_posix('osx', '.dylib')
+     else:


Home | Main Index | Thread Index | Old Index