Skip to content

Commit 110ee24

Browse files
Switch to hatchling + hatch_vcs build (#24)
1 parent f1b2977 commit 110ee24

7 files changed

Lines changed: 12 additions & 762 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ core
4949
.vs
5050
.mypy_cache/
5151
/htmlcov/
52+
pytensor_ml/_version.py
5253

5354
pytensor-venv/
5455
/notebooks/Sandbox*

‎conda_envs/pytensor_ml-gpu_jax.yml‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
# To use:
2-
#
3-
# $ conda env create -f conda_envs/pytensor_ml.yml # `mamba` works too for this command
4-
# $ conda activate pytensor-dev
5-
#
61
name: pytensor_ml
72
channels:
83
- conda-forge

‎conda_envs/pytensor_ml.yml‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
# To use:
2-
#
3-
# $ conda env create -f conda_envs/pytensor_ml.yml # `mamba` works too for this command
4-
# $ conda activate pytensor-dev
5-
#
61
name: pytensor_ml
72
channels:
83
- conda-forge
@@ -33,5 +28,3 @@ dependencies:
3328

3429
# developer tools
3530
- pre-commit
36-
# 05/11/25 - Windows compile bug, see: https://discourse.pymc.io/t/wierd-problem-installing-pymc/16984/13
37-
- libgcc<15

‎pyproject.toml‎

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[build-system]
2-
requires = ["setuptools", "versioneer[toml]"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["hatchling", "hatch-vcs"]
3+
build-backend = "hatchling.build"
44

55

66
[project]
77
name = "pytensor_ml"
8-
dynamic = ['version']
8+
dynamic = ["version"]
99
description = "A(nother) deep learning library, built on top of Pytensor"
1010
authors = [{name="Jesse Grabowski", email='jessegrabowski@gmail.com'}, {name="Ricardo Vieira"}]
1111
license = { file = "LICENSE" }
@@ -19,9 +19,8 @@ classifiers = [
1919
"Operating System :: Unix",
2020
"Operating System :: MacOS",
2121
"Programming Language :: Python :: 3",
22-
"Programming Language :: Python :: 3.10",
23-
"Programming Language :: Python :: 3.11",
2422
"Programming Language :: Python :: 3.12",
23+
"Programming Language :: Python :: 3.13",
2524
]
2625
keywords = [
2726
"neural network",
@@ -42,16 +41,14 @@ dev = [
4241
"pre-commit",
4342
"pytest",
4443
"pytest-cov",
45-
"versioneer",
4644
"scikit-learn"
4745
]
4846

49-
[tool.versioneer]
50-
VCS = "git"
51-
style = "pep440"
52-
versionfile_source = "pytensor_ml/_version.py"
53-
versionfile_build = "pytensor_ml/_version.py"
54-
tag_prefix = 'v'
47+
[tool.hatch.version]
48+
source = "vcs"
49+
50+
[tool.hatch.build.hooks.vcs]
51+
version-file = "pytensor_ml/_version.py"
5552

5653

5754
[tool.pytest.ini_options]

‎pytensor_ml/__init__.py‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import logging
22
import sys
33

4-
from pytensor_ml._version import get_versions
4+
from pytensor_ml._version import __version__
55
from pytensor_ml.pytensorf import function
66

77
_log = logging.getLogger(__name__)
@@ -13,6 +13,4 @@
1313
_log.addHandler(handler)
1414

1515

16-
__version__ = get_versions()["version"]
17-
18-
__all__ = ["function"]
16+
__all__ = ["__version__", "function"]

0 commit comments

Comments
 (0)