Skip to content

Commit 81aa03a

Browse files
committed
Moved setup metadata to setup.cfg
1 parent a5b5831 commit 81aa03a

File tree

2 files changed

+43
-34
lines changed

2 files changed

+43
-34
lines changed

setup.cfg

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,34 @@
11
[metadata]
22
license_file = LICENSE
3+
name = pytest-mpl
4+
version = 0.11
5+
url = https://github.com/matplotlib/pytest-mpl
6+
author = Thomas Robitaille
7+
author_email = thomas.robitaille@gmail.com
8+
classifiers =
9+
Development Status :: 4 - Beta
10+
Framework :: Pytest
11+
Intended Audience :: Developers
12+
Topic :: Software Development :: Testing
13+
Topic :: Scientific/Engineering :: Visualization
14+
Programming Language :: Python
15+
Programming Language :: Python :: 2
16+
Programming Language :: Python :: 3
17+
Operating System :: OS Independent
18+
License :: OSI Approved :: BSD License
19+
license = BSD
20+
description = pytest plugin to help with testing figures output from Matplotlib
21+
long_description = file: README.rst
22+
23+
[options]
24+
zip_safe = True
25+
packages = find:
26+
install_requires =
27+
pytest
28+
matplotlib
29+
pillow
30+
nose
31+
32+
[options.entry_points]
33+
pytest11 =
34+
pytest_mpl = pytest_mpl.plugin

setup.py

Lines changed: 11 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,15 @@
1-
from setuptools import setup
1+
#!/usr/bin/env python
22

3-
from pytest_mpl import __version__
3+
import sys
4+
from distutils.version import LooseVersion
45

5-
# IMPORTANT: we deliberately use rst here instead of markdown because long_description
6-
# needs to be in rst, and requiring pandoc to be installed to convert markdown to rst
7-
# on-the-fly is over-complicated and sometimes the generated rst has warnings that
8-
# cause PyPI to not display it correctly.
6+
try:
7+
import setuptools
8+
assert LooseVersion(setuptools.__version__) >= LooseVersion('30.3')
9+
except (ImportError, AssertionError):
10+
sys.stderr.write("ERROR: setuptools 30.3 or later is required\n")
11+
sys.exit(1)
912

10-
with open('README.rst') as infile:
11-
long_description = infile.read()
13+
from setuptools import setup
1214

13-
setup(
14-
version=__version__,
15-
url="https://github.com/matplotlib/pytest-mpl",
16-
name="pytest-mpl",
17-
description='pytest plugin to help with testing figures output from Matplotlib',
18-
long_description=long_description,
19-
packages=['pytest_mpl'],
20-
package_data={'pytest_mpl': ['classic.mplstyle']},
21-
install_requires=['pytest', 'matplotlib', 'pillow', 'nose'],
22-
license='BSD',
23-
author='Thomas Robitaille',
24-
author_email='thomas.robitaille@gmail.com',
25-
entry_points={'pytest11': ['pytest_mpl = pytest_mpl.plugin']},
26-
classifiers=[
27-
'Development Status :: 4 - Beta',
28-
'Framework :: Pytest',
29-
'Intended Audience :: Developers',
30-
'Topic :: Software Development :: Testing',
31-
'Topic :: Scientific/Engineering :: Visualization',
32-
'Programming Language :: Python',
33-
'Programming Language :: Python :: 2',
34-
'Programming Language :: Python :: 3',
35-
'Operating System :: OS Independent',
36-
'License :: OSI Approved :: BSD License',
37-
],
38-
)
15+
setup(use_scm_version=True)

0 commit comments

Comments
 (0)