Skip to content

Commit

Permalink
use scikit-build-core
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener committed May 10, 2024
1 parent e421c82 commit fd6f24e
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 254 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (SKBUILD)
set(Python_INCLUDE_DIR "${PYTHON_INCLUDE_DIR}")
set(Python_LIBRARIES "${PYTHON_LIBRARY}")
endif()
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
find_package(Python COMPONENTS Interpreter Development.Module NumPy REQUIRED)

# }}}

Expand All @@ -37,10 +37,9 @@ execute_process(
link_directories(${PYOPENCL_CL_LIB_DIRS})

find_package(nanobind CONFIG REQUIRED)
find_package(NumPy REQUIRED)
find_package(OpenCL REQUIRED)

include_directories(${OpenCL_INCLUDE_DIR} ${NumPy_INCLUDE_DIRS})
include_directories(${OpenCL_INCLUDE_DIR} ${Python_NumPy_INCLUDE_DIRS})

nanobind_add_module(
_cl
Expand Down
60 changes: 48 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,52 @@
[build-system]
# Minimum requirements for the build system to execute.
requires = [
"setuptools>=42.0.0",
"wheel>=0.34.2",
"numpy;python_version >= '3.9' and platform_python_implementation == 'PyPy'",
"oldest-supported-numpy;python_version < '3.9' or platform_python_implementation != 'PyPy'",
"scikit-build",
"cmake>=3.17",
"nanobind>=1.9.2",
"ninja; platform_system!='Windows'",
]
build-backend = "setuptools.build_meta"
requires = ["scikit-build-core >=0.9.3", "nanobind >=1.9.2", "numpy"]
build-backend = "scikit_build_core.build"

[project]
name = "pyopencl"
version = "2024.2.2"
description = "Python wrapper for OpenCL"
readme = "README.rst"
requires-python = "~=3.8"
authors = [
{ name = "Andreas Kloeckner", email = "inform@tiker.net" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Other Audience",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: C++",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Physics",
]
dependencies = [
"importlib-resources; python_version<'3.9'",
"numpy",
"platformdirs>=2.2.0",
"pytools>=2022.1.13",
]

[project.optional-dependencies]
oclgrind = [
"oclgrind_binary_distribution>=18.3",
]
pocl = [
"pocl_binary_distribution>=1.2",
]
test = [
"Mako",
"pytest>=7.0.0",
]

[project.urls]
Homepage = "https://mathema.tician.de/software/pyopencl"

[tool.cibuildwheel]
test-command = "pytest {project}/test"
Expand Down
239 changes: 0 additions & 239 deletions setup.py

This file was deleted.

0 comments on commit fd6f24e

Please sign in to comment.