Skip to content

Commit 2228129

Browse files
committed
Remove setup.py, use pyproject.toml
1 parent 3dd83aa commit 2228129

File tree

9 files changed

+77
-88
lines changed

9 files changed

+77
-88
lines changed

.bumpversion.cfg

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

.bumpversion.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[tool.bumpversion]
2+
current_version = "0.1.1"
3+
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)(\\.(?P<patch>\\d+))?"
4+
serialize = [
5+
"{major}.{minor}.{patch}",
6+
"{major}.{minor}",
7+
]
8+
search = "{current_version}"
9+
replace = "{new_version}"
10+
regex = false
11+
ignore_missing_version = false
12+
ignore_missing_files = false
13+
tag = true
14+
sign_tags = false
15+
tag_name = "{new_version}"
16+
tag_message = "Bump version: {current_version} → {new_version}"
17+
allow_dirty = false
18+
commit = true
19+
message = "Bump version: {current_version} → {new_version}"
20+
commit_args = ""
21+
22+
[[tool.bumpversion.files]]
23+
filename = "pyproject.toml"
24+
search = "version = '{current_version}'"
25+
replace = "version = '{new_version}'"

MANIFEST.in

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
include README.md
2-
include LICENSE
3-
graft postgres_lock
4-
global-exclude *.py[co]
5-
global-exclude __pycache__
6-
global-exclude .DS_Store
1+
prune tests

Makefile

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,8 @@ test-report: coverage-clean test coverage-report
4646
test-lowest: ## Run tox with lowest (oldest) package dependencies.
4747
test-lowest: tox-test-lowest
4848

49-
dist: ## Builds source and wheel package
50-
dist: clean build-dist
51-
52-
release: ## Package and release this project to PyPI.
53-
release: dist build-release
49+
package: ## Builds source and wheel packages
50+
package: clean build-package
5451

5552

5653
# ---------------
@@ -67,23 +64,10 @@ build-clean:
6764
rm -rf .eggs
6865
find . -maxdepth 1 -name '*.egg-info' -exec rm -rf {} +
6966

70-
build-release:
71-
@echo
72-
@echo "This will package and release this project to PyPI."
73-
@echo
74-
@echo "A checklist before you continue:"
75-
@echo
76-
@echo " - have you ran 'bumpversion'?"
77-
@echo " - have you pushed the commit and tag created by 'bumpversion'?"
78-
@echo " - are you sure the project is in a state to be released?"
79-
@echo
80-
@read -p "Press <enter> to continue. Or <ctrl>-c to quit and address the above points."
81-
twine upload dist/*
82-
83-
build-dist:
84-
python setup.py sdist
85-
python setup.py bdist_wheel
86-
ls -l dist
67+
build-package:
68+
python -m build
69+
twine check --strict dist/*
70+
check-wheel-contents dist/*.whl
8771

8872

8973
# Virtual Environments

pyproject.toml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,44 @@
1+
[project]
2+
name = 'django-postgres-lock'
3+
version = '0.1.1'
4+
description = 'Django Postgres Lock'
5+
readme = 'README.md'
6+
maintainers = [{ name = 'The Developer Society', email = '[email protected]' }]
7+
requires-python = '>= 3.9'
8+
dependencies = [
9+
'Django>=3.2',
10+
]
11+
license = 'BSD-3-Clause'
12+
classifiers = [
13+
'Environment :: Web Environment',
14+
'Framework :: Django',
15+
'Framework :: Django :: 3.2',
16+
'Framework :: Django :: 4.2',
17+
'Framework :: Django :: 5.2',
18+
'Intended Audience :: Developers',
19+
'Operating System :: OS Independent',
20+
'Programming Language :: Python',
21+
'Programming Language :: Python :: 3',
22+
'Programming Language :: Python :: 3.9',
23+
'Programming Language :: Python :: 3.10',
24+
'Programming Language :: Python :: 3.11',
25+
'Programming Language :: Python :: 3.12',
26+
'Programming Language :: Python :: 3.13',
27+
]
28+
29+
[project.urls]
30+
Homepage = 'https://github.com/developersociety/django-postgres-lock'
31+
32+
[build-system]
33+
requires = ['setuptools >= 77.0.3']
34+
build-backend = 'setuptools.build_meta'
35+
36+
[tool.setuptools]
37+
include-package-data = false
38+
39+
[tool.setuptools.packages.find]
40+
include = ['postgres_lock*']
41+
142
[tool.ruff]
243
line-length = 99
344
target-version = 'py39'

requirements/local.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
-r testing.txt
22

3-
bump2version==1.0.1
3+
bump-my-version==1.2.0
44
Django>=5.2,<6.0
55
psycopg==3.2.9
66
tox==4.26.0
77
tox-uv==1.26.0
8-
twine==6.1.0

requirements/testing.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
build==1.2.2.post1
2+
check-wheel-contents==0.6.1
13
coverage==7.9.1
24
pipdeptree==2.26.1
35
ruff==0.11.13
6+
twine==6.1.0

setup.cfg

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

setup.py

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

0 commit comments

Comments
 (0)