mirror of
https://github.com/apache/arrow.git
synced 2026-10-28 16:47:19 +08:00
### Rationale for this change `scikit-build-core` 1.0 added `[tool.scikit-build.sdist.force-include]` in order to force the inclusion of files out of the source tree. This allows us to remove our workaround with a custom build-backend to solve adding our license files from the main Arrow repository. ### What changes are included in this PR? Add configuration to force-include `LICENSE.txt` and `NOTICE.txt` and remove custom build-backend. ### Are these changes tested? Yes, CI and local ### Are there any user-facing changes? No * GitHub Issue: #50493 Authored-by: Raúl Cumplido <raulcumplido@gmail.com> Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
150 lines
4.2 KiB
TOML
150 lines
4.2 KiB
TOML
# Licensed to the Apache Software Foundation (ASF) under one
|
|
# or more contributor license agreements. See the NOTICE file
|
|
# distributed with this work for additional information
|
|
# regarding copyright ownership. The ASF licenses this file
|
|
# to you under the Apache License, Version 2.0 (the
|
|
# "License"); you may not use this file except in compliance
|
|
# with the License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing,
|
|
# software distributed under the License is distributed on an
|
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
# KIND, either express or implied. See the License for the
|
|
# specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
[build-system]
|
|
requires = [
|
|
"scikit-build-core >= 1.0",
|
|
"cython >= 3.1",
|
|
# Needed for build-time stub docstring extraction
|
|
"libcst>=1.8.6",
|
|
"numpy>=1.25",
|
|
"setuptools_scm[toml]>=8",
|
|
]
|
|
build-backend = "scikit_build_core.build"
|
|
|
|
[project]
|
|
name = "pyarrow"
|
|
dynamic = ["version"]
|
|
requires-python = ">=3.11"
|
|
description = "Python library for Apache Arrow"
|
|
readme = {file = "README.md", content-type = "text/markdown"}
|
|
license = "Apache-2.0"
|
|
license-files = [
|
|
"LICENSE.txt",
|
|
"NOTICE.txt",
|
|
]
|
|
classifiers = [
|
|
'Programming Language :: Python :: 3.11',
|
|
'Programming Language :: Python :: 3.12',
|
|
'Programming Language :: Python :: 3.13',
|
|
'Programming Language :: Python :: 3.14',
|
|
'Programming Language :: Python :: Free Threading :: 2 - Beta',
|
|
]
|
|
maintainers = [
|
|
{name = "Apache Arrow Developers", email = "dev@arrow.apache.org"}
|
|
]
|
|
|
|
[project.urls]
|
|
Homepage = "https://arrow.apache.org/"
|
|
Documentation = "https://arrow.apache.org/docs/python"
|
|
Repository = "https://github.com/apache/arrow"
|
|
Issues = "https://github.com/apache/arrow/issues"
|
|
|
|
[dependency-groups]
|
|
test = [
|
|
'pytest',
|
|
'hypothesis',
|
|
'cffi',
|
|
'pytz',
|
|
'pandas'
|
|
]
|
|
|
|
[tool.numpydoc_validation]
|
|
checks = [
|
|
"GL10",
|
|
"PR01",
|
|
"PR03",
|
|
"PR04",
|
|
"PR05",
|
|
"PR10",
|
|
"RT03",
|
|
"YD01",
|
|
]
|
|
exclude = [
|
|
'\._.*$',
|
|
]
|
|
|
|
[tool.scikit-build]
|
|
cmake.build-type = "Release"
|
|
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
|
|
sdist.include = ["pyarrow/_generated_version.py", "cmake_modules/", "pyarrow-stubs/"]
|
|
wheel.packages = ["pyarrow"]
|
|
wheel.install-dir = "pyarrow"
|
|
# TODO(GH-32609): Remove this when stubfiles are complete
|
|
# Withhold the PEP 561 marker until the type stubs are complete. The .pyi files
|
|
# are also temporarily omitted from wheels, so type checkers don't rely on the
|
|
# incomplete stubs and break downstream users (GH-49831). py.typed is kept
|
|
# in-tree for CI type-checking.
|
|
wheel.exclude = ["pyarrow/py.typed"]
|
|
|
|
[tool.scikit-build.sdist.force-include]
|
|
"../LICENSE.txt" = "LICENSE.txt"
|
|
"../NOTICE.txt" = "NOTICE.txt"
|
|
|
|
[tool.scikit-build.cmake.define]
|
|
PYARROW_BUNDLE_ARROW_CPP = {env = "PYARROW_BUNDLE_ARROW_CPP", default = "OFF"}
|
|
PYARROW_BUNDLE_CYTHON_CPP = {env = "PYARROW_BUNDLE_CYTHON_CPP", default = "OFF"}
|
|
PYARROW_GENERATE_COVERAGE = {env = "PYARROW_GENERATE_COVERAGE", default = "OFF"}
|
|
PYARROW_CXXFLAGS = {env = "PYARROW_CXXFLAGS", default = ""}
|
|
PYARROW_REQUIRE_STUB_DOCSTRINGS = {env = "PYARROW_REQUIRE_STUB_DOCSTRINGS", default = "OFF"}
|
|
|
|
[tool.setuptools_scm]
|
|
root = '..'
|
|
version_file = 'pyarrow/_generated_version.py'
|
|
version_scheme = 'guess-next-dev'
|
|
git_describe_command = 'git describe --dirty --tags --long --match "apache-arrow-[0-9]*.*"'
|
|
fallback_version = '26.0.0a0'
|
|
|
|
# TODO: Enable type checking once stubs are merged
|
|
[tool.mypy]
|
|
files = ["pyarrow-stubs"]
|
|
mypy_path = "$MYPY_CONFIG_FILE_DIR/pyarrow-stubs"
|
|
exclude = [
|
|
"^pyarrow/",
|
|
"^benchmarks/",
|
|
"^examples/",
|
|
"^scripts/",
|
|
]
|
|
|
|
# TODO: Enable type checking once stubs are merged
|
|
[tool.pyright]
|
|
pythonPlatform = "All"
|
|
pythonVersion = "3.11"
|
|
include = ["pyarrow-stubs"]
|
|
exclude = [
|
|
"pyarrow",
|
|
"benchmarks",
|
|
"examples",
|
|
"scripts",
|
|
"build",
|
|
]
|
|
stubPath = "pyarrow-stubs"
|
|
typeCheckingMode = "basic"
|
|
|
|
# TODO: Enable type checking once stubs are merged
|
|
[tool.ty.environment]
|
|
extra-paths = ["pyarrow-stubs"]
|
|
|
|
[tool.ty.src]
|
|
include = ["pyarrow-stubs"]
|
|
exclude = [
|
|
"pyarrow",
|
|
"benchmarks",
|
|
"examples",
|
|
"scripts",
|
|
]
|