-
-
Notifications
You must be signed in to change notification settings - Fork 793
Migrate build data to pyproject.toml #1078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
matthewdouglas
wants to merge
24
commits into
bitsandbytes-foundation:main
from
matthewdouglas:setup-pep660
Closed
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
4454fc0
Migrate from setup.py to pyproject.toml for PEP 660 editable install
matthewdouglas 7bdc6e5
Update workflow to use pyproject.toml for build requirements
matthewdouglas 11142a3
Fix setup for doc build
matthewdouglas 636c62d
cleanup workflow
matthewdouglas f9c2cc5
Merge branch 'TimDettmers:main' into setup-pep660
matthewdouglas 699f505
Add dependency constraints
matthewdouglas 00497ab
Update pyproject.toml
matthewdouglas d23be94
Update pyproject.toml
matthewdouglas 48ede4a
Revert "Update pyproject.toml"
matthewdouglas 9fae8ee
Merge conflict
matthewdouglas 9a6794b
Update dependencies in pyproject.toml
matthewdouglas 399a494
Rebase on main
matthewdouglas 0101f2f
Resolve conflict
matthewdouglas 72342b5
Resolve conflict
matthewdouglas 11165f8
Add dependency constraints
matthewdouglas 646a86a
Update pyproject.toml
matthewdouglas 5d6ce68
Update pyproject.toml
matthewdouglas c5fcfb8
Revert "Update pyproject.toml"
matthewdouglas 19dcbd7
Update dependencies in pyproject.toml
matthewdouglas fd725cb
fix conflict
matthewdouglas 98f73d5
Merge branch 'TimDettmers:main' into setup-pep660
matthewdouglas a04cd4d
Make wheel artifact name agnostic to python version
matthewdouglas da2dc69
Remove requirements-*.txt
matthewdouglas a0ae460
Merge branch 'main' into setup-pep660
matthewdouglas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,79 @@ | ||
| [build-system] | ||
| requires = [ "setuptools", "wheel" ] | ||
| requires = ["setuptools >= 63.0.0"] | ||
matthewdouglas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| build-backend = "setuptools.build_meta" | ||
|
|
||
| [project] | ||
| name = "bitsandbytes" | ||
| dynamic = ["version"] | ||
| description = "k-bit optimizers and matrix multiplication routines." | ||
| authors = [{name="Tim Dettmers", email="[email protected]"}] | ||
| requires-python = ">=3.8" | ||
matthewdouglas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| readme = "README.md" | ||
| license = {file="LICENSE"} | ||
matthewdouglas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| keywords = [ | ||
| "gpu", | ||
| "optimizers", | ||
| "optimization", | ||
| "8-bit", | ||
| "quantization", | ||
| "compression" | ||
| ] | ||
| classifiers = [ | ||
| "Development Status :: 4 - Beta", | ||
| "License :: OSI Approved :: MIT License", | ||
| "Environment :: GPU :: NVIDIA CUDA :: 11", | ||
| "Environment :: GPU :: NVIDIA CUDA :: 12", | ||
| "Intended Audience :: Developers", | ||
| "Intended Audience :: Science/Research", | ||
| "Operating System :: POSIX :: Linux", | ||
| "Operating System :: MacOS", | ||
| "Operating System :: Microsoft :: Windows", | ||
| "Programming Language :: C++", | ||
| "Programming Language :: Python :: Implementation :: CPython", | ||
| "Programming Language :: Python :: 3.8", | ||
| "Programming Language :: Python :: 3.9", | ||
| "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Programming Language :: Python :: 3.12", | ||
| "Topic :: Scientific/Engineering :: Artificial Intelligence" | ||
| ] | ||
| dependencies = [ | ||
| "torch>=1.11,!=1.12.0", | ||
| "numpy>=1.17" | ||
| ] | ||
|
|
||
| [project.optional-dependencies] | ||
| benchmark = ["pandas", "matplotlib"] | ||
| docs = ["hf-doc-builder==0.5.0"] | ||
| dev = [ | ||
| "bitsandbytes[test]", | ||
| "build>=1.0.0,<2", | ||
| "ruff==0.3.2", | ||
| "pre-commit>=3.5.0,<4", | ||
| "wheel>=0.42,<1" | ||
| ] | ||
| test = [ | ||
| "einops~=0.6.0", | ||
| "lion-pytorch==0.0.6", | ||
| "pytest~=7.4", | ||
| "scipy>=1.10.1,<2; python_version < '3.9'", | ||
| "scipy>=1.11.4,<2; python_version >= '3.9'", | ||
| "transformers>=4.30.1,<5" | ||
| ] | ||
| triton = ["triton~=2.0.0; sys_platform=='linux' and platform_machine=='x86_64'"] | ||
|
|
||
| [project.urls] | ||
| homepage = "https://github.com/TimDettmers/bitsandbytes" | ||
| changelog = "https://github.com/TimDettmers/bitsandbytes/blob/main/CHANGELOG.md" | ||
| docs = "https://huggingface.co/docs/bitsandbytes/main" | ||
| issues = "https://github.com/TimDettmers/bitsandbytes/issues" | ||
|
|
||
| [tool.setuptools] | ||
| package-data = { "*" = ["libbitsandbytes*.*"] } | ||
|
|
||
| [tool.setuptools.dynamic] | ||
| version = {attr = "bitsandbytes.__version__"} | ||
|
|
||
| [tool.ruff] | ||
| src = [ | ||
| "bitsandbytes", | ||
|
|
||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,48 +2,14 @@ | |
| # | ||
| # This source code is licensed under the MIT license found in the | ||
| # LICENSE file in the root directory of this source tree. | ||
| import glob | ||
| import os | ||
|
|
||
| from setuptools import find_packages, setup | ||
| from setuptools.dist import Distribution | ||
|
|
||
| libs = list(glob.glob("./bitsandbytes/libbitsandbytes*.*")) | ||
| libs = [os.path.basename(p) for p in libs] | ||
| print("libs:", libs) | ||
|
|
||
|
|
||
| def read(fname): | ||
| return open(os.path.join(os.path.dirname(__file__), fname)).read() | ||
|
|
||
|
|
||
| # Tested with wheel v0.29.0 | ||
| class BinaryDistribution(Distribution): | ||
| def has_ext_modules(self): | ||
| return True | ||
|
|
||
|
|
||
| setup( | ||
| name="bitsandbytes", | ||
| version="0.43.2.dev", | ||
| author="Tim Dettmers", | ||
| author_email="[email protected]", | ||
| description="k-bit optimizers and matrix multiplication routines.", | ||
| license="MIT", | ||
| keywords="gpu optimizers optimization 8-bit quantization compression", | ||
| url="https://github.com/TimDettmers/bitsandbytes", | ||
| packages=find_packages(), | ||
| package_data={"": libs}, | ||
| install_requires=["torch", "numpy"], | ||
| extras_require={ | ||
| "benchmark": ["pandas", "matplotlib"], | ||
| "test": ["scipy"], | ||
| }, | ||
| long_description=read("README.md"), | ||
| long_description_content_type="text/markdown", | ||
| classifiers=[ | ||
| "Development Status :: 4 - Beta", | ||
| "Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
| ], | ||
| distclass=BinaryDistribution, | ||
| ) | ||
| setup(version="0.43.2.dev0", packages=find_packages(), distclass=BinaryDistribution) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.