allow for uploading to pypi

This commit is contained in:
Phil Wang 2022-11-15 13:26:55 -08:00
parent 2e33fc8e36
commit b0eac3297f
4 changed files with 39 additions and 2 deletions

21
.gitignore vendored Normal file
View File

@ -0,0 +1,21 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
# C extensions
*.so
# Distribution / packaging
bin/
build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

7
MANIFEST.in Normal file
View File

@ -0,0 +1,7 @@
recursive-include csrc *.cu
recursive-include csrc *.h
recursive-include csrc *.cpp
recursive-include flash_attn *.cu
recursive-include flash_attn *.h
recursive-include flash_attn *.cpp

9
Makefile Normal file
View File

@ -0,0 +1,9 @@
clean_dist:
rm -rf dist/*
create_dist: clean_dist
python setup.py sdist
upload_package: create_dist
twine upload dist/*

View File

@ -164,8 +164,8 @@ setup(
url="https://github.com/HazyResearch/flash-attention",
classifiers=[
"Programming Language :: Python :: 3",
"License :: Apache 2.0",
"Operating System :: Linux",
"License :: OSI Approved :: Apache Software License",
"Operating System :: Unix",
],
ext_modules=ext_modules,
cmdclass={"build_ext": BuildExtension} if ext_modules else {},