|
| 1 | +# This section defines how the package should be built when running `python -m build` |
| 2 | +[build-system] |
| 3 | +build-backend = "setuptools.build_meta" # Use setuptools as the backend |
| 4 | +requires = [ |
| 5 | + "setuptools", # The core packaging tool |
| 6 | + "setuptools-git-versioning", # Automatically derive the version from Git tags |
| 7 | +] |
| 8 | + |
| 9 | +# Main project/package metadata |
| 10 | +[project] |
| 11 | +name = "torchsom" |
| 12 | +authors = [ |
| 13 | + {name = "Louis Berthier", email = "louis-desire-romeo.berthier@michelin.com"}, |
| 14 | +] |
| 15 | +dynamic = [ |
| 16 | + "version", # Version will be determined dynamically (via git) |
| 17 | + "readme", # README will be dynamically loaded |
| 18 | +] |
| 19 | +description = "A Scalable PyTorch-Compatible Library for Self-Organizing Maps" |
| 20 | +requires-python = ">=3.9" # Minimum Python version required |
| 21 | +classifiers = [ |
| 22 | + "Development Status :: 3 - Alpha", |
| 23 | + "Natural Language :: English", |
| 24 | + "Operating System :: OS Independent", |
| 25 | + "Programming Language :: Python", |
| 26 | + "Programming Language :: Python :: 3.8", |
| 27 | + "Programming Language :: Python :: 3.9", |
| 28 | + "Programming Language :: Python :: 3.10", |
| 29 | +] |
| 30 | +dependencies = [ |
| 31 | + # "torch", |
| 32 | + "torch @ https://download.pytorch.org/whl/cu118/torch-2.6.0-cp39-cp39-linux_x86_64.whl", # Specify torch 2.6.0 with GPU |
| 33 | + # "torch @ https://download.pytorch.org/whl/cu118/torch-*.whl", # Specify torch with GPU and last version |
| 34 | + "numpy", |
| 35 | + "matplotlib", |
| 36 | + "tqdm", |
| 37 | +] |
| 38 | + |
| 39 | +# Configuration for setuptools-git-versioning plugin |
| 40 | +[tool.setuptools-git-versioning] |
| 41 | +enabled = true # Enables git-based versioning |
| 42 | +# dev_template and dirty_template define version strings for development and dirty states |
| 43 | +dev_template = "{tag}.dev{ccount}" # Format when there are commits after a tag |
| 44 | +dirty_template = "{tag}.post{ccount}+dirty" # Format when the working tree is dirty |
| 45 | + |
| 46 | +# Dynamically load the README from file |
| 47 | +[tool.setuptools.dynamic] |
| 48 | +readme = {file = "README.md"} # Long description for PyPI and docs |
| 49 | + |
| 50 | +# Package discovery configuration |
| 51 | +[tool.setuptools.packages.find] |
| 52 | +where = ["."] # Search in current directory |
| 53 | +include = ["torchsom*"] # Include packages matching this pattern (e.g., torchsom, torchsom.utils) |
| 54 | + |
| 55 | +# Optional dependencies that can be installed with [dev] extra: `pip install .[dev]` |
| 56 | +[project.optional-dependencies] |
| 57 | +dev = [ |
| 58 | + "pandas", |
| 59 | + "scikit-learn", |
| 60 | + "warnings", |
| 61 | + "black", |
| 62 | + "isort", |
| 63 | + "rich", |
| 64 | + "pytest", |
| 65 | + "pytest-cov", |
| 66 | + "pytest-html", |
| 67 | + "certifi", |
| 68 | + "typing_extensions", |
| 69 | + "notebook", |
| 70 | +] |
0 commit comments