Files
CoolProp/pyproject.toml
Ian Bell 6e6363f7f8 Modernize Python build system to use scikit-build-core
This commit replaces the old setuptools-based build system with a modern
scikit-build-core + CMake build system for the Python bindings.

Key changes:
- Replace setup.py with pyproject.toml using scikit-build-core backend
- Create new CMakeLists.txt for Cython module compilation
- Add FindCython.cmake helper module
- Update README from .rst to .md format
- Enable incremental builds with proper CMake dependency tracking
- Support Python 3.8-3.14 with proper Cython directives

Benefits:
- Incremental builds work correctly (only rebuild changed files)
- Modern PEP 517/518 compliant build system
- Build artifacts cached in build/{wheel_tag} directories
- Better integration with pip and modern Python tooling
- No more need for custom _py_backend build hooks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 09:26:37 -04:00

94 lines
2.6 KiB
TOML

[build-system]
requires = ["scikit-build-core>=0.10", "cython>=0.29"]
build-backend = "scikit_build_core.build"
[project]
name = "CoolProp"
authors = [
{name = "Ian Bell", email = "ian.h.bell@gmail.com"},
]
description = "Open-source thermodynamic and transport properties database"
readme = "README.md"
requires-python = ">=3.8"
license = {text = "MIT"}
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Development Status :: 4 - Beta",
"Environment :: Other Environment",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Physics",
]
dependencies = [
"numpy>=1.20",
]
dynamic = ["version"]
[project.urls]
Homepage = "http://www.coolprop.org"
Documentation = "http://www.coolprop.org"
Repository = "https://github.com/CoolProp/CoolProp"
"Bug Tracker" = "https://github.com/CoolProp/CoolProp/issues"
[tool.scikit-build]
# Minimum version of CMake to use
cmake.minimum-version = "3.15"
# Build directory for incremental builds
build-dir = "build/{wheel_tag}"
# Build type
cmake.build-type = "Release"
# Set CMake source directory to wrappers/Python
cmake.source-dir = "wrappers/Python"
# Enable verbose output for debugging (set to true if needed)
cmake.verbose = false
# Exclude unnecessary files from the wheel
wheel.exclude = [
"**/*.pyc",
"**/*.pyo",
"**/__pycache__",
"**/.git*",
"**/*.cpp", # Exclude generated C++ from Cython
]
[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.regex"
input = ".version"
regex = "(?P<value>.*)"
[tool.cibuildwheel]
# Build for multiple Python versions
build = "cp38-* cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*"
# Skip PyPy and musllinux for now
skip = "pp* *-musllinux_*"
# Test command
test-command = "python -c \"import CoolProp; print(CoolProp.__version__); CoolProp.CoolProp.PropsSI('T', 'P', 101325, 'Q', 0, 'Water')\""
test-requires = ["numpy"]
[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]
[tool.cibuildwheel.linux]
archs = ["x86_64", "aarch64"]
[tool.cibuildwheel.windows]
archs = ["AMD64"]