|
1 | | -from setuptools import setup |
| 1 | +#!/usr/bin/env python |
2 | 2 |
|
3 | | -from pytest_mpl import __version__ |
| 3 | +import sys |
| 4 | +from distutils.version import LooseVersion |
4 | 5 |
|
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) |
9 | 12 |
|
10 | | -with open('README.rst') as infile: |
11 | | - long_description = infile.read() |
| 13 | +from setuptools import setup |
12 | 14 |
|
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