From b0eac3297fecf4fe604f7b937a72d9f59c1b70c6 Mon Sep 17 00:00:00 2001 From: Phil Wang Date: Tue, 15 Nov 2022 13:26:55 -0800 Subject: [PATCH] allow for uploading to pypi --- .gitignore | 21 +++++++++++++++++++++ MANIFEST.in | 7 +++++++ Makefile | 9 +++++++++ setup.py | 4 ++-- 4 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 MANIFEST.in create mode 100644 Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..c18af862c --- /dev/null +++ b/.gitignore @@ -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 diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 000000000..9ed79289b --- /dev/null +++ b/MANIFEST.in @@ -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 diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..79aefc797 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ + +clean_dist: + rm -rf dist/* + +create_dist: clean_dist + python setup.py sdist + +upload_package: create_dist + twine upload dist/* diff --git a/setup.py b/setup.py index ec1415ac2..fa27226b4 100644 --- a/setup.py +++ b/setup.py @@ -164,8 +164,8 @@ def append_nvcc_threads(nvcc_extra_args): 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 {},