~ubuntu-branches/ubuntu/saucy/pyflakes/saucy

« back to all changes in this revision

Viewing changes to .pc/rev101.patch/setup.py

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs
  • Date: 2013-08-04 23:49:01 UTC
  • mfrom: (1.1.9) (3.3.2 sid)
  • Revision ID: package-import@ubuntu.com-20130804234901-0sf9rh5q216p1zfo
Tags: 0.7.3-1
* Switch to dh-python.
* New upstream release (Closes: #718728)
  - "Fix undefined name for generator expression and dict/set
  comprehension at class level"
  - drop all patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python
2
 
# Copyright 2005-2011 Divmod, Inc.
3
 
# Copyright 2013 Florent Xicluna.  See LICENSE file for details
4
 
from __future__ import with_statement
5
 
 
6
 
import os.path
7
 
import sys
8
 
 
9
 
try:
10
 
    from setuptools import setup
11
 
except ImportError:
12
 
    from distutils.core import setup
13
 
    extra = {'scripts': ["bin/pyflakes"]}
14
 
else:
15
 
    if sys.version_info < (3,):
16
 
        extra = {'tests_require': ['unittest2'],
17
 
                 'test_suite': 'unittest2.collector'}
18
 
    else:
19
 
        extra = {'tests_require': ['unittest2py3k'],
20
 
                 'test_suite': 'unittest2.collector.collector'}
21
 
    extra['entry_points'] = {
22
 
        'console_scripts': ['pyflakes = pyflakes.api:main'],
23
 
    }
24
 
 
25
 
 
26
 
def get_version(fname=os.path.join('pyflakes', '__init__.py')):
27
 
    with open(fname) as f:
28
 
        for line in f:
29
 
            if line.startswith('__version__'):
30
 
                return eval(line.split('=')[-1])
31
 
 
32
 
 
33
 
def get_long_description():
34
 
    descr = []
35
 
    for fname in ('README.rst',):
36
 
        with open(fname) as f:
37
 
            descr.append(f.read())
38
 
    return '\n\n'.join(descr)
39
 
 
40
 
 
41
 
setup(
42
 
    name="pyflakes",
43
 
    license="MIT",
44
 
    version=get_version(),
45
 
    description="passive checker of Python programs",
46
 
    long_description=get_long_description(),
47
 
    author="Phil Frost",
48
 
    author_email="indigo@bitglue.com",
49
 
    maintainer="Florent Xicluna",
50
 
    maintainer_email="pyflakes-dev@lists.launchpad.net",
51
 
    url="https://launchpad.net/pyflakes",
52
 
    packages=["pyflakes", "pyflakes.scripts", "pyflakes.test"],
53
 
    classifiers=[
54
 
        "Development Status :: 6 - Mature",
55
 
        "Environment :: Console",
56
 
        "Intended Audience :: Developers",
57
 
        "License :: OSI Approved :: MIT License",
58
 
        "Programming Language :: Python",
59
 
        "Programming Language :: Python :: 2",
60
 
        "Programming Language :: Python :: 3",
61
 
        "Topic :: Software Development",
62
 
        "Topic :: Utilities",
63
 
    ],
64
 
    **extra)