pylib/pyflakes/setup.py
author Gregory Szorc <gps@mozilla.com>
Tue, 28 Oct 2014 11:43:34 -0700
changeset 360276 7db4622ae530570abaf69b6ce2ffc6b08bdaa3d8
parent 358631 c0f27325a2c53a9b0259764f4ce682b19937ce99
child 691174 1550fe5c904f8c8960a32c74f59a438909f290b8
permissions -rwxr-xr-x
testing: add vcttesting to virtualenv The support modules in the vcttesting package are becoming increasingly popular. This directory currently must be manually added to sys.path. This is annoying. This patch adds packaging to vcttesting so it is available in our virtualenv. Scripts manually adding the testing directory to sys.path have been updated to no longer do this.

#!/usr/bin/env python
# Copyright 2005-2011 Divmod, Inc.
# Copyright 2013 Florent Xicluna.  See LICENSE file for details
from __future__ import with_statement

import os.path

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup
    extra = {'scripts': ["bin/pyflakes"]}
else:
    extra = {
        'test_suite': 'pyflakes.test',
        'entry_points': {
            'console_scripts': ['pyflakes = pyflakes.api:main'],
        },
    }


def get_version(fname=os.path.join('pyflakes', '__init__.py')):
    with open(fname) as f:
        for line in f:
            if line.startswith('__version__'):
                return eval(line.split('=')[-1])


def get_long_description():
    descr = []
    for fname in ('README.rst',):
        with open(fname) as f:
            descr.append(f.read())
    return '\n\n'.join(descr)


setup(
    name="pyflakes",
    license="MIT",
    version=get_version(),
    description="passive checker of Python programs",
    long_description=get_long_description(),
    author="Phil Frost",
    author_email="indigo@bitglue.com",
    maintainer="Florent Xicluna",
    maintainer_email="pyflakes-dev@lists.launchpad.net",
    url="https://launchpad.net/pyflakes",
    packages=["pyflakes", "pyflakes.scripts", "pyflakes.test"],
    classifiers=[
        "Development Status :: 6 - Mature",
        "Environment :: Console",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 3",
        "Topic :: Software Development",
        "Topic :: Utilities",
    ],
    **extra)