From 11142a37837e84cd99d5e2bbb87d0ba335040a76 Mon Sep 17 00:00:00 2001 From: Matthew Douglas <38992547+matthewdouglas@users.noreply.github.com> Date: Fri, 23 Feb 2024 13:32:13 -0500 Subject: [PATCH] Fix setup for doc build --- pyproject.toml | 6 ++++-- setup.py | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 78b22a6f4..0eaad9891 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ dependencies = [ [project.optional-dependencies] benchmark = ["pandas", "matplotlib"] -docs = ["hf-doc-builder"] +docs = ["hf-doc-builder", "black"] dev = [ "bitsandbytes[test]", "build", @@ -70,9 +70,11 @@ docs = "https://huggingface.co/docs/bitsandbytes/main" issues = "https://github.com/TimDettmers/bitsandbytes/issues" [tool.setuptools] -packages = ["bitsandbytes"] package-data = { "*" = ["libbitsandbytes*.*"] } +[tool.setuptools.dynamic] +version = {attr = "bitsandbytes.__version__"} + [tool.ruff] src = [ "bitsandbytes", diff --git a/setup.py b/setup.py index 994a078ef..164ea9c19 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -from setuptools import setup +from setuptools import find_packages, setup from setuptools.dist import Distribution @@ -13,5 +13,6 @@ def has_ext_modules(self): setup( version="0.43.0.dev0", - distclass=BinaryDistribution, + packages=find_packages(), + distclass=BinaryDistribution )