Skip to content

Commit b33ad8a

Browse files
committed
use flit
1 parent faa2375 commit b33ad8a

File tree

4 files changed

+42
-73
lines changed

4 files changed

+42
-73
lines changed

justfile

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
1-
version := `python3 -c "from configparser import ConfigParser; p = ConfigParser(); p.read('setup.cfg'); print(p['metadata']['version'])"`
2-
name := `python3 -c "from configparser import ConfigParser; p = ConfigParser(); p.read('setup.cfg'); print(p['metadata']['name'])"`
3-
1+
version := `python3 -c "from src.tikzplotlib.__about__ import __version__; print(__version__)"`
42

53
default:
64
@echo "\"just publish\"?"
75

8-
tag:
9-
@if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
10-
curl -H "Authorization: token `cat ~/.github-access-token`" -d '{"tag_name": "v{{version}}"}' https://api.github.com/repos/nschloe/{{name}}/releases
11-
12-
upload: clean
6+
publish:
137
@if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
14-
# https://stackoverflow.com/a/58756491/353337
15-
python3 -m build --sdist --wheel .
16-
twine upload dist/*
17-
18-
publish: tag upload
8+
gh release create "v{{version}}"
9+
flit publish
1910

2011
clean:
2112
@find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf

pyproject.toml

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,41 @@
11
[build-system]
2-
requires = ["setuptools>=42", "wheel"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["flit_core >=3.2,<4"]
3+
build-backend = "flit_core.buildapi"
44

55
[tool.isort]
66
profile = "black"
7+
8+
[project]
9+
name = "tikzplotlib"
10+
authors = [{name = "Nico Schlömer", email = "[email protected]"}]
11+
description = "Convert matplotlib figures into TikZ/PGFPlots"
12+
readme = "README.md"
13+
license = {file = "LICENSE"}
14+
classifiers = [
15+
"Development Status :: 5 - Production/Stable",
16+
"Framework :: Matplotlib",
17+
"License :: OSI Approved :: MIT License",
18+
"Operating System :: OS Independent",
19+
"Programming Language :: Python",
20+
"Programming Language :: Python :: 3",
21+
"Programming Language :: Python :: 3.7",
22+
"Programming Language :: Python :: 3.8",
23+
"Programming Language :: Python :: 3.9",
24+
"Programming Language :: Python :: 3.10",
25+
"Topic :: Multimedia :: Graphics :: Graphics Conversion",
26+
"Topic :: Scientific/Engineering :: Visualization",
27+
]
28+
keywords = ["latex", "tikz", "matplotlib", "graphics"]
29+
dynamic = ["version"]
30+
requires-python = ">=3.7"
31+
dependencies = [
32+
"matplotlib >= 1.4.0",
33+
"numpy",
34+
"Pillow",
35+
"webcolors",
36+
]
37+
38+
[project.urls]
39+
Code = "https://github.com/nschloe/tikzplotlib"
40+
Issues = "https://github.com/nschloe/tikzplotlib/issues"
41+
Funding = "https://github.com/sponsors/nschloe"

setup.cfg

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

src/tikzplotlib/__about__.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1 @@
1-
try:
2-
# Python 3.8
3-
from importlib import metadata
4-
except ImportError:
5-
import importlib_metadata as metadata
6-
7-
try:
8-
__version__ = metadata.version("tikzplotlib")
9-
except Exception:
10-
__version__ = "unknown"
1+
__version__ = "0.9.17"

0 commit comments

Comments
 (0)