~ubuntu-branches/ubuntu/quantal/enigmail/quantal-security

« back to all changes in this revision

Viewing changes to python/virtualenv/setup.py

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2013-09-13 16:02:15 UTC
  • mfrom: (0.12.16)
  • Revision ID: package-import@ubuntu.com-20130913160215-u3g8nmwa0pdwagwc
Tags: 2:1.5.2-0ubuntu0.12.10.1
* New upstream release v1.5.2 for Thunderbird 24

* Build enigmail using a stripped down Thunderbird 17 build system, as it's
  now quite difficult to build the way we were doing previously, with the
  latest Firefox build system
* Add debian/patches/no_libxpcom.patch - Don't link against libxpcom, as it
  doesn't exist anymore (but exists in the build system)
* Add debian/patches/use_sdk.patch - Use the SDK version of xpt.py and
  friends
* Drop debian/patches/ipc-pipe_rename.diff (not needed anymore)
* Drop debian/patches/makefile_depth.diff (not needed anymore)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import os
2
 
import re
3
 
import shutil
4
 
import sys
5
 
 
6
 
try:
7
 
    from setuptools import setup
8
 
    setup_params = {
9
 
        'entry_points': {
10
 
            'console_scripts': [
11
 
                'virtualenv=virtualenv:main',
12
 
                'virtualenv-%s.%s=virtualenv:main' % sys.version_info[:2]
13
 
            ],
14
 
        },
15
 
        'zip_safe': False,
16
 
        'test_suite': 'nose.collector',
17
 
        'tests_require': ['nose', 'Mock'],
18
 
    }
19
 
except ImportError:
20
 
    from distutils.core import setup
21
 
    if sys.platform == 'win32':
22
 
        print('Note: without Setuptools installed you will have to use "python -m virtualenv ENV"')
23
 
        setup_params = {}
24
 
    else:
25
 
        script = 'scripts/virtualenv'
26
 
        script_ver = script + '-%s.%s' % sys.version_info[:2]
27
 
        shutil.copy(script, script_ver)
28
 
        setup_params = {'scripts': [script, script_ver]}
29
 
 
30
 
here = os.path.dirname(os.path.abspath(__file__))
31
 
 
32
 
## Get long_description from index.txt:
33
 
f = open(os.path.join(here, 'docs', 'index.txt'))
34
 
long_description = f.read().strip()
35
 
long_description = long_description.split('split here', 1)[1]
36
 
f.close()
37
 
f = open(os.path.join(here, 'docs', 'news.txt'))
38
 
long_description += "\n\n" + f.read()
39
 
f.close()
40
 
 
41
 
 
42
 
def get_version():
43
 
    f = open(os.path.join(here, 'virtualenv.py'))
44
 
    version_file = f.read()
45
 
    f.close()
46
 
    version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
47
 
                              version_file, re.M)
48
 
    if version_match:
49
 
        return version_match.group(1)
50
 
    raise RuntimeError("Unable to find version string.")
51
 
 
52
 
 
53
 
# Hack to prevent stupid TypeError: 'NoneType' object is not callable error on
54
 
# exit of python setup.py test # in multiprocessing/util.py _exit_function when
55
 
# running python setup.py test (see
56
 
# http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
57
 
try:
58
 
    import multiprocessing
59
 
except ImportError:
60
 
    pass
61
 
 
62
 
setup(
63
 
    name='virtualenv',
64
 
    # If you change the version here, change it in virtualenv.py and
65
 
    # docs/conf.py as well
66
 
    version=get_version(),
67
 
    description="Virtual Python Environment builder",
68
 
    long_description=long_description,
69
 
    classifiers=[
70
 
        'Development Status :: 4 - Beta',
71
 
        'Intended Audience :: Developers',
72
 
        'License :: OSI Approved :: MIT License',
73
 
        'Programming Language :: Python :: 2',
74
 
        'Programming Language :: Python :: 2.4',
75
 
        'Programming Language :: Python :: 2.5',
76
 
        'Programming Language :: Python :: 2.6',
77
 
        'Programming Language :: Python :: 2.7',
78
 
        'Programming Language :: Python :: 3',
79
 
        'Programming Language :: Python :: 3.1',
80
 
        'Programming Language :: Python :: 3.2',
81
 
    ],
82
 
    keywords='setuptools deployment installation distutils',
83
 
    author='Ian Bicking',
84
 
    author_email='ianb@colorstudy.com',
85
 
    maintainer='Jannis Leidel, Carl Meyer and Brian Rosner',
86
 
    maintainer_email='python-virtualenv@groups.google.com',
87
 
    url='http://www.virtualenv.org',
88
 
    license='MIT',
89
 
    py_modules=['virtualenv'],
90
 
    packages=['virtualenv_support'],
91
 
    package_data={'virtualenv_support': ['*-py%s.egg' % sys.version[:3], '*.tar.gz']},
92
 
    **setup_params)