Skip to content

Commit 6bd3c28

Browse files
committed
Migration from setup.py+setuptools+nose > pyproject.toml+twine+pynose
1 parent 3e132b4 commit 6bd3c28

4 files changed

Lines changed: 37 additions & 71 deletions

File tree

File renamed without changes.

Makefile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,23 @@ run:
1717
test: tests coverage
1818

1919
coverage:
20-
nosetests --with-coverage --cover-package="${PY_PACKAGE}" --cover-html --cover-html-dir="reports" --tests "${TEST_FILES}"
20+
nosetests --capture-output --with-coverage --cover-package="${PY_PACKAGE}" --cover-html --cover-html-dir="reports" --tests "${TEST_FILES}"
2121

2222
tests:
23-
nosetests --with-xunit --xunit-file="nosetests.xml" --tests "${TEST_FILES}"
23+
nosetests --capture-output --with-xunit --xunit-file="nosetests.xml" --tests "${TEST_FILES}"
2424

2525
syntax-check-python:
2626
@python -m py_compile $(shell find ./ -not \( -path ./tests -prune \) -iname "*.py" ! -iname "__init__.py" -type f)
2727

2828
syntax-check: syntax-check-python
2929

30-
valid-full-coverage: ; $(eval PERCENT_COVERAGE=$(shell nosetests --with-coverage --cover-package="${PY_PACKAGE}" --cover-html --cover-html-dir="reports" --tests "${TEST_FILES}" 2>&1 | grep -E "^TOTAL" | awk '{ print $$4 }'))
30+
valid-full-coverage: ; $(eval PERCENT_COVERAGE=$(shell nosetests --capture-output --with-coverage --cover-package="${PY_PACKAGE}" --cover-html --cover-html-dir="reports" --tests "${TEST_FILES}" 2>&1 | grep -E "^TOTAL" | awk '{ print $$4 }'))
3131
@if [ "$(PERCENT_COVERAGE)" != "100%" ]; then false; fi
3232

3333
compile:
3434
## To use it : make target=<TARGET> deploy
35-
$(PYTHON) setup.py sdist
36-
$(PYTHON) setup.py bdist_wheel
37-
$(TWINE) check dist/*
38-
$(TWINE) upload -r $(target) dist/*
35+
python -m build --sdist
36+
twine upload -r $(target) dist/*
3937

4038
.PHONY: docs
4139
docs:

pyproject.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[project]
2+
name = "csv-to-dot"
3+
dynamic = ["version"]
4+
description = "Convert a 2 columns CSV file to a .dot, who can be converted with Graphviz to .jpg, .ps, ..."
5+
readme = "README.md"
6+
license = "GPL-3.0-only"
7+
license-files = ["LICENSE"]
8+
authors = [
9+
{ name = "Valentin Henon", email = "vhenon@mindbaz.com" }
10+
]
11+
urls = { repository = "https://github.com/Mindbaz/python-csv-to-dot" }
12+
requires-python = ">=3.9"
13+
dependencies = [
14+
"Jinja2",
15+
]
16+
17+
[project.scripts]
18+
csv_to_dot = "entry_points_csv_to_dot.csv_to_dot:run"
19+
20+
[tool.setuptools.dynamic]
21+
version = { attr = "csv_to_dot.__version__" }
22+
23+
[tool.setuptools.packages.find]
24+
where = ["."]
25+
include = [
26+
"csv_to_dot",
27+
"csv_to_dot.resources",
28+
"entry_points_csv_to_dot",
29+
]
30+
31+
[tool.setuptools.package-data]
32+
"*" = ["*.j2"]

setup.py

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

0 commit comments

Comments
 (0)