From a06448d4ef6d6c9de9b8e7f0e95f5c8351de51b2 Mon Sep 17 00:00:00 2001 From: Kevin Lim Date: Tue, 18 Jun 2024 02:52:57 -0700 Subject: [PATCH] Enable this to build with build isolation on --- README.md | 6 ++++++ pyproject.toml | 29 +++++++++++++++++++++++++++++ setup.py | 7 +------ 3 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 pyproject.toml diff --git a/README.md b/README.md index 06600db..2b5d5a8 100755 --- a/README.md +++ b/README.md @@ -17,6 +17,12 @@ Features: - Support fp32, fp16, bf16. - Kernel size 2, 3, 4. +## Installation + +```bash +pip install causal-conv1d +``` + ## How to use ``` diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..aa04439 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,29 @@ +[project] +name = "causal_conv1d" +readme = "README.md" +dynamic = ["version"] +authors = [ + { name = "Tri Dao", email = "tri@tridao.me" }, +] +requires-python = ">= 3.7" +license = { file = "LICENSE" } # Include a LICENSE file in your repo +dependencies = [ + "torch", + "einops", + "numpy", +] + +[project.optional-dependencies] +dev = [ + "pytest" +] + +[build-system] +requires = [ + "setuptools>=61.0.0", + "wheel", + "torch", + "packaging", + "ninja", +] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index 4c9a6bf..56a5e9f 100644 --- a/setup.py +++ b/setup.py @@ -363,10 +363,5 @@ def run(self): else { "bdist_wheel": CachedWheelsCommand, }, - python_requires=">=3.7", - install_requires=[ - "torch", - "packaging", - "ninja", - ], + )