Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install KLLVM python package #553

Merged
merged 9 commits into from
Sep 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ pybind11_add_module(kllvm-static STATIC NO_EXTRAS
runtime.cpp
)

pybind11_add_module(kllvm SHARED
pybind11_add_module(_kllvm SHARED
ast.cpp
)

target_link_libraries(kllvm PUBLIC
target_link_libraries(_kllvm PUBLIC
AST
Parser
)
Expand All @@ -36,6 +36,9 @@ install(FILES $<TARGET_FILE:kllvm-static>
DESTINATION lib/kllvm
RENAME libkllvm.a)

install(TARGETS kllvm
DESTINATION lib/kllvm
install(DIRECTORY package/
DESTINATION lib/python)

install(TARGETS _kllvm
DESTINATION lib/python/kllvm
LIBRARY)
2 changes: 1 addition & 1 deletion bindings/python/ast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void bind_ast(py::module_ &m) {
.def_property_readonly("name", &KORECompositeSort::getName);
}

PYBIND11_MODULE(kllvm, m) {
PYBIND11_MODULE(_kllvm, m) {
#ifdef KLLVM_BUILD_RUNTIME
bind_runtime(m);
#endif
Expand Down
Empty file.
1 change: 1 addition & 0 deletions bindings/python/package/kllvm/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from ._kllvm import *
17 changes: 17 additions & 0 deletions bindings/python/package/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[tool.poetry]
name = "kllvm"
version = "0.1.0"
description = "Python bindings for the K LLVM backend"
authors = [
"Runtime Verification, Inc. <contact@runtimeverification.com>",
]
readme = "README.md"
include = ["kllvm/*"]

[tool.poetry.dependencies]
python = ">=3.8"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"