Skip to content

Make pip install work on a stock CUDA machine - #2

Merged
Aminsed merged 1 commit into
mainfrom
fix/pypi-install
Jul 28, 2026
Merged

Aminsed merged 1 commit into
mainfrom
fix/pypi-install

Conversation

@Aminsed

@Aminsed Aminsed commented Jul 28, 2026

Copy link
Copy Markdown
Owner

The 0.1.0 sdist on PyPI carries no CUDA sources, so pip install culof could never build. This prepares 0.2.0 and fixes the two things that made the published package unusable.

  • Complete sdist. Verified to contain every .cu, header and CMakeLists.txt; the release workflow fails if any is missing.
  • nvcc discovery. CMake only searches PATH; the usual toolkit layout (/usr/local/cuda, driver-only on PATH) aborted at project() on a machine with a working A6000. Now the standard roots are checked first.
  • PyPI README images. Relative paths render on GitHub and break on PyPI; switched to absolute URLs.
  • Release via Trusted Publishing (OIDC) so no API token is stored in the repo.

Verified end to end: sdist builds, installs into a clean venv with nvcc off PATH, cuda_available() is true, 45/45 tests pass against the installed package.

The 0.1.0 sdist on PyPI contains no CUDA sources at all -- no .cu, no
headers, no CMakeLists -- so `pip install culof` could never build. Nothing
short of a new release fixes that, and 0.1.0 cannot be reuploaded, so this
prepares 0.2.0.

Finding nvcc is the other half. CMake searches only PATH for it, while the
usual Linux install puts the toolkit under /usr/local/cuda and leaves only
the driver on PATH. project(... LANGUAGES CUDA) then aborts with "No
CMAKE_CUDA_COMPILER could be found" on a machine with a perfectly good
toolkit -- reproduced here on an A6000. Look in the standard roots before
enabling the language.

Also: the README pointed at its images with relative paths, which resolve on
GitHub and break on the PyPI project page, so every figure was a broken
image there. Absolute raw.githubusercontent.com URLs render in both places.

The release workflow publishes via PyPI Trusted Publishing, so no API token
is stored in the repository, and it refuses to publish an sdist that is
missing any file needed to build -- the exact defect that shipped in 0.1.0.

Verified: sdist builds, installs into a clean venv with nvcc off PATH,
cuda_available() is true, and all 45 tests pass against the installed
package.
@Aminsed
Aminsed merged commit 0a877fc into main Jul 28, 2026
5 checks passed
@Aminsed
Aminsed deleted the fix/pypi-install branch July 28, 2026 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant