Skip to content

Commit

Permalink
setuptools -> flit
Browse files Browse the repository at this point in the history
  • Loading branch information
nschloe committed Jan 15, 2022
1 parent 76e2836 commit 0d3254c
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 56 deletions.
10 changes: 2 additions & 8 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
version := `python3 -c "from configparser import ConfigParser; p = ConfigParser(); p.read('setup.cfg'); print(p['metadata']['version'])"`
name := `python3 -c "from configparser import ConfigParser; p = ConfigParser(); p.read('setup.cfg'); print(p['metadata']['name'])"`


default:
@echo "\"just publish\"?"

tag:
@if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
curl -H "Authorization: token `cat ~/.github-access-token`" -d '{"tag_name": "v{{version}}"}' https://api.github.com/repos/nschloe/{{name}}/releases
gh release create

upload: clean
@if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
# https://stackoverflow.com/a/58756491/353337
python3 -m build --sdist --wheel .
twine upload dist/*
flit publish

publish: tag upload

Expand Down
40 changes: 38 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "perfplot"
authors = [{name = "Nico Schlömer", email = "[email protected]"}]
description = "Performance plots for Python code snippets"
readme = "README.md"
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Software Development",
"Topic :: Utilities",
]
keywords = ["performance", "profile"]
dynamic = ["version"]
requires-python = ">=3.7"
dependencies = [
"matplotlib",
"matplotx",
"numpy",
"rich",
"typing_extensions;python_version<'3.8'",
]

[project.urls]
Code = "https://github.com/nschloe/perfplot"
Issues = "https://github.com/nschloe/perfplot/issues"
Funding = "https://github.com/sponsors/nschloe"
45 changes: 0 additions & 45 deletions setup.cfg

This file was deleted.

4 changes: 3 additions & 1 deletion src/perfplot/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from ._main import bench, live, plot, save, show

__all__ = ["bench", "plot", "show", "save", "live"]
__version__ = "0.9.14"

__all__ = ["bench", "plot", "show", "save", "live", "__version__"]

0 comments on commit 0d3254c

Please sign in to comment.