File: setup.py

package info (click to toggle)
toposort 1.5-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 120 kB
  • sloc: python: 213; sh: 20; makefile: 6
file content (46 lines) | stat: -rw-r--r-- 1,819 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from __future__ import print_function
from setuptools import setup, Command

# run our tests
class PyTest(Command):
    user_options = []
    def initialize_options(self):
        pass
    def finalize_options(self):
        pass
    def run(self):
        import sys, subprocess
        tests = [('test suite', ['-m', 'test.test_toposort']),
                 ]
        if sys.hexversion >= 0x03000000:
            # Skip doctests for python < 3.0. They use set literal reprs, which
            #  are different in 2.7. Testing under 3.x is good enough.
            tests.append(('doctests',   ['-m' 'doctest', 'README.txt']))
        for name, cmds in tests:
            print(name)
            errno = subprocess.call([sys.executable] + cmds)
            if errno != 0:
                raise SystemExit(errno)
        print('test complete')


setup(name='toposort',
      version='1.5',
      url='https://bitbucket.org/ericvsmith/toposort',
      author='Eric V. Smith',
      author_email='eric@trueblade.com',
      description='Implements a topological sort algorithm.',
      long_description=open('README.txt').read() + '\n' + open('CHANGES.txt').read(),
      classifiers=['Development Status :: 5 - Production/Stable',
                   'Intended Audience :: Developers',
                   'License :: OSI Approved :: Apache Software License',
                   'Topic :: Software Development :: Libraries :: Python Modules',
                   'Programming Language :: Python :: 2.7',
                   'Programming Language :: Python :: 3.3',
                   'Programming Language :: Python :: 3.4',
                   'Programming Language :: Python :: 3.5',
                   ],
      license='Apache License Version 2.0',
      py_modules=['toposort'],
      cmdclass = {'test': PyTest},
      )