Skip to content

Commit 10a5af5

Browse files
andrewprockandrewprock-anari
authored andcommitted
fix broken build and clean up dist files
see issue for what may be a bug in scikit-build-core: scikit-build/scikit-build-core#914
1 parent d67da05 commit 10a5af5

File tree

4 files changed

+22
-15
lines changed

4 files changed

+22
-15
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
*~
22
build
3-
_build
43
dist
54
*.pyc
65
*.vscode

CMakeLists.txt

+17-13
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-register")
1414
# Set up gtest. This must be set up before any subdirectories are
1515
# added which will use gtest.
1616
# TODO: clean this up a bit, maybe make this optional?
17-
add_subdirectory(src/ext/googletest)
1817
include_directories(${GTEST_INCLUDE_DIRS})
1918
link_directories(${GTEST_LIBS_DIR})
2019
add_definitions("-fPIC")
@@ -36,19 +35,24 @@ include_directories("${PROJECT_BINARY_DIR}")
3635
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
3736
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
3837

39-
# This controls whether or not to build the python bridge
40-
if(BUILD_PYTHON)
41-
add_subdirectory(src/lib/python)
42-
endif()
4338

4439
# add the actual code
4540
include_directories(src/lib)
4641
add_subdirectory(src/lib)
47-
add_subdirectory(src/programs)
48-
49-
# Add make install functionality
50-
#install(TARGETS peval)
51-
#install(TARGETS penum)
52-
#install(TARGETS ps-colex)
53-
#install(TARGETS ps-eval)
54-
#install(TARGETS ps-lut)
42+
43+
# This controls whether or not we are building the python
44+
# binaries, and possibly the wheel file.
45+
# TODO: add a separate option for building the wheel vs. python
46+
if(BUILD_PYTHON)
47+
add_subdirectory(src/lib/python)
48+
else()
49+
# none of these are needed in the wheel file
50+
add_subdirectory(src/programs)
51+
add_subdirectory(src/ext/googletest)
52+
# Add make install functionality
53+
install(TARGETS peval)
54+
install(TARGETS penum)
55+
install(TARGETS ps-colex)
56+
install(TARGETS ps-eval)
57+
install(TARGETS ps-lut)
58+
endif()

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,17 @@ shell:
171171

172172
## Python wheel package
173173

174+
You will need to install pipx to build with scikit-build-core, using
175+
apt on Ubuntu and brew on MacOS.
176+
174177
There is also a `pyproject.toml` file which can be used to create an
175178
installable wheel for the pythong package. The commands below can be
176179
used to build/install/verify the package.
177180

178181
pipx run build
179182
python3 -m venv venv
180183
. venv/bin/activate
181-
pip install dist/pokerstove-1.2-cp310-cp310-linux_x86_64.whl
184+
pip install dist/pokerstove-*.whl
182185
python src/lib/python/test-python
183186
deactivate
184187

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ cmake.version = ">=3.5"
1313
cmake.build-type = "Release"
1414
build.targets = ["pokerstove"]
1515
install.components = ["pokerstove"]
16+
sdist.exclude = ["src/programs", "android", "win32", "src/ext", "doc", ".*"]
1617
# build.verbose = true
1718
# logging.level = "DEBUG"
1819

0 commit comments

Comments
 (0)