From 6f3ae8fdc408ad061e95ddf27f685fa8d147ca4b Mon Sep 17 00:00:00 2001 From: jakirkham Date: Thu, 3 Nov 2022 18:54:38 -0700 Subject: [PATCH 01/24] Explicitly set `build-backend` Just use the default `build-backend` for now, but make it explicit. This will also give us a nudge to move off of the legacy backend. --- python/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index 0d4cfea09..ecbe5ad79 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -13,7 +13,7 @@ # limitations under the License. [build-system] - +build-backend = "setuptools.build_meta:__legacy__" requires = [ "wheel", "setuptools", From f01fb1b50275d628775d43ff404dc684e5cf2397 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Thu, 3 Nov 2022 18:54:38 -0700 Subject: [PATCH 02/24] Add symlinks to README --- python/README.md | 1 + 1 file changed, 1 insertion(+) create mode 120000 python/README.md diff --git a/python/README.md b/python/README.md new file mode 120000 index 000000000..32d46ee88 --- /dev/null +++ b/python/README.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file From fea5f3a4ff9cac0987cc93a8fd950be8e7282df7 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Thu, 3 Nov 2022 18:54:39 -0700 Subject: [PATCH 03/24] Use `MANIFEST.in` to handle package data --- python/MANIFEST.in | 12 ++++++++++++ python/setup.py | 11 ----------- 2 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 python/MANIFEST.in diff --git a/python/MANIFEST.in b/python/MANIFEST.in new file mode 100644 index 000000000..61c15559c --- /dev/null +++ b/python/MANIFEST.in @@ -0,0 +1,12 @@ +# Cython files +recursive-include rmm *.pxd +recursive-include rmm *.pyx + +# Build files +recursive-include rmm CMakeLists.txt + +# License +include LICENSE + +# README +include README diff --git a/python/setup.py b/python/setup.py index 221908184..4b59209dc 100644 --- a/python/setup.py +++ b/python/setup.py @@ -23,17 +23,6 @@ # Include the separately-compiled shared library extras_require={"test": ["pytest"]}, packages=find_packages(include=["rmm", "rmm.*"]), - include_package_data=True, - python_requires=">=3.8", - package_data={ - # Note: A dict comprehension with an explicit copy is necessary (rather - # than something simpler like a dict.fromkeys) because otherwise every - # package will refer to the same list and skbuild modifies it in place. - key: ["*.hpp", "*.pxd"] - for key in find_packages( - include=["rmm._lib", "rmm._lib.includes", "rmm._cuda*"] - ) - }, install_requires=[ "cuda-python>=11.7.1,<12.0", "numpy>=1.19", From 43cbd29d6347e6eec104ac7b718309bb1869e6d1 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Thu, 3 Nov 2022 18:54:40 -0700 Subject: [PATCH 04/24] Move `isort` config to `pyproject.toml` and `flake8` config to `.flake8`. --- .pre-commit-config.yaml | 2 +- python/.flake8 | 25 ++++++++++++++++ python/pyproject.toml | 53 +++++++++++++++++++++++++++++++++ python/setup.cfg | 65 +++++------------------------------------ 4 files changed, 86 insertions(+), 59 deletions(-) create mode 100644 python/.flake8 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9d60da84c..bb9400be4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: rev: 5.12.0 hooks: - id: isort - args: ["--config-root=python/", "--resolve-all-configs"] + args: ["--settings-path=python/pyproject.toml"] files: python/.* types_or: [python, cython, pyi] - repo: https://github.com/ambv/black diff --git a/python/.flake8 b/python/.flake8 new file mode 100644 index 000000000..3e85b1a1e --- /dev/null +++ b/python/.flake8 @@ -0,0 +1,25 @@ +# Copyright (c) 2023, NVIDIA CORPORATION. + +[flake8] +filename = *.py, *.pyx, *.pxd, *.pxi +exclude = __init__.py, *.egg, build, docs, .git +force-check = True +ignore = + # line break before binary operator + W503, + # whitespace before : + E203 +per-file-ignores = + # Rules ignored only in Cython: + # E211: whitespace before '(' (used in multi-line imports) + # E225: Missing whitespace around operators (breaks cython casting syntax like ) + # E226: Missing whitespace around arithmetic operators (breaks cython pointer syntax like int*) + # E227: Missing whitespace around bitwise or shift operator (Can also break casting syntax) + # E275: Missing whitespace after keyword (Doesn't work with Cython except?) + # E402: invalid syntax (works for Python, not Cython) + # E999: invalid syntax (works for Python, not Cython) + # W504: line break after binary operator (breaks lines that end with a pointer) + *.pyx: E211, E225, E226, E227, E275, E402, E999, W504 + *.pxd: E211, E225, E226, E227, E275, E402, E999, W504 + *.pxi: E211, E225, E226, E227, E275, E402, E999, W504 + diff --git a/python/pyproject.toml b/python/pyproject.toml index ecbe5ad79..02c9ca0a1 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -43,3 +43,56 @@ exclude = ''' dist )/ ''' + +[tool.isort] +line_length = 79 +multi_line_output = 3 +include_trailing_comma = true +force_grid_wrap = 0 +combine_as_imports = true +order_by_type = true +known_dask = [ + "dask", + "distributed", + "dask_cuda", +] +known_rapids = [ + "nvtext", + "cudf", + "cuml", + "cugraph", + "dask_cudf", +] +known_first_party = [ + "rmm", +] +default_section = "THIRDPARTY" +sections = [ + "FUTURE", + "STDLIB", + "THIRDPARTY", + "DASK", + "RAPIDS", + "FIRSTPARTY", + "LOCALFOLDER", +] +skip = [ + "thirdparty", + ".eggs", + ".git", + ".hg", + ".mypy_cache", + ".tox", + ".venv", + "_build", + "buck-out", + "build", + "dist", + "__init__.py", +] + +[tool.setuptools] +license-files = ["../LICENSE"] +package-dir = {"" = "."} +packages = ["rmm"] +zip-safe = false diff --git a/python/setup.cfg b/python/setup.cfg index d5b0510b1..6fa1ab727 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -1,60 +1,9 @@ # Copyright (c) 2018-2021, NVIDIA CORPORATION. - -[flake8] -filename = *.py, *.pyx, *.pxd, *.pxi -exclude = __init__.py, *.egg, build, docs, .git -force-check = True -ignore = - # line break before binary operator - W503, - # whitespace before : - E203 -per-file-ignores = - # Rules ignored only in Cython: - # E211: whitespace before '(' (used in multi-line imports) - # E225: Missing whitespace around operators (breaks cython casting syntax like ) - # E226: Missing whitespace around arithmetic operators (breaks cython pointer syntax like int*) - # E227: Missing whitespace around bitwise or shift operator (Can also break casting syntax) - # E275: Missing whitespace after keyword (Doesn't work with Cython except?) - # E402: invalid syntax (works for Python, not Cython) - # E999: invalid syntax (works for Python, not Cython) - # W504: line break after binary operator (breaks lines that end with a pointer) - *.pyx: E211, E225, E226, E227, E275, E402, E999, W504 - *.pxd: E211, E225, E226, E227, E275, E402, E999, W504 - *.pxi: E211, E225, E226, E227, E275, E402, E999, W504 - -[isort] -line_length=79 -multi_line_output=3 -include_trailing_comma=True -force_grid_wrap=0 -combine_as_imports=True -order_by_type=True -known_dask= - dask - distributed - dask_cuda -known_rapids= - nvtext - cudf - cuml - cugraph - dask_cudf -known_first_party= - rmm -default_section=THIRDPARTY -sections=FUTURE,STDLIB,THIRDPARTY,DASK,RAPIDS,FIRSTPARTY,LOCALFOLDER -skip= - thirdparty - .eggs - .git - .hg - .mypy_cache - .tox - .venv - _build - buck-out - build - dist - __init__.py +[options] +packages = find: +install_requires = + cuda-python>=11.5,<11.7.1 + numpy>=1.19 + numba>=0.49 +python_requires = >=3.8 From 60c04b2dcc5c01577280ecdb3a2c909a8ff51a4d Mon Sep 17 00:00:00 2001 From: jakirkham Date: Thu, 3 Nov 2022 18:54:41 -0700 Subject: [PATCH 05/24] Migrate as much as possible to `pyproject.toml` --- python/pyproject.toml | 40 ++++++++++++++++++++++++++++++++++++++-- python/setup.cfg | 9 --------- python/setup.py | 29 +---------------------------- 3 files changed, 39 insertions(+), 39 deletions(-) delete mode 100644 python/setup.cfg diff --git a/python/pyproject.toml b/python/pyproject.toml index 02c9ca0a1..96d261c14 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -21,9 +21,45 @@ requires = [ "scikit-build>=0.13.1", "cmake>=3.23.1,!=3.25.0", "ninja", - "cuda-python>=11.7.1,<12.0" + "cuda-python>=11.7.1,<12.0", + "tomli; python_version < '3.11'", ] +[project] +name = "rmm" +version = "23.04.00" +description = "rmm - RAPIDS Memory Manager" +readme = { file = "README.md", content-type = "text/markdown" } +authors = [ + { name = "NVIDIA Corporation" }, +] +license = { text = "Apache 2.0" } +requires-python = ">=3.8" +dependencies = [ + "cuda-python>=11.7.1,<12.0", + "numpy>=1.19", + "numba>=0.49", +] +classifiers = [ + "Intended Audience :: Developers", + "Topic :: Database", + "Topic :: Scientific/Engineering", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", +] + +[project.optional-dependencies] +test = [ + "pytest", + "pytest-xdist", +] + +[project.urls] +Homepage = "https://github.com/rapidsai/rmm" + [tool.black] line-length = 79 target-version = ["py38"] @@ -92,7 +128,7 @@ skip = [ ] [tool.setuptools] -license-files = ["../LICENSE"] +license-files = ["LICENSE"] package-dir = {"" = "."} packages = ["rmm"] zip-safe = false diff --git a/python/setup.cfg b/python/setup.cfg deleted file mode 100644 index 6fa1ab727..000000000 --- a/python/setup.cfg +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2018-2021, NVIDIA CORPORATION. - -[options] -packages = find: -install_requires = - cuda-python>=11.5,<11.7.1 - numpy>=1.19 - numba>=0.49 -python_requires = >=3.8 diff --git a/python/setup.py b/python/setup.py index 4b59209dc..d2c5d7788 100644 --- a/python/setup.py +++ b/python/setup.py @@ -1,32 +1,5 @@ # Copyright (c) 2019-2022, NVIDIA CORPORATION. -from setuptools import find_packages from skbuild import setup -setup( - name="rmm", - version="23.04.00", - description="rmm - RAPIDS Memory Manager", - url="https://github.com/rapidsai/rmm", - author="NVIDIA Corporation", - license="Apache 2.0", - classifiers=[ - "Intended Audience :: Developers", - "Topic :: Database", - "Topic :: Scientific/Engineering", - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - ], - # Include the separately-compiled shared library - extras_require={"test": ["pytest"]}, - packages=find_packages(include=["rmm", "rmm.*"]), - install_requires=[ - "cuda-python>=11.7.1,<12.0", - "numpy>=1.19", - "numba>=0.49", - ], - zip_safe=False, -) +setup() From b95a4a26f3ad39a287f509902b9892b6837e0f8f Mon Sep 17 00:00:00 2001 From: jakirkham Date: Thu, 3 Nov 2022 18:54:42 -0700 Subject: [PATCH 06/24] Require `tomli` --- conda/environments/all_cuda-118_arch-x86_64.yaml | 1 + conda/recipes/rmm/meta.yaml | 1 + dependencies.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index 499f5dbec..a001756a2 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -19,4 +19,5 @@ dependencies: - python>=3.8,<3.11 - scikit-build>=0.13.1 - spdlog>=1.11.0,<1.12 +- tomli name: all_cuda-118_arch-x86_64 diff --git a/conda/recipes/rmm/meta.yaml b/conda/recipes/rmm/meta.yaml index 7cf116dc0..1ac172252 100644 --- a/conda/recipes/rmm/meta.yaml +++ b/conda/recipes/rmm/meta.yaml @@ -47,6 +47,7 @@ requirements: - python - scikit-build >=0.13.1 - setuptools + - tomli # [py<311] run: - cuda-python >=11.7.1,<12.0 - numba >=0.49 diff --git a/dependencies.yaml b/dependencies.yaml index 879892ba3..e6fde1b98 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -47,6 +47,7 @@ dependencies: - ninja - python>=3.8,<3.11 - scikit-build>=0.13.1 + - tomli - output_types: conda packages: - fmt>=9.1.0,<10 From f2bbd70fbceb25f97cab79089ec996cdb00de402 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 7 Nov 2022 17:20:55 -0800 Subject: [PATCH 07/24] Use setuptools package discovery --- python/pyproject.toml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index 96d261c14..02fe341c2 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -129,6 +129,10 @@ skip = [ [tool.setuptools] license-files = ["LICENSE"] -package-dir = {"" = "."} -packages = ["rmm"] zip-safe = false + +[tool.setuptools.packages.find] +include = [ + "rmm", + "rmm.*", +] From eafe8bd16ed88e0076a61302eaa5ac8fe9aabf06 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 7 Nov 2022 19:26:06 -0800 Subject: [PATCH 08/24] Move license file into `project` --- python/pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index 02fe341c2..86633e3cd 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -33,7 +33,7 @@ readme = { file = "README.md", content-type = "text/markdown" } authors = [ { name = "NVIDIA Corporation" }, ] -license = { text = "Apache 2.0" } +license = { file = "LICENSE" } requires-python = ">=3.8" dependencies = [ "cuda-python>=11.7.1,<12.0", @@ -128,7 +128,6 @@ skip = [ ] [tool.setuptools] -license-files = ["LICENSE"] zip-safe = false [tool.setuptools.packages.find] From 6b2ca6ab79b1e7f450c323be5d47318f7752a118 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 7 Nov 2022 19:28:27 -0800 Subject: [PATCH 09/24] Move setuptools options back to `setup.py` --- python/pyproject.toml | 9 --------- python/setup.py | 6 +++++- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index 86633e3cd..a1d2fcc3d 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -126,12 +126,3 @@ skip = [ "dist", "__init__.py", ] - -[tool.setuptools] -zip-safe = false - -[tool.setuptools.packages.find] -include = [ - "rmm", - "rmm.*", -] diff --git a/python/setup.py b/python/setup.py index d2c5d7788..e7c4087ac 100644 --- a/python/setup.py +++ b/python/setup.py @@ -1,5 +1,9 @@ # Copyright (c) 2019-2022, NVIDIA CORPORATION. +from setuptools import find_packages from skbuild import setup -setup() +setup( + packages=find_packages(include=["rmm", "rmm.*"]), + zip_safe=False, +) From 14743e6efa88175584d13cd667f55739af70f3e8 Mon Sep 17 00:00:00 2001 From: jakirkham Date: Mon, 7 Nov 2022 19:33:13 -0800 Subject: [PATCH 10/24] Keep license metadata & add license file in setup --- python/pyproject.toml | 2 +- python/setup.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index a1d2fcc3d..d5b95c0b1 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -33,7 +33,7 @@ readme = { file = "README.md", content-type = "text/markdown" } authors = [ { name = "NVIDIA Corporation" }, ] -license = { file = "LICENSE" } +license = { text = "Apache 2.0" } requires-python = ">=3.8" dependencies = [ "cuda-python>=11.7.1,<12.0", diff --git a/python/setup.py b/python/setup.py index e7c4087ac..c579c3c23 100644 --- a/python/setup.py +++ b/python/setup.py @@ -4,6 +4,7 @@ from skbuild import setup setup( + license_files=["LICENSE"], packages=find_packages(include=["rmm", "rmm.*"]), zip_safe=False, ) From 5c898b1df0ef69e68fc5901276d6010fd326d1f7 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 17 Feb 2023 12:20:44 -0800 Subject: [PATCH 11/24] Fix style. --- python/.flake8 | 1 - 1 file changed, 1 deletion(-) diff --git a/python/.flake8 b/python/.flake8 index 3e85b1a1e..4d610ba8e 100644 --- a/python/.flake8 +++ b/python/.flake8 @@ -22,4 +22,3 @@ per-file-ignores = *.pyx: E211, E225, E226, E227, E275, E402, E999, W504 *.pxd: E211, E225, E226, E227, E275, E402, E999, W504 *.pxi: E211, E225, E226, E227, E275, E402, E999, W504 - From 9bc840efdb036bf26a49ce1539592a54b47b0f7d Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 17 Feb 2023 12:59:08 -0800 Subject: [PATCH 12/24] Fix flake8 pre-commit dir. --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bb9400be4..55bdfd884 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,7 @@ repos: rev: 5.0.4 hooks: - id: flake8 - args: ["--config=python/setup.cfg"] + args: ["--config=python/.flake8"] files: python/.*$ types: [file] types_or: [python, cython] From ca8d8125da0711eca7d3ef43687d22fd6fb66e94 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 17 Feb 2023 13:03:04 -0800 Subject: [PATCH 13/24] Include top-level CMakeLists.txt. --- python/MANIFEST.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/MANIFEST.in b/python/MANIFEST.in index 61c15559c..053c2f2f9 100644 --- a/python/MANIFEST.in +++ b/python/MANIFEST.in @@ -3,7 +3,7 @@ recursive-include rmm *.pxd recursive-include rmm *.pyx # Build files -recursive-include rmm CMakeLists.txt +recursive-include . CMakeLists.txt # License include LICENSE From 6f0a1d2645c258e9089ef14e08983f6aa7c7a122 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 17 Feb 2023 13:08:02 -0800 Subject: [PATCH 14/24] Clean up sdist. --- python/MANIFEST.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/MANIFEST.in b/python/MANIFEST.in index 053c2f2f9..708e097ed 100644 --- a/python/MANIFEST.in +++ b/python/MANIFEST.in @@ -2,8 +2,9 @@ recursive-include rmm *.pxd recursive-include rmm *.pyx -# Build files -recursive-include . CMakeLists.txt +# Build files. Don't use a recursive include on '.' in case the repo is dirty +include . CMakeLists.txt +recursive-include rmm CMakeLists.txt # License include LICENSE From 868968dd62219a14cf44e07c69413ffdae64d39c Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 17 Feb 2023 13:54:30 -0800 Subject: [PATCH 15/24] Revert "Keep license metadata & add license file in setup" This reverts commit 14743e6efa88175584d13cd667f55739af70f3e8. --- python/pyproject.toml | 2 +- python/setup.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index d5b95c0b1..a1d2fcc3d 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -33,7 +33,7 @@ readme = { file = "README.md", content-type = "text/markdown" } authors = [ { name = "NVIDIA Corporation" }, ] -license = { text = "Apache 2.0" } +license = { file = "LICENSE" } requires-python = ">=3.8" dependencies = [ "cuda-python>=11.7.1,<12.0", diff --git a/python/setup.py b/python/setup.py index c579c3c23..e7c4087ac 100644 --- a/python/setup.py +++ b/python/setup.py @@ -4,7 +4,6 @@ from skbuild import setup setup( - license_files=["LICENSE"], packages=find_packages(include=["rmm", "rmm.*"]), zip_safe=False, ) From 691e3f8573ae7c15539806f3efb51d53894c84b8 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 17 Feb 2023 13:54:35 -0800 Subject: [PATCH 16/24] Revert "Move setuptools options back to `setup.py`" This reverts commit 6b2ca6ab79b1e7f450c323be5d47318f7752a118. --- python/pyproject.toml | 9 +++++++++ python/setup.py | 6 +----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index a1d2fcc3d..86633e3cd 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -126,3 +126,12 @@ skip = [ "dist", "__init__.py", ] + +[tool.setuptools] +zip-safe = false + +[tool.setuptools.packages.find] +include = [ + "rmm", + "rmm.*", +] diff --git a/python/setup.py b/python/setup.py index e7c4087ac..d2c5d7788 100644 --- a/python/setup.py +++ b/python/setup.py @@ -1,9 +1,5 @@ # Copyright (c) 2019-2022, NVIDIA CORPORATION. -from setuptools import find_packages from skbuild import setup -setup( - packages=find_packages(include=["rmm", "rmm.*"]), - zip_safe=False, -) +setup() From b27f348c9ec1bbc82bc5f711be1fc1b6f18f3713 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 17 Feb 2023 14:00:24 -0800 Subject: [PATCH 17/24] Require sufficiently new setuptools for PEP 621 support. --- conda/recipes/rmm/meta.yaml | 2 +- python/pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conda/recipes/rmm/meta.yaml b/conda/recipes/rmm/meta.yaml index 1ac172252..b816e24c5 100644 --- a/conda/recipes/rmm/meta.yaml +++ b/conda/recipes/rmm/meta.yaml @@ -46,7 +46,7 @@ requirements: - librmm ={{ version }} - python - scikit-build >=0.13.1 - - setuptools + - setuptools >=61.0.0 - tomli # [py<311] run: - cuda-python >=11.7.1,<12.0 diff --git a/python/pyproject.toml b/python/pyproject.toml index 86633e3cd..b3420b5b6 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -16,7 +16,7 @@ build-backend = "setuptools.build_meta:__legacy__" requires = [ "wheel", - "setuptools", + "setuptools>=61.0.0", "cython>=0.29,<0.30", "scikit-build>=0.13.1", "cmake>=3.23.1,!=3.25.0", From 47d0bbbee90fc12492a462f5a59ac531b35b5cea Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 17 Feb 2023 14:00:47 -0800 Subject: [PATCH 18/24] Stop using legacy build_meta now that we have removed versioneer. --- python/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index b3420b5b6..c1d503cb5 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -13,7 +13,7 @@ # limitations under the License. [build-system] -build-backend = "setuptools.build_meta:__legacy__" +build-backend = "setuptools.build_meta" requires = [ "wheel", "setuptools>=61.0.0", From ccc313cb207672deca6b94ba685d8190ef4f0b1f Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 17 Feb 2023 14:21:34 -0800 Subject: [PATCH 19/24] Put find back into setup.py for now. --- python/pyproject.toml | 6 ------ python/setup.py | 5 ++++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index c1d503cb5..02a51a089 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -129,9 +129,3 @@ skip = [ [tool.setuptools] zip-safe = false - -[tool.setuptools.packages.find] -include = [ - "rmm", - "rmm.*", -] diff --git a/python/setup.py b/python/setup.py index d2c5d7788..bf60268a6 100644 --- a/python/setup.py +++ b/python/setup.py @@ -1,5 +1,8 @@ # Copyright (c) 2019-2022, NVIDIA CORPORATION. +from setuptools import find_packages from skbuild import setup -setup() +setup( + packages=find_packages(include=["rmm", "rmm.*"]), +) From a786ed6a4a7603c41931295d84486e6bc22cbcf2 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 17 Feb 2023 14:23:34 -0800 Subject: [PATCH 20/24] Update wheel modification script. --- ci/release/apply_wheel_modifications.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/release/apply_wheel_modifications.sh b/ci/release/apply_wheel_modifications.sh index c981cd162..820f6fdd2 100755 --- a/ci/release/apply_wheel_modifications.sh +++ b/ci/release/apply_wheel_modifications.sh @@ -7,6 +7,6 @@ VERSION=${1} CUDA_SUFFIX=${2} sed -i "s/__version__ = .*/__version__ = \"${VERSION}\"/g" python/rmm/__init__.py -sed -i "s/version=.*,/version=\"${VERSION}\",/g" python/setup.py +sed -i "s/^version = .*/version = \"${VERSION}\"/g" python/pyproject.toml -sed -i "s/name=\"rmm\",/name=\"rmm${CUDA_SUFFIX}\",/g" python/setup.py +sed -i "s/^name = \"rmm\"/name = \"rmm${CUDA_SUFFIX}\"/g" python/pyproject.toml From 6e5c2d03f0aa23066d5698fff8ba6b6064632f99 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Fri, 17 Feb 2023 17:31:51 -0800 Subject: [PATCH 21/24] Apply suggestions from code review Co-authored-by: jakirkham --- python/pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index 02a51a089..2078955c3 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -33,7 +33,7 @@ readme = { file = "README.md", content-type = "text/markdown" } authors = [ { name = "NVIDIA Corporation" }, ] -license = { file = "LICENSE" } +license = { text = "Apache 2.0" } requires-python = ">=3.8" dependencies = [ "cuda-python>=11.7.1,<12.0", @@ -128,4 +128,5 @@ skip = [ ] [tool.setuptools] +license-files = ["LICENSE"] zip-safe = false From dc88c49cb7d687d8be34dabeb0ddbd75a87fa4cd Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Tue, 21 Feb 2023 10:28:19 -0800 Subject: [PATCH 22/24] Update script doc. --- ci/release/apply_wheel_modifications.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/release/apply_wheel_modifications.sh b/ci/release/apply_wheel_modifications.sh index 820f6fdd2..90472d869 100755 --- a/ci/release/apply_wheel_modifications.sh +++ b/ci/release/apply_wheel_modifications.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright (c) 2023, NVIDIA CORPORATION. # -# Usage: bash apply_wheel_modifications.sh +# Usage: bash apply_wheel_modifications.sh VERSION=${1} CUDA_SUFFIX=${2} From cb02e415d5013454389ed8a07dd95079e8f1730c Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 22 Feb 2023 10:18:18 -0800 Subject: [PATCH 23/24] Address PR comments. --- python/pyproject.toml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index 2078955c3..d4b12b57c 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -47,7 +47,6 @@ classifiers = [ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", ] @@ -87,18 +86,6 @@ include_trailing_comma = true force_grid_wrap = 0 combine_as_imports = true order_by_type = true -known_dask = [ - "dask", - "distributed", - "dask_cuda", -] -known_rapids = [ - "nvtext", - "cudf", - "cuml", - "cugraph", - "dask_cudf", -] known_first_party = [ "rmm", ] From f3525e104a2250f0a9006785360fb40cab6d12a9 Mon Sep 17 00:00:00 2001 From: Vyas Ramasubramani Date: Wed, 22 Feb 2023 10:24:19 -0800 Subject: [PATCH 24/24] Also remove sections. --- python/pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index d4b12b57c..e05a2e73d 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -94,8 +94,6 @@ sections = [ "FUTURE", "STDLIB", "THIRDPARTY", - "DASK", - "RAPIDS", "FIRSTPARTY", "LOCALFOLDER", ]