Skip to content

Commit

Permalink
Remove examples and tests from wheel, but keep them in sdist
Browse files Browse the repository at this point in the history
  • Loading branch information
runame committed Nov 11, 2024
1 parent 75cb54f commit 6709762
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
recursive-include distributed_shampoo *
recursive-include tests *
recursive-exclude * __pycache__/*
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ Install `distributed_shampoo` with all dependencies:
```
git clone [email protected]:facebookresearch/optimizers.git
cd optimizers
pip install -e .
pip install .
```
If you also want to try the [examples](./distributed_shampoo/examples/), replace the last line with `pip install ".[examples]"`.

## Usage

Expand Down
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ name = "optimizers"
version = "1.0.0"
dependencies = [
"torch>=2.2.0",
"torchvision>=0.15.0",
]
requires-python = ">=3.10"
authors = [
Expand All @@ -34,7 +33,12 @@ classifiers = [
]

[project.optional-dependencies]
examples = [
"torchvision>=0.15.0",
]

dev = [
"optimizers[examples]",
"ruff",
"usort",
"mypy",
Expand All @@ -46,6 +50,7 @@ Repository = "https://github.com/facebookresearch/optimizers.git"
"Bug Tracker" = "https://github.com/facebookresearch/optimizers/issues"

[tool.setuptools]
include-package-data = false
py-modules = [
"matrix_functions",
"matrix_functions_types",
Expand All @@ -54,6 +59,7 @@ py-modules = [

[tool.setuptools.packages.find]
include = ["distributed_shampoo*"]
exclude = ["*examples", "*tests"]

[tool.usort]
first_party_detection = false

0 comments on commit 6709762

Please sign in to comment.