diff --git a/setup.cfg b/.flake8 similarity index 100% rename from setup.cfg rename to .flake8 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 585659aaa57..a5d5a00ba08 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: rev: 6.0.0 hooks: - id: flake8 - args: ["--config=setup.cfg"] + args: ["--config=.flake8"] files: python/.*$ types: [file] types_or: [python] # TODO: Enable [python, cython] diff --git a/ci/release/apply_wheel_modifications.sh b/ci/release/apply_wheel_modifications.sh index 81e49745c22..85b7778391c 100755 --- a/ci/release/apply_wheel_modifications.sh +++ b/ci/release/apply_wheel_modifications.sh @@ -16,32 +16,24 @@ sed -i "s/__version__ = .*/__version__ = \"${VERSION}\"/g" \ python/pylibcugraph/pylibcugraph/__init__.py # setup.py updates -sed -i "s/version=.*,/version=\"${VERSION}\",/g" \ - python/cugraph/setup.py \ - python/cugraph-dgl/setup.py \ - python/cugraph-pyg/setup.py \ - python/cugraph-service/client/setup.py \ - python/cugraph-service/server/setup.py \ - python/pylibcugraph/setup.py +sed -i "s/^version = .*/version = \"${VERSION}\"/g" \ + python/cugraph/pyproject.toml \ + python/cugraph-dgl/pyproject.toml \ + python/cugraph-pyg/pyproject.toml \ + python/cugraph-service/client/pyproject.toml \ + python/cugraph-service/server/pyproject.toml \ + python/pylibcugraph/pyproject.toml -# pylibcugraph setup.py cuda suffixes -sed -i "s/name=\"pylibcugraph\"/name=\"pylibcugraph${CUDA_SUFFIX}\"/g" python/pylibcugraph/setup.py -sed -i "s/rmm/rmm${CUDA_SUFFIX}/g" python/pylibcugraph/setup.py -sed -i "s/pylibraft/pylibraft${CUDA_SUFFIX}/g" python/pylibcugraph/setup.py -sed -i "s/cudf/cudf${CUDA_SUFFIX}/g" python/pylibcugraph/setup.py - -# cugraph setup.py cuda suffixes -sed -i "s/name=\"cugraph\"/name=\"cugraph${CUDA_SUFFIX}\"/g" python/cugraph/setup.py -sed -i "s/rmm/rmm${CUDA_SUFFIX}/g" python/cugraph/setup.py -sed -i "s/cudf/cudf${CUDA_SUFFIX}/g" python/cugraph/setup.py -sed -i "s/raft-dask/raft-dask${CUDA_SUFFIX}/g" python/cugraph/setup.py -sed -i "s/pylibcugraph/pylibcugraph${CUDA_SUFFIX}/g" python/cugraph/setup.py - -# Dependency versions in pylibcugraph pyproject.toml +# pylibcugraph pyproject.toml cuda suffixes +sed -i "s/name = \"pylibcugraph\"/name = \"pylibcugraph${CUDA_SUFFIX}\"/g" python/pylibcugraph/pyproject.toml sed -i "s/rmm/rmm${CUDA_SUFFIX}/g" python/pylibcugraph/pyproject.toml sed -i "s/pylibraft/pylibraft${CUDA_SUFFIX}/g" python/pylibcugraph/pyproject.toml +sed -i "s/cudf/cudf${CUDA_SUFFIX}/g" python/pylibcugraph/pyproject.toml -# Dependency versions in cugraph pyproject.toml +# cugraph pyproject.toml cuda suffixes +sed -i "s/name = \"cugraph\"/name = \"cugraph${CUDA_SUFFIX}\"/g" python/cugraph/pyproject.toml sed -i "s/rmm/rmm${CUDA_SUFFIX}/g" python/cugraph/pyproject.toml -sed -i "s/pylibraft/pylibraft${CUDA_SUFFIX}/g" python/cugraph/pyproject.toml +sed -i "s/cudf/cudf${CUDA_SUFFIX}/g" python/cugraph/pyproject.toml +sed -i "s/raft-dask/raft-dask${CUDA_SUFFIX}/g" python/cugraph/pyproject.toml sed -i "s/pylibcugraph/pylibcugraph${CUDA_SUFFIX}/g" python/cugraph/pyproject.toml +sed -i "s/pylibraft/pylibraft${CUDA_SUFFIX}/g" python/cugraph/pyproject.toml diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 88305cd568b..a221cdea51e 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -56,19 +56,19 @@ sed_runner 's/release = .*/release = '"'${NEXT_FULL_TAG}'"'/g' docs/cugraph/sour # Python __init__.py updates sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/cugraph/cugraph/__init__.py -sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/cugraph-dgl/cugraph-dgl/__init__.py -sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/cugraph-pyg/cugraph-pyg/__init__.py +sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/cugraph-dgl/cugraph_dgl/__init__.py +sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/cugraph-pyg/cugraph_pyg/__init__.py sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/cugraph-service/client/cugraph_service_client/__init__.py sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/cugraph-service/server/cugraph_service_server/__init__.py sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/pylibcugraph/pylibcugraph/__init__.py -# Python setup.py updates -sed_runner "s/version=.*,/version=\"${NEXT_FULL_TAG}\",/g" python/cugraph/setup.py -sed_runner "s/version=.*,/version=\"${NEXT_FULL_TAG}\",/g" python/cugraph-dgl/setup.py -sed_runner "s/version=.*,/version=\"${NEXT_FULL_TAG}\",/g" python/cugraph-pyg/setup.py -sed_runner "s/version=.*,/version=\"${NEXT_FULL_TAG}\",/g" python/cugraph-service/client/setup.py -sed_runner "s/version=.*,/version=\"${NEXT_FULL_TAG}\",/g" python/cugraph-service/server/setup.py -sed_runner "s/version=.*,/version=\"${NEXT_FULL_TAG}\",/g" python/pylibcugraph/setup.py +# Python pyproject.toml updates +sed_runner "s/^version = .*/version = \"${NEXT_FULL_TAG}\"/g" python/cugraph/pyproject.toml +sed_runner "s/^version = .*/version = \"${NEXT_FULL_TAG}\"/g" python/cugraph-dgl/pyproject.toml +sed_runner "s/^version = .*/version = \"${NEXT_FULL_TAG}\"/g" python/cugraph-pyg/pyproject.toml +sed_runner "s/^version = .*/version = \"${NEXT_FULL_TAG}\"/g" python/cugraph-service/client/pyproject.toml +sed_runner "s/^version = .*/version = \"${NEXT_FULL_TAG}\"/g" python/cugraph-service/server/pyproject.toml +sed_runner "s/^version = .*/version = \"${NEXT_FULL_TAG}\"/g" python/pylibcugraph/pyproject.toml for FILE in conda/environments/*.yaml dependencies.yaml; do sed_runner "s/libcugraphops=${CURRENT_SHORT_TAG}/libcugraphops=${NEXT_SHORT_TAG}/g" ${FILE}; @@ -106,7 +106,13 @@ done NEXT_SHORT_TAG_PEP440=$(python -c "from setuptools.extern import packaging; print(packaging.version.Version('${NEXT_SHORT_TAG}'))") # Wheel builds install intra-RAPIDS dependencies from same release -sed_runner "s/{cuda_suffix}[^\"].*\",/{cuda_suffix}==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/pylibcugraph/setup.py -sed_runner "s/{cuda_suffix}.*\",/{cuda_suffix}==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/pylibcugraph/_custom_build/backend.py -sed_runner "s/{cuda_suffix}[^\"].*\",/{cuda_suffix}==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/cugraph/setup.py -sed_runner "s/{cuda_suffix}.*\",/{cuda_suffix}==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/cugraph/_custom_build/backend.py +sed_runner "s/rmm==.*\",/rmm==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/cugraph/pyproject.toml +sed_runner "s/pylibraft==.*\",/pylibraft==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/cugraph/pyproject.toml +sed_runner "s/pylibcugraph==.*\",/pylibcugraph==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/cugraph/pyproject.toml +sed_runner "s/raft-dask==.*\",/raft-dask==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/cugraph/pyproject.toml +sed_runner "s/cudf==.*\",/cudf==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/cugraph/pyproject.toml +sed_runner "s/dask-cuda==.*\",/dask-cuda==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/cugraph/pyproject.toml + +sed_runner "s/rmm==.*\",/rmm==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/pylibcugraph/pyproject.toml +sed_runner "s/pylibraft==.*\",/pylibraft==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/pylibcugraph/pyproject.toml +sed_runner "s/cudf==.*\",/cudf==${NEXT_SHORT_TAG_PEP440}.*\",/g" python/pylibcugraph/pyproject.toml diff --git a/conda/recipes/cugraph-service/install_cugraph-service-client.sh b/conda/recipes/cugraph-service/install_cugraph-service-client.sh index a8b8cc74358..318e9800a76 100644 --- a/conda/recipes/cugraph-service/install_cugraph-service-client.sh +++ b/conda/recipes/cugraph-service/install_cugraph-service-client.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2022, NVIDIA CORPORATION. +# Copyright (c) 2022-2023, NVIDIA CORPORATION. # This assumes the script is executed from the root of the repo directory @@ -13,6 +13,6 @@ cd "${SRC_DIR}/python/cugraph-service/client" mkdir -p pip_cache -$PYTHON -m pip install --no-index --no-deps --ignore-installed --cache-dir ./pip_cache . -vv +$PYTHON -m pip install --no-build-isolation --no-index --no-deps --ignore-installed --cache-dir ./pip_cache . -vv #./build.sh cugraph-service diff --git a/conda/recipes/cugraph-service/install_cugraph-service-server.sh b/conda/recipes/cugraph-service/install_cugraph-service-server.sh index 518a57f1b40..2dcae7c379b 100644 --- a/conda/recipes/cugraph-service/install_cugraph-service-server.sh +++ b/conda/recipes/cugraph-service/install_cugraph-service-server.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (c) 2022, NVIDIA CORPORATION. +# Copyright (c) 2022-2023, NVIDIA CORPORATION. # This assumes the script is executed from the root of the repo directory @@ -13,6 +13,6 @@ cd "${SRC_DIR}/python/cugraph-service/server" mkdir -p pip_cache -$PYTHON -m pip install --no-index --no-deps --ignore-installed --cache-dir ./pip_cache . -vv +$PYTHON -m pip install --no-build-isolation --no-index --no-deps --ignore-installed --cache-dir ./pip_cache . -vv #./build.sh cugraph-service diff --git a/conda/recipes/cugraph-service/meta.yaml b/conda/recipes/cugraph-service/meta.yaml index f1b078b92e5..4215c57e16a 100644 --- a/conda/recipes/cugraph-service/meta.yaml +++ b/conda/recipes/cugraph-service/meta.yaml @@ -48,6 +48,8 @@ outputs: host: - pip - python x.x + - setuptools + - wheel run: - {{ pin_subpackage('cugraph-service-client', exact=True) }} - cudf ={{ minor_version }} diff --git a/python/cugraph-dgl/LICENSE b/python/cugraph-dgl/LICENSE new file mode 120000 index 00000000000..30cff7403da --- /dev/null +++ b/python/cugraph-dgl/LICENSE @@ -0,0 +1 @@ +../../LICENSE \ No newline at end of file diff --git a/python/cugraph-dgl/README.MD b/python/cugraph-dgl/README.md similarity index 100% rename from python/cugraph-dgl/README.MD rename to python/cugraph-dgl/README.md diff --git a/python/cugraph-dgl/pyproject.toml b/python/cugraph-dgl/pyproject.toml new file mode 100644 index 00000000000..9a2acc568bd --- /dev/null +++ b/python/cugraph-dgl/pyproject.toml @@ -0,0 +1,40 @@ +# Copyright (c) 2023, NVIDIA CORPORATION. + +[build-system] + +requires = [ + "setuptools", +] +build-backend = "setuptools.build_meta" + +[project] +name = "cugraph-dgl" +version = "23.04.00" +description = "cugraph extensions for DGL" +readme = { file = "README.md", content-type = "text/markdown" } +authors = [ + { name = "NVIDIA Corporation" }, +] +license = { text = "Apache 2.0" } +requires-python = ">=3.8" +dependencies = [ + "cugraph", + "numba>=0.56.2", + "numpy", +] +classifiers = [ + "Intended Audience :: Developers", + "Programming Language :: Python", +] + +[project.urls] +Homepage = "https://github.com/rapidsai/cugraph" +Documentation = "https://docs.rapids.ai/api/cugraph/stable/" + +[tool.setuptools] +license-files = ["LICENSE"] + +[tool.setuptools.packages.find] +include = [ + "cugraph_dgl*", +] diff --git a/python/cugraph-dgl/setup.py b/python/cugraph-dgl/setup.py index d7d0b098149..6991b23b0fb 100644 --- a/python/cugraph-dgl/setup.py +++ b/python/cugraph-dgl/setup.py @@ -11,26 +11,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from setuptools import find_packages, setup +from setuptools import setup -install_requires = [ - "cugraph", - "numba>=0.56.2", - "numpy", -] - -setup( - name="cugraph-dgl", - description="cugraph wrappers around DGL", - version="23.04.00", - classifiers=[ - "Intended Audience :: Developers", - "Programming Language :: Python", - ], - author="NVIDIA Corporation", - url="https://github.com/rapidsai/cugraph", - packages=find_packages(include=["cugraph_dgl*"]), - install_requires=install_requires, - license="Apache", - zip_safe=True, -) +setup() diff --git a/python/cugraph-pyg/LICENSE b/python/cugraph-pyg/LICENSE new file mode 120000 index 00000000000..30cff7403da --- /dev/null +++ b/python/cugraph-pyg/LICENSE @@ -0,0 +1 @@ +../../LICENSE \ No newline at end of file diff --git a/python/cugraph-pyg/pyproject.toml b/python/cugraph-pyg/pyproject.toml index f98fb20fa08..aded4c579f9 100644 --- a/python/cugraph-pyg/pyproject.toml +++ b/python/cugraph-pyg/pyproject.toml @@ -5,6 +5,36 @@ requires = [ "wheel", "setuptools", - "scikit-build>=0.13.1", - "ninja", +] + +[tool.pytest.ini_options] +testpaths = ["cugraph_pyg/tests"] + +[project] +name = "cugraph_pyg" +version = "23.04.00" +description = "cugraph_pyg - PyG support for cuGraph massive-scale, ultra-fast GPU graph analytics." +authors = [ + { name = "NVIDIA Corporation" }, +] +license = { text = "Apache 2.0" } +requires-python = ">=3.8" +classifiers = [ + "Intended Audience :: Developers", + "Programming Language :: Python", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.10", +] + +[project.urls] +Homepage = "https://github.com/rapidsai/cugraph" +Documentation = "https://docs.rapids.ai/api/cugraph/stable/" + +[tool.setuptools] +license-files = ["LICENSE"] + +[tool.setuptools.packages.find] +include = [ + "cugraph_pyg*", + "cugraph_pyg.*", ] diff --git a/python/cugraph-pyg/setup.cfg b/python/cugraph-pyg/setup.cfg deleted file mode 100644 index 746f9f398c2..00000000000 --- a/python/cugraph-pyg/setup.cfg +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2022-2023, NVIDIA CORPORATION. -# Licensed 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. - -[tool:pytest] -testpaths = cugraph_pyg/tests diff --git a/python/cugraph-pyg/setup.py b/python/cugraph-pyg/setup.py index 360e56c933e..1f7db1d3772 100644 --- a/python/cugraph-pyg/setup.py +++ b/python/cugraph-pyg/setup.py @@ -14,14 +14,11 @@ import os import shutil -from setuptools import find_packages, Command -from skbuild import setup +from setuptools import Command, setup from setuputils import get_environment_option -INSTALL_REQUIRES = [] - CUDA_HOME = get_environment_option("CUDA_HOME") if not CUDA_HOME: @@ -60,35 +57,8 @@ def run(self): os.system("rm -rf dask-worker-space") os.system('find . -name "__pycache__" -type d -exec rm -rf {} +') os.system("rm -rf *.egg-info") - os.system("rm -rf _skbuild") - - -# FIXME possibly remove this since there is no Cython code in cugraph_pyg -PACKAGE_DATA = {key: ["*.pxd"] for key in find_packages(include=["cugraph_pyg*"])} setup( - name="cugraph_pyg", - description="cugraph_pyg - PyG support for cuGraph massive-scale," - " ultra-fast GPU graph analytics.", - version="23.04.00", - classifiers=[ - # "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - # "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - ], - # Include the separately-compiled shared library - author="NVIDIA Corporation", - setup_requires=[], - packages=find_packages(include=["cugraph_pyg", "cugraph_pyg.*"]), - package_data=PACKAGE_DATA, - include_package_data=True, - install_requires=INSTALL_REQUIRES, - license="Apache", cmdclass={"clean": CleanCommand}, - zip_safe=False, ) diff --git a/python/cugraph-service/client/LICENSE b/python/cugraph-service/client/LICENSE new file mode 120000 index 00000000000..5853aaea53b --- /dev/null +++ b/python/cugraph-service/client/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/python/cugraph-service/client/README.md b/python/cugraph-service/client/README.md new file mode 120000 index 00000000000..32d46ee883b --- /dev/null +++ b/python/cugraph-service/client/README.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file diff --git a/python/cugraph-service/client/pyproject.toml b/python/cugraph-service/client/pyproject.toml new file mode 100644 index 00000000000..9e3b6b8f920 --- /dev/null +++ b/python/cugraph-service/client/pyproject.toml @@ -0,0 +1,41 @@ +# Copyright (c) 2022, NVIDIA CORPORATION. + +[build-system] + +requires = [ + "wheel", + "setuptools", +] +build-backend = "setuptools.build_meta" + +[project] +name = "cugraph-service-client" +version = "23.04.00" +description = "cuGraph Service client" +readme = { file = "README.md", content-type = "text/markdown" } +authors = [ + { name = "NVIDIA Corporation" }, +] +license = { text = "Apache 2.0" } +requires-python = ">=3.8" +dependencies = [ + "thriftpy2", +] +classifiers = [ + "Intended Audience :: Developers", + "Programming Language :: Python", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.10", +] + +[project.urls] +Homepage = "https://github.com/rapidsai/cugraph" +Documentation = "https://docs.rapids.ai/api/cugraph/stable/" + +[tool.setuptools] +license-files = ["LICENSE"] + +[tool.setuptools.packages.find] +include = [ + "cugraph_service_client", +] diff --git a/python/cugraph-service/client/setup.py b/python/cugraph-service/client/setup.py index eddcc7ee7af..811a12c50b7 100644 --- a/python/cugraph-service/client/setup.py +++ b/python/cugraph-service/client/setup.py @@ -11,24 +11,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from setuptools import setup, find_packages +from setuptools import setup -install_requires = [ - "thriftpy2", -] - -setup( - name="cugraph-service-client", - description="cuGraph Service client", - version="23.04.00", - classifiers=[ - "Intended Audience :: Developers", - "Programming Language :: Python", - ], - author="NVIDIA Corporation", - url="https://github.com/rapidsai/cugraph", - packages=find_packages(include=["cugraph_service_client"]), - install_requires=install_requires, - license="Apache", - zip_safe=True, -) +setup() diff --git a/python/cugraph-service/server/LICENSE b/python/cugraph-service/server/LICENSE new file mode 120000 index 00000000000..5853aaea53b --- /dev/null +++ b/python/cugraph-service/server/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/python/cugraph-service/server/README.md b/python/cugraph-service/server/README.md new file mode 120000 index 00000000000..32d46ee883b --- /dev/null +++ b/python/cugraph-service/server/README.md @@ -0,0 +1 @@ +../README.md \ No newline at end of file diff --git a/python/cugraph-service/server/pyproject.toml b/python/cugraph-service/server/pyproject.toml new file mode 100644 index 00000000000..4260bb74889 --- /dev/null +++ b/python/cugraph-service/server/pyproject.toml @@ -0,0 +1,69 @@ +# Copyright (c) 2022, NVIDIA CORPORATION. + +[build-system] + +requires = [ + "wheel", + "setuptools", +] +build-backend = "setuptools.build_meta" + +[project] +name = "cugraph-service-server" +version = "23.04.00" +description = "cuGraph Service server" +readme = { file = "README.md", content-type = "text/markdown" } +authors = [ + { name = "NVIDIA Corporation" }, +] +license = { text = "Apache 2.0" } +requires-python = ">=3.8" +dependencies = [ + "cudf", + "cugraph", + "cugraph-service-client", + "cupy-cuda11x", + "dask-cuda", + "dask-cudf", + "distributed >=2023.1.1", + "numpy", + "rmm", + "thriftpy2", + "ucx-py", +] +classifiers = [ + "Intended Audience :: Developers", + "Programming Language :: Python", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.10", +] +dynamic = ["entry-points"] + +[project.optional-dependencies] +test = [ + "pytest", + "pytest-xdist", + "pytest-benchmark", + "scipy", + "numpy", + "pandas", + "networkx>=2.5.1", + "scikit-learn>=0.23.1", + "python-louvain", + # cudf will use fsspec but is protocol independent. cugraph tests + # specifically require http for the test files it asks cudf to read. + "fsspec[http]>=0.6.0", +] + +[project.urls] +Homepage = "https://github.com/rapidsai/cugraph" +Documentation = "https://docs.rapids.ai/api/cugraph/stable/" + +[tool.setuptools] +license-files = ["LICENSE"] + +[tool.setuptools.packages.find] +include = [ + "cugraph_service_server", + "cugraph_service_server.*" +] diff --git a/python/cugraph-service/server/setup.py b/python/cugraph-service/server/setup.py index ea34fdb7a33..5203b76c659 100644 --- a/python/cugraph-service/server/setup.py +++ b/python/cugraph-service/server/setup.py @@ -11,41 +11,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -from setuptools import setup, find_packages - -install_requires = [ - "cudf", - "cugraph", - "cugraph-service-client", - "cupy-cuda11x", - "dask-cuda", - "dask-cudf", - "distributed >=2023.1.1", - "numpy", - "rmm", - "thriftpy2", - "ucx-py", -] +from setuptools import setup setup( - name="cugraph-service-server", - description="cuGraph Service server", - version="23.04.00", - classifiers=[ - "Intended Audience :: Developers", - "Programming Language :: Python", - ], - author="NVIDIA Corporation", - url="https://github.com/rapidsai/cugraph", - packages=find_packages( - include=["cugraph_service_server", "cugraph_service_server.*"] - ), entry_points={ "console_scripts": [ "cugraph-service-server=cugraph_service_server.__main__:main" ], }, - install_requires=install_requires, - license="Apache", - zip_safe=True, ) diff --git a/python/cugraph/MANIFEST.in b/python/cugraph/MANIFEST.in index 5bb29b0fcbd..e34213029e3 100644 --- a/python/cugraph/MANIFEST.in +++ b/python/cugraph/MANIFEST.in @@ -1,2 +1,11 @@ +# Cython files +recursive-include cudf *.pxd +recursive-include cudf *.pyx + +# Build files. Don't use a recursive include on '.' in case the repo is dirty +include . CMakeLists.txt +recursive-include cudf CMakeLists.txt + +# Testing datasets include cugraph/experimental/datasets/*.yaml include cugraph/experimental/datasets/metadata/*.yaml diff --git a/python/cugraph/README.md b/python/cugraph/README.md new file mode 120000 index 00000000000..fe840054137 --- /dev/null +++ b/python/cugraph/README.md @@ -0,0 +1 @@ +../../README.md \ No newline at end of file diff --git a/python/cugraph/pyproject.toml b/python/cugraph/pyproject.toml index 3e611f00c09..b9939f62232 100644 --- a/python/cugraph/pyproject.toml +++ b/python/cugraph/pyproject.toml @@ -14,3 +14,56 @@ requires = [ "pylibcugraph==23.4.*", ] build-backend = "setuptools.build_meta" + +[tool.pytest.ini_options] +testpaths = ["cugraph/tests"] + +[project] +name = "cugraph" +version = "23.04.00" +description = "cuGraph - RAPIDS GPU Graph Analytics" +readme = { file = "README.md", content-type = "text/markdown" } +authors = [ + { name = "NVIDIA Corporation" }, +] +license = { text = "Apache 2.0" } +requires-python = ">=3.8" +dependencies = [ + "numba", + "dask-cuda==23.4.*", + "rmm==23.4.*", + "cudf==23.4.*", + "raft-dask==23.4.*", + "dask-cudf==23.4.*", + "pylibcugraph==23.4.*", + "cupy-cuda11x", +] +classifiers = [ + "Intended Audience :: Developers", + "Programming Language :: Python", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.10", +] + +[project.optional-dependencies] +test = [ + "pytest", + "pytest-xdist", + "pytest-benchmark", + "scipy", + "numpy", + "pandas", + "networkx>=2.5.1", + "scikit-learn>=0.23.1", + "python-louvain", + # cudf will use fsspec but is protocol independent. cugraph tests + # specifically require http for the test files it asks cudf to read. + "fsspec[http]>=0.6.0", +] + +[project.urls] +Homepage = "https://github.com/rapidsai/cugraph" +Documentation = "https://docs.rapids.ai/api/cugraph/stable/" + +[tool.setuptools] +license-files = ["LICENSE"] diff --git a/python/cugraph/setup.cfg b/python/cugraph/setup.cfg deleted file mode 100644 index cfe0f0d71d8..00000000000 --- a/python/cugraph/setup.cfg +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2018-2023, NVIDIA CORPORATION. -# Licensed 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. - -[tool:pytest] -testpaths = cugraph/tests diff --git a/python/cugraph/setup.py b/python/cugraph/setup.py index a509ccdbf75..1c3cf44fe3c 100644 --- a/python/cugraph/setup.py +++ b/python/cugraph/setup.py @@ -17,35 +17,6 @@ from skbuild import setup -INSTALL_REQUIRES = [ - "numba", - "dask-cuda==23.4.*", - "rmm==23.4.*", - "cudf==23.4.*", - "raft-dask==23.4.*", - "dask-cudf==23.4.*", - "pylibcugraph==23.4.*", - "cupy-cuda11x", -] - -extras_require = { - "test": [ - "pytest", - "pytest-xdist", - "pytest-benchmark", - "scipy", - "numpy", - "pandas", - "networkx>=2.5.1", - "scikit-learn>=0.23.1", - "python-louvain", - # cudf will use fsspec but is protocol independent. cugraph tests - # specifically require http for the test files it asks cudf to read. - "fsspec[http]>=0.6.0", - ] -} - - class CleanCommand(Command): """Custom clean command to tidy up the project root.""" @@ -72,37 +43,9 @@ def run(self): os.system("rm -rf _skbuild") -PACKAGE_DATA = {key: ["*.pxd"] for key in find_packages(include=["cugraph*"])} - -PACKAGE_DATA["cugraph.experimental.datasets"].extend( - [ - "cugraph/experimental/datasets/metadata/*.yaml", - "cugraph/experimental/datasets/*.yaml", - ] -) - - setup( - name="cugraph", - description="cuGraph - RAPIDS GPU Graph Analytics", - version="23.04.00", - classifiers=[ - # "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - # "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - ], - # Include the separately-compiled shared library - author="NVIDIA Corporation", packages=find_packages(include=["cugraph", "cugraph.*"]), - package_data=PACKAGE_DATA, include_package_data=True, - install_requires=INSTALL_REQUIRES, - license="Apache 2.0", cmdclass={"clean": CleanCommand}, zip_safe=False, - extras_require=extras_require, ) diff --git a/python/pylibcugraph/MANIFEST.in b/python/pylibcugraph/MANIFEST.in new file mode 100644 index 00000000000..62b6e992132 --- /dev/null +++ b/python/pylibcugraph/MANIFEST.in @@ -0,0 +1,7 @@ +# Cython files +recursive-include cudf *.pxd +recursive-include cudf *.pyx + +# Build files. Don't use a recursive include on '.' in case the repo is dirty +include . CMakeLists.txt +recursive-include cudf CMakeLists.txt diff --git a/python/pylibcugraph/README.md b/python/pylibcugraph/README.md new file mode 120000 index 00000000000..fe840054137 --- /dev/null +++ b/python/pylibcugraph/README.md @@ -0,0 +1 @@ +../../README.md \ No newline at end of file diff --git a/python/pylibcugraph/pyproject.toml b/python/pylibcugraph/pyproject.toml index c15578dede0..f13f89e75be 100644 --- a/python/pylibcugraph/pyproject.toml +++ b/python/pylibcugraph/pyproject.toml @@ -13,3 +13,46 @@ requires = [ "pylibraft==23.4.*", ] build-backend = "setuptools.build_meta" + +[tool.pytest.ini_options] +testpaths = ["pylibcugraph/tests"] + +[project] +name = "pylibcugraph" +version = "23.04.00" +description = "pylibcugraph - Python bindings for the libcugraph cuGraph C/C++/CUDA library" +readme = { file = "README.md", content-type = "text/markdown" } +authors = [ + { name = "NVIDIA Corporation" }, +] +license = { text = "Apache 2.0" } +requires-python = ">=3.8" +dependencies = [ + "pylibraft==23.4.*", + "rmm==23.4.*", +] +classifiers = [ + "Intended Audience :: Developers", + "Programming Language :: Python", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.10", +] + +[project.optional-dependencies] +test = [ + "pytest", + "pytest-xdist", + "pytest-benchmark", + "scipy", + "pandas", + "numpy", + "networkx>=2.5.1", + "cudf==23.4.*", +] + +[project.urls] +Homepage = "https://github.com/rapidsai/cugraph" +Documentation = "https://docs.rapids.ai/api/cugraph/stable/" + +[tool.setuptools] +license-files = ["LICENSE"] diff --git a/python/pylibcugraph/setup.cfg b/python/pylibcugraph/setup.cfg deleted file mode 100644 index 58b70f1b96c..00000000000 --- a/python/pylibcugraph/setup.cfg +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2021-2023, NVIDIA CORPORATION. -# Licensed 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. - -[tool:pytest] -testpaths = pylibcugraph/tests diff --git a/python/pylibcugraph/setup.py b/python/pylibcugraph/setup.py index e681c648196..9a56076120c 100644 --- a/python/pylibcugraph/setup.py +++ b/python/pylibcugraph/setup.py @@ -52,41 +52,9 @@ def exclude_libcxx_symlink(cmake_manifest): setup( - name="pylibcugraph", - description="pylibcuGraph - RAPIDS GPU Graph Analytics", - version="23.04.00", - classifiers=[ - # "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - # "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - ], - # Include the separately-compiled shared library - author="NVIDIA Corporation", packages=find_packages(include=["pylibcugraph", "pylibcugraph.*"]), - package_data={key: ["*.pxd"] for key in find_packages(include=["pylibcugraph*"])}, include_package_data=True, - install_requires=[ - "pylibraft==23.4.*", - "rmm==23.4.*", - ], - extras_require={ - "test": [ - "pytest", - "pytest-xdist", - "pytest-benchmark", - "scipy", - "pandas", - "numpy", - "networkx>=2.5.1", - "cudf==23.4.*", - ] - }, cmake_process_manifest_hook=exclude_libcxx_symlink, - license="Apache 2.0", cmdclass={"clean": CleanCommand}, zip_safe=False, )