Skip to content

fix sdist build #729

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

dtrifiro
Copy link

the sdist build currently doesn't include the csrc directory, making the PyPi sdist impossible to build.

fixes #720

the sdist build currently doesn't include the `csrc` directory, making
the PyPi sdist impossible to build.

fixes state-spaces#720
@dtrifiro
Copy link
Author

Comparing the PyPi wheel and the sdist built from this patch:

wget https://files.pythonhosted.org/packages/1d/c7/6e21ecece28e6d625f42e708c7523cd78ec82d1622f98562f82bf02748b7/mamba_ssm-2.2.4.tar.gz
tar -tf  mamba_ssm-2.2.4.tar.gz > pypi_wheel.txt

rm -rf mamba_ssm.egg-info && MAMBA_SKIP_CUDA_BUILD=TRUE python -m build --sdist # optionally add --installer=uv
tar -tf dist/mamba_ssm-2.2.4.tar.gz > fixed_sdist.txt

diff -p pypi_wheel.txt fixed_sdist.txt
*** pypi_wheel.txt	2025-05-19 17:33:47.407399056 +0200
--- fixed_sdist.txt	2025-05-19 17:34:36.050753906 +0200
***************
*** 1,8 ****
--- 1,28 ----
  mamba_ssm-2.2.4/
  mamba_ssm-2.2.4/AUTHORS
  mamba_ssm-2.2.4/LICENSE
+ mamba_ssm-2.2.4/MANIFEST.in
  mamba_ssm-2.2.4/PKG-INFO
  mamba_ssm-2.2.4/README.md
+ mamba_ssm-2.2.4/csrc/
+ mamba_ssm-2.2.4/csrc/selective_scan/
+ mamba_ssm-2.2.4/csrc/selective_scan/reverse_scan.cuh
+ mamba_ssm-2.2.4/csrc/selective_scan/selective_scan.cpp
+ mamba_ssm-2.2.4/csrc/selective_scan/selective_scan.h
+ mamba_ssm-2.2.4/csrc/selective_scan/selective_scan_bwd_bf16_complex.cu
+ mamba_ssm-2.2.4/csrc/selective_scan/selective_scan_bwd_bf16_real.cu
+ mamba_ssm-2.2.4/csrc/selective_scan/selective_scan_bwd_fp16_complex.cu
+ mamba_ssm-2.2.4/csrc/selective_scan/selective_scan_bwd_fp16_real.cu
+ mamba_ssm-2.2.4/csrc/selective_scan/selective_scan_bwd_fp32_complex.cu
+ mamba_ssm-2.2.4/csrc/selective_scan/selective_scan_bwd_fp32_real.cu
+ mamba_ssm-2.2.4/csrc/selective_scan/selective_scan_bwd_kernel.cuh
+ mamba_ssm-2.2.4/csrc/selective_scan/selective_scan_common.h
+ mamba_ssm-2.2.4/csrc/selective_scan/selective_scan_fwd_bf16.cu
+ mamba_ssm-2.2.4/csrc/selective_scan/selective_scan_fwd_fp16.cu
+ mamba_ssm-2.2.4/csrc/selective_scan/selective_scan_fwd_fp32.cu
+ mamba_ssm-2.2.4/csrc/selective_scan/selective_scan_fwd_kernel.cuh
+ mamba_ssm-2.2.4/csrc/selective_scan/static_switch.h
+ mamba_ssm-2.2.4/csrc/selective_scan/uninitialized_copy.cuh
  mamba_ssm-2.2.4/mamba_ssm/
  mamba_ssm-2.2.4/mamba_ssm/__init__.py
  mamba_ssm-2.2.4/mamba_ssm/distributed/
*************** mamba_ssm-2.2.4/mamba_ssm.egg-info/top_l
*** 51,53 ****
--- 71,75 ----
  mamba_ssm-2.2.4/pyproject.toml
  mamba_ssm-2.2.4/setup.cfg
  mamba_ssm-2.2.4/setup.py
+ mamba_ssm-2.2.4/tests/
+ mamba_ssm-2.2.4/tests/test_generation.py

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mamba-ssm fails to build on torch==2.7.0
1 participant