From 57b39085b217b1614740604d48fea486221ce612 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Wed, 4 Dec 2024 15:19:16 -0700 Subject: [PATCH] build: Use hatchling to package project * Convert packaging from setuptools to hatchling as UMNN is pure-Python. * Add required dependencies of NumPy and PyTorch. * Add missing requires-python and correct licence to BSD-3. --- models/setup.py | 12 ------------ pyproject.toml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 12 deletions(-) delete mode 100644 models/setup.py create mode 100644 pyproject.toml diff --git a/models/setup.py b/models/setup.py deleted file mode 100644 index 85c14fe..0000000 --- a/models/setup.py +++ /dev/null @@ -1,12 +0,0 @@ -from setuptools import setup - -setup( - name='UMNN', - version='0.1', - packages=['UMNN'], - url='', - license='MIT License', - author='awehenkel', - author_email='antoine.wehenkel@gmail.com', - description='' -) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..6b3e19f --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,31 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "UMNN" +version = "1.70" +description = "Unconstrained Monotonic Neural Networks" +license = { text = "BSD-3-Clause" } # SPDX short identifier +requires-python = ">=3.6" +authors = [ + { name = "awehenkel", email = "antoine.wehenkel@gmail.com" }, +] +dependencies = [ + "torch>=1.1", + "numpy", +] + + +[project.urls] +Homepage = "https://github.com/AWehenkel/UMNN" + +[tool.hatch.build.targets.sdist] +# hatchling always includes: +# pyproject.toml, .gitignore, any README, any LICENSE, AUTHORS +include = [ + "/models/UMNN", +] + +[tool.hatch.build.targets.wheel] +packages = ["models/UMNN"]