Skip to content

Commit 8a64648

Browse files
committed
package with pyproject.toml
1 parent 1a2106a commit 8a64648

File tree

8 files changed

+75
-130
lines changed

8 files changed

+75
-130
lines changed

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
exclude setup.cfg
21
include *.txt
32
include *.rst
43
recursive-include doc *.rst

Makefile

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PYTHON ?= python3.11
1+
PYTHON ?= python3.13
22
REMOTE = git@github.com:Mic92/python-mpd2
33
VERSION = $(shell $(PYTHON) -c "import mpd; print('.'.join(map(str,mpd.VERSION)))")
44

@@ -7,12 +7,25 @@ test:
77
release: test
88
test "$(shell git symbolic-ref --short HEAD)" = "master" || (echo "not on master branch"; exit 1)
99
git pull --rebase origin master
10-
$(PYTHON) setup.py sdist bdist_wheel
11-
$(PYTHON) -m twine check dist/python-mpd2-$(VERSION).tar.gz dist/python_mpd2-$(VERSION)-py2.py3-none-any.whl
10+
$(PYTHON) -m build
11+
$(PYTHON) -m twine check dist/python-mpd2-$(VERSION).tar.gz dist/python_mpd2-$(VERSION)-py3-none-any.whl
1212
git tag "v$(VERSION)"
1313
git push --tags git@github.com:Mic92/python-mpd2 "v$(VERSION)"
14-
$(PYTHON) -m twine upload --repository python-mpd2 dist/python-mpd2-$(VERSION).tar.gz dist/python_mpd2-$(VERSION)-py2.py3-none-any.whl
14+
$(PYTHON) -m twine upload --repository python-mpd2 dist/python-mpd2-$(VERSION).tar.gz dist/python_mpd2-$(VERSION)-py3-none-any.whl
1515
clean:
16-
$(PYTHON) setup.py clean
16+
rm -rf dist build *.egg-info
1717

18-
.PHONY: test release clean
18+
bump-version:
19+
@if [ -z "$(NEW_VERSION)" ]; then \
20+
echo "Usage: make bump-version NEW_VERSION=x.y.z"; \
21+
exit 1; \
22+
fi
23+
@echo "Bumping version to $(NEW_VERSION)..."
24+
@# Convert x.y.z to (x, y, z) for mpd/base.py
25+
@VERSION_TUPLE=$$(echo "$(NEW_VERSION)" | sed 's/\./,\ /g'); \
26+
sed -i.bak "s/^VERSION = (.*/VERSION = ($$VERSION_TUPLE)/" mpd/base.py && rm mpd/base.py.bak
27+
@# Update version in pyproject.toml
28+
@sed -i.bak 's/^version = .*/version = "$(NEW_VERSION)"/' pyproject.toml && rm pyproject.toml.bak
29+
@echo "Version bumped to $(NEW_VERSION)"
30+
31+
.PHONY: test release clean bump-version

bors.toml

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

flake.nix

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,15 @@
1414
devShells.default = pkgs.mkShell {
1515
packages = with pkgs; [
1616
bashInteractive
17-
python39
1817
python310
1918
python311
20-
(python312.withPackages(ps: [ps.setuptools ps.tox ps.wheel]))
21-
python313
19+
python312
20+
(python313.withPackages(ps: [ps.setuptools ps.tox ps.wheel ps.build]))
21+
python314
2222
pypy3
2323
twine
2424
mypy
2525
];
26-
shellHook = ''
27-
# breaks python36/python37
28-
unset _PYTHON_SYSCONFIGDATA_NAME
29-
'';
3026
};
3127
};
3228
});

pyproject.toml

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,56 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "python-mpd2"
7+
version = "3.1.1"
8+
description = "A Python MPD client library"
9+
readme = "README.rst"
10+
authors = [
11+
{name = "Joerg Thalheim", email = "joerg@thalheim.io"},
12+
]
13+
maintainers = [
14+
{name = "Joerg Thalheim", email = "joerg@thalheim.io"},
15+
]
16+
license = {text = "GNU Lesser General Public License v3 (LGPLv3)"}
17+
keywords = ["mpd"]
18+
classifiers = [
19+
"Development Status :: 5 - Production/Stable",
20+
"Intended Audience :: Developers",
21+
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
22+
"Natural Language :: English",
23+
"Operating System :: OS Independent",
24+
"Programming Language :: Python",
25+
"Programming Language :: Python :: 3",
26+
"Topic :: Software Development :: Libraries :: Python Modules",
27+
]
28+
requires-python = ">=3.10"
29+
dependencies = []
30+
31+
[project.optional-dependencies]
32+
twisted = ["Twisted"]
33+
test = [
34+
"tox",
35+
"Twisted",
36+
]
37+
38+
[project.urls]
39+
Homepage = "https://github.com/Mic92/python-mpd2"
40+
Repository = "https://github.com/Mic92/python-mpd2"
41+
Issues = "https://github.com/Mic92/python-mpd2/issues"
42+
43+
[tool.setuptools]
44+
packages = ["mpd"]
45+
zip-safe = true
46+
47+
48+
[tool.setuptools.package-data]
49+
"*" = ["py.typed"]
50+
51+
152
[tool.mypy]
2-
python_version = "3.11"
53+
python_version = "3.10"
354
pretty = true
455
warn_redundant_casts = true
556
disallow_untyped_calls = true

setup.cfg

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

setup.py

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

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py39,py310,py311,py312,py313,pypy3
2+
envlist = py310,py311,py312,py313,py314,pypy3
33

44
[testenv]
55
deps = coverage

0 commit comments

Comments
 (0)