Skip to content

Commit eec394e

Browse files
committed
switch to hatch
1 parent 65718c5 commit eec394e

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ updates:
99
actions:
1010
patterns:
1111
- "*"
12+
# Python
13+
- package-ecosystem: "pip"
14+
directory: "/"
15+
schedule:
16+
interval: "weekly"

.github/scripts/bump-version.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/release-python.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ jobs:
4949
id: pre-publish
5050
with:
5151
version: ${{ inputs.version }}
52-
version_bump_script: ./.github/scripts/bump-version.sh
5352
dry_run: ${{ inputs.dry_run }}
5453

5554
build-dist:
@@ -91,7 +90,6 @@ jobs:
9190
product_name: ${{ env.PRODUCT_NAME }}
9291
silk_asset_group: ${{ env.SILK_ASSET_GROUP }}
9392
evergreen_project: ${{ env.EVERGREEN_PROJECT }}
94-
version_bump_script: ./.github/scripts/bump-version.sh
9593
token: ${{ github.token }}
9694
repository_url: https://test.pypi.org/legacy/
9795
dry_run: ${{ inputs.dry_run }}

pyproject.toml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[build-system]
2-
requires = ["setuptools>=65.0"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["hatchling", "hatch-requirements-txt>=0.4.1"]
3+
build-backend = "hatchling.build"
44

55
[project]
66
name = "django-mongodb"
7-
dynamic = ["version"]
7+
dynamic = ["version", "dependencies"]
88
description = "MongoDB backend for Django"
99
readme = "README.md"
1010
license = {file="LICENSE"}
@@ -31,10 +31,6 @@ classifiers = [
3131
"Programming Language :: Python :: 3.11",
3232
"Programming Language :: Python :: 3.12",
3333
]
34-
dependencies = [
35-
"django>=5.0,<5.1",
36-
"pymongo>=4.6,<5.0",
37-
]
3834

3935
[project.optional-dependencies]
4036
docs = [ "sphinx>=7"]
@@ -45,8 +41,12 @@ Documentation = "https://django-mongodb.readthedocs.io"
4541
Source = "https://github.com/mongodb-labs/django-mongodb"
4642
Tracker = "https://github.com/mongodb-labs/django-mongodb/issues"
4743

48-
[tool.setuptools.dynamic]
49-
version = {attr = "django_mongodb.__version__"}
44+
[tool.hatch.version]
45+
path = "django_mongodb/__init__.py"
46+
validate-bump = false
47+
48+
[tool.hatch.metadata.hooks.requirements_txt]
49+
files = ["requirements.txt"]
5050

5151
[tool.mypy]
5252
strict = true
@@ -119,3 +119,5 @@ partial_branches = ["if (.*and +)*not _use_c( and.*)*:"]
119119

120120
[tool.coverage.html]
121121
directory = "htmlcov"
122+
123+
[tool.hatch]

0 commit comments

Comments
 (0)