Skip to content

Commit

Permalink
buildfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Oct 6, 2024
1 parent 20cc940 commit a7837cf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
run: python -m pip install cibuildwheel==2.21.2

- name: Build wheels
run: CIBW_REPAIR_WHEEL_COMMAND="" python -m cibuildwheel --output-dir wheelhouse
run: python -m cibuildwheel --output-dir wheelhouse

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down
6 changes: 4 additions & 2 deletions cmake/CPM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#
# SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors

set(CPM_DOWNLOAD_VERSION 0.39.0)
set(CPM_HASH_SUM "66639bcac9dd2907b2918de466783554c1334446b9874e90d38e3778d404c2ef")
set(CPM_DOWNLOAD_VERSION 0.40.2)
set(CPM_HASH_SUM "c8cdc32c03816538ce22781ed72964dc864b2a34a310d3b7104812a5ca2d835d")

if(CPM_SOURCE_CACHE)
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
Expand All @@ -22,3 +22,5 @@ file(DOWNLOAD
)

include(${CPM_DOWNLOAD_LOCATION})


9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, name: str, sourcedir: str = "") -> None:
class CMakeBuild(build_ext):
def build_extension(self, ext: CMakeExtension) -> None:
# Must be in this form due to bug in .resolve() only fixed in Python 3.10+
ext_fullpath = Path.cwd() / 'src' / self.get_ext_fullpath(ext.name)
ext_fullpath = Path.cwd() / self.get_ext_fullpath(ext.name)
extdir = ext_fullpath.parent.resolve()

# Using this requires trailing slash for auto-detection & inclusion of
Expand Down Expand Up @@ -57,7 +57,7 @@ def build_extension(self, ext: CMakeExtension) -> None:
cmake_args += [item for item in os.environ["CMAKE_ARGS"].split(" ") if item]

# In this example, we pass in the version to C++. You might not need to.
cmake_args += [f"-DEXAMPLE_VERSION_INFO={self.distribution.get_version()}"]
# cmake_args += [f"-DEXAMPLE_VERSION_INFO={self.distribution.get_version()}"]

if self.compiler.compiler_type != "msvc":
# Using Ninja-build since it a) is available as a wheel and b)
Expand Down Expand Up @@ -112,7 +112,8 @@ def build_extension(self, ext: CMakeExtension) -> None:
# CMake 3.12+ only.
build_args += [f"-j{self.parallel}"]

build_temp = Path(self.build_temp) / ext.name
build_temp = Path(self.build_temp) / ext.name
print(build_temp)
if not build_temp.exists():
build_temp.mkdir(parents=True)

Expand All @@ -134,7 +135,7 @@ def build_extension(self, ext: CMakeExtension) -> None:
long_description="",
packages=find_packages(),
ext_modules=[
CMakeExtension("src.libsegmenter.bindings")
CMakeExtension("src/libsegmenter/bindings")
],
cmdclass={"build_ext": CMakeBuild},
setup_requires=['pytest-runner'],
Expand Down

0 comments on commit a7837cf

Please sign in to comment.