forked from equinor/xtgeo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BLD: Build with pyproject.toml and skbuild-core
- Loading branch information
Showing
8 changed files
with
212 additions
and
403 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,11 @@ | ||
# Main CMakeLists.txt file. Most of the work is inside | ||
# the CMakeLists file under add_subdirectory() | ||
|
||
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) | ||
if (CMAKE_VERSION VERSION_LESS 3) | ||
project(clib C) | ||
else() | ||
project(clib LANGUAGES C) | ||
endif() | ||
|
||
|
||
set(CMAKE_VERBOSE_MAKEFILE ON) | ||
|
||
if(SKBUILD) | ||
message(STATUS "The project is built using scikit-build") | ||
cmake_minimum_required(VERSION 3.15.3) | ||
project(${SKBUILD_PROJECT_NAME} LANGUAGES C) | ||
|
||
if(NOT SKBUILD) | ||
message( | ||
WARNING | ||
"This CMakeLists.txt file should not be used directly.\n" | ||
"Use 'pip install ${CMAKE_SOURCE_DIR}' to install this as a Python package.") | ||
endif() | ||
|
||
find_package(PythonExtensions REQUIRED) | ||
|
||
add_subdirectory(src/clib) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,101 @@ | ||
# NOTE: you have to use single-quoted strings in TOML for regular expressions. | ||
[build-system] | ||
requires = [ | ||
"scikit-build-core[pyproject]", | ||
"swig", | ||
"numpy==1.19.2; python_version == '3.8'", | ||
"numpy==1.19.5; python_version == '3.9'", | ||
"numpy==1.21.6; python_version == '3.10'", | ||
"numpy==1.23.5; python_version == '3.11'", | ||
] | ||
build-backend = "scikit_build_core.build" | ||
|
||
[tool.scikit-build] | ||
cmake.verbose = true | ||
logging.level = "INFO" | ||
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm" | ||
sdist.include = ["src/xtgeo/_theversion.py"] | ||
wheel.install-dir = "xtgeo" | ||
|
||
[project] | ||
name = "xtgeo" | ||
description = "XTGeo is a Python library for 3D grids, surfaces, wells, etc" | ||
readme = "README.md" | ||
requires-python = ">=3.8" | ||
license = { text = "LGPL-3.0" } | ||
authors = [ | ||
{ name = "Equinor", email = "[email protected]" }, | ||
] | ||
keywords = ["grids", "surfaces", "wells", "cubes"] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: GNU Lesser General Public", | ||
"License v3 or later (LGPLv3+)", | ||
"Operating System :: POSIX :: Linux", | ||
"Natural Language :: English", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Scientific/Engineering :: Physics", | ||
"Topic :: Software Development :: Libraries", | ||
"Topic :: Utilities", | ||
] | ||
dynamic = ["version"] | ||
dependencies = [ | ||
"deprecation", | ||
"ecl-data-io>=2.1", | ||
"h5py>=3", | ||
"hdf5plugin>=2.3", | ||
"matplotlib>=3.3", | ||
"numpy>=1.19", | ||
"pandas>=1.1", | ||
"roffio>=0.0.2", | ||
"scipy>=1.5", | ||
"segyio>1.8.0", | ||
"shapely>=1.6.2", | ||
"tables;platform_system != 'Darwin'", # TODO: update when fixed for mac | ||
"typing-extensions", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/equinor/xtgeo" | ||
Repository = "https://github.com/equinor/xtgeo" | ||
Issues = "https://github.com/equinor/xtgeo/issues" | ||
Documentation = "https://xtgeo.readthedocs.io" | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"black", | ||
"coverage>=4.1", | ||
"flake8", | ||
"isort", | ||
"hypothesis", | ||
"pylint", | ||
"pytest", | ||
"pytest-benchmark", | ||
"pytest-cov", | ||
"pydocstyle", | ||
"pytest-runner", | ||
"pytest-mock", | ||
"pytest-snapshot", | ||
"pytest-xdist", | ||
] | ||
docs = [ | ||
"pydocstyle", | ||
"Sphinx<4.0", | ||
"sphinx-rtd-theme", | ||
"sphinx-toolbox", | ||
"autoclasstoc", | ||
"myst-parser", | ||
] | ||
|
||
[tool.black] | ||
line-length = 88 | ||
target-version = ['py38', 'py39', 'py310', 'py311'] | ||
target-version = ["py38", "py39", "py310", "py311"] | ||
include = '\.pyi?$' | ||
exclude = ''' | ||
/( | ||
|
@@ -23,28 +116,23 @@ exclude = ''' | |
)/ | ||
''' | ||
|
||
# numpy version scheme to fulfill Roxar API compatibility: | ||
# RMS 12.1.* --> numpy == 1.19.2 with python 3.8 | ||
[tool.pydocstyle] | ||
convention = "google" | ||
match = '(?!(test_|_)).*\.py' | ||
|
||
[build-system] | ||
requires = [ | ||
"setuptools>=43", | ||
"scikit-build<0.17", | ||
'cmake==3.15.3; python_version >= "3.8" and platform_system == "Linux"', | ||
'cmake==3.18.0; platform_system != "Linux"', | ||
"ninja", | ||
'swig', | ||
"setuptools_scm>=3.2.0", | ||
'numpy==1.19.2; python_version == "3.8"', | ||
'numpy==1.19.5; python_version == "3.9"', | ||
'numpy==1.21.6; python_version == "3.10"', | ||
'numpy==1.23.5; python_version == "3.11"', | ||
'Sphinx<4.0', | ||
'sphinx-rtd-theme', | ||
'sphinx-toolbox', | ||
'autoclasstoc', | ||
'myst-parser', | ||
[tool.pytest.ini_options] | ||
minversion = "6.0" | ||
addopts = "--verbose" | ||
log_cli = "False" | ||
log_cli_format = "%(levelname)8s (%(relativeCreated)6.0fms) %(filename)44s [%(funcName)40s()] %(lineno)4d >> %(message)s" | ||
log_cli_level = "INFO" | ||
testpaths = "tests" | ||
markers = [ | ||
"bigtest: A big test not executed by default", | ||
"requires_opm: A test requiring opm in the environment", | ||
"requires_roxar: Test requires to run in RMS python", | ||
] | ||
doctest_optionflags = "ELLIPSIS" | ||
|
||
[tool.setuptools_scm] | ||
write_to = "src/xtgeo/_theversion.py" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.