Skip to content

Commit 2c44bce

Browse files
committed
setup.cfg, pyproject.toml
1 parent 0221330 commit 2c44bce

File tree

4 files changed

+54
-41
lines changed

4 files changed

+54
-41
lines changed

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools>=42", "wheel"]
3+
build-backend = "setuptools.build_meta"

setup.cfg

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[metadata]
2+
name = tikzplotlib
3+
version = 0.9.1
4+
author = Nico Schlömer
5+
6+
description = Convert matplotlib figures into TikZ/PGFPlots
7+
url = https://github.com/nschloe/tikzplotlib
8+
project_urls =
9+
Code=https://github.com/nschloe/tikzplotlib
10+
Issues=https://github.com/nschloe/tikzplotlib/issues
11+
long_description = file: README.md
12+
long_description_content_type = text/markdown
13+
license = MIT
14+
platforms = any
15+
classifiers =
16+
Development Status :: 4 - Beta
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.6
22+
Programming Language :: Python :: 3.7
23+
Programming Language :: Python :: 3.8
24+
Topic :: Multimedia :: Graphics :: Graphics Conversion
25+
Topic :: Scientific/Engineering :: Visualization
26+
27+
[options]
28+
packages = find:
29+
# importlib_metadata can be removed when we support Python 3.8+ only
30+
install_requires =
31+
importlib_metadata
32+
matplotlib >= 1.4.0
33+
numpy
34+
Pillow
35+
python_requires = >=3.6
36+
setup_requires =
37+
setuptools>=42
38+
wheel

setup.py

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,4 @@
1-
import os
1+
from setuptools import setup
22

3-
from setuptools import find_packages, setup
4-
5-
# https://packaging.python.org/single_source_version/
6-
base_dir = os.path.abspath(os.path.dirname(__file__))
7-
about = {}
8-
with open(os.path.join(base_dir, "tikzplotlib", "__about__.py"), "rb") as f:
9-
exec(f.read(), about)
10-
11-
12-
setup(
13-
name="tikzplotlib",
14-
version=about["__version__"],
15-
packages=find_packages(),
16-
url="https://github.com/nschloe/tikzplotlib",
17-
author=about["__author__"],
18-
author_email=about["__email__"],
19-
install_requires=["matplotlib >= 1.4.0", "numpy", "Pillow"],
20-
description="Convert matplotlib figures into TikZ/PGFPlots",
21-
long_description=open("README.md").read(),
22-
long_description_content_type="text/markdown",
23-
license=about["__license__"],
24-
python_requires=">=3.6",
25-
classifiers=[
26-
about["__status__"],
27-
about["__license__"],
28-
"Operating System :: OS Independent",
29-
"Programming Language :: Python :: 3",
30-
"Programming Language :: Python :: 3.6",
31-
"Programming Language :: Python :: 3.7",
32-
"Programming Language :: Python :: 3.8",
33-
"Topic :: Multimedia :: Graphics :: Graphics Conversion",
34-
"Topic :: Scientific/Engineering :: Visualization",
35-
],
36-
)
3+
if __name__ == "__main__":
4+
setup()

tikzplotlib/__about__.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
__author__ = "Nico Schlömer"
2-
__email__ = "[email protected]"
3-
__copyright__ = f"Copyright (c) 2010-2020, {__author__} <{__email__}>"
4-
__license__ = "License :: OSI Approved :: MIT License"
5-
__version__ = "0.9.1"
6-
__status__ = "Development Status :: 5 - Production/Stable"
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"

0 commit comments

Comments
 (0)