Skip to content

Commit c725770

Browse files
change "setup.py"
1 parent 26a3d95 commit c725770

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ temp/
55
__pycache__/
66
*.egg-info/*
77
dist/
8+
*so

CMakeLists.txt

+1-6
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,16 @@ find_package(Python COMPONENTS Interpreter Development)
33
if (${Python_FOUND})
44

55
project(TensorArray_Python VERSION 0.1.0 LANGUAGES C CXX)
6-
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/lib)
7-
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/src/tensor_array/core)
8-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/bin)
96

107
include(CTest)
118
enable_testing()
129

1310
add_subdirectory("third_party/pybind11" EXCLUDE_FROM_ALL)
1411
add_subdirectory("tensor-array-repo/Tensor-Array" EXCLUDE_FROM_ALL)
15-
add_library(tensor2 SHARED src/tensor_array/_core/tensor_bind.cc)
12+
pybind11_add_module(tensor2 SHARED src/tensor_array/_core/tensor_bind.cc)
1613

1714
target_include_directories(
1815
tensor2
19-
PRIVATE "${CMAKE_CURRENT_LIST_DIR}/third_party/pybind11/include"
2016
PRIVATE "${CMAKE_CURRENT_LIST_DIR}/tensor-array-repo/Tensor-Array/src"
2117
PRIVATE ${Python_INCLUDE_DIRS}
2218
)
@@ -29,6 +25,5 @@ set(CPACK_PROJECT_NAME ${PROJECT_NAME})
2925
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
3026
include(CPack)
3127

32-
install(TARGETS tensor2 LIBRARY DESTINATION /src/tensor_array/core ARCHIVE DESTINATION lib)
3328
endif()
3429

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ def main():
130130

131131
setup(
132132
name = "TensorArray",
133-
version = "0.0.1a02",
133+
version = "0.0.1a2",
134134
description = "A machine learning package",
135135
long_description=long_description,
136136
ext_modules=[
137-
CMakeExtension("tensor_array")
137+
CMakeExtension("tensor2")
138138
],
139139
authors = "TensorArray-Creators",
140140
url= "https://github.com/Tensor-Array/Tensor-Array-Python",

src/tensor_array/core/tensor2.so

-4.23 MB
Binary file not shown.

0 commit comments

Comments
 (0)