Skip to content

Commit

Permalink
Removes (unintentional?) runtime dependency on packaging from nx-cu…
Browse files Browse the repository at this point in the history
…graph (#4240)

A [recent PR](#4217) was merged that added `packaging` as a runtime dependency to nx-cugraph.  This PR removes that dependency and manually extracts the `major` and `minor` version numbers instead.

Authors:
  - Rick Ratzel (https://github.com/rlratzel)
  - Erik Welch (https://github.com/eriknw)

Approvers:
  - Brad Rees (https://github.com/BradReesWork)
  - Erik Welch (https://github.com/eriknw)

URL: #4240
  • Loading branch information
rlratzel committed Mar 15, 2024
1 parent fa096f0 commit 6d45e7b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions python/nx-cugraph/_nx_cugraph/__init__.py
Expand Up @@ -23,18 +23,19 @@
$ python _nx_cugraph/__init__.py
"""

from packaging.version import Version

from _nx_cugraph._version import __version__

_nx_cugraph_version = Version(__version__)
# This is normally handled by packaging.version.Version, but instead of adding
# an additional runtime dependency on "packaging", assume __version__ will
# always be in <major>.<minor>.<build> format.
(_version_major, _version_minor) = __version__.split(".")[:2]

# Entries between BEGIN and END are automatically generated
_info = {
"backend_name": "cugraph",
"project": "nx-cugraph",
"package": "nx_cugraph",
"url": f"https://github.com/rapidsai/cugraph/tree/branch-{_nx_cugraph_version.major:02}.{_nx_cugraph_version.minor:02}/python/nx-cugraph",
"url": f"https://github.com/rapidsai/cugraph/tree/branch-{_version_major:0>2}.{_version_minor:0>2}/python/nx-cugraph",
"short_summary": "GPU-accelerated backend.",
# "description": "TODO",
"functions": {
Expand Down

0 comments on commit 6d45e7b

Please sign in to comment.