setup.py :  » Development » PyObjC » trunk » pyobjc » build-support » virtualenv-src » Python Open Source

Home
Python Open Source
1.3.1.2 Python
2.Ajax
3.Aspect Oriented
4.Blog
5.Build
6.Business Application
7.Chart Report
8.Content Management Systems
9.Cryptographic
10.Database
11.Development
12.Editor
13.Email
14.ERP
15.Game 2D 3D
16.GIS
17.GUI
18.IDE
19.Installer
20.IRC
21.Issue Tracker
22.Language Interface
23.Log
24.Math
25.Media Sound Audio
26.Mobile
27.Network
28.Parser
29.PDF
30.Project Management
31.RSS
32.Search
33.Security
34.Template Engines
35.Test
36.UML
37.USB Serial
38.Web Frameworks
39.Web Server
40.Web Services
41.Web Unit
42.Wiki
43.Windows
44.XML
Python Open Source » Development » PyObjC 
PyObjC » trunk » pyobjc » build support » virtualenv src » setup.py
import sys, os
try:
    from setuptools import setup
    kw = {'entry_points':
          """[console_scripts]\nvirtualenv = virtualenv:main\n""",
          'zip_safe': False}
except ImportError:
    from distutils.core import setup
    if sys.platform == 'win32':
        print 'Note: without Setuptools installed you will have to use "python -m virtualenv ENV"'
    else:
        kw = {'scripts': ['scripts/virtualenv']}
import re

here = os.path.dirname(os.path.abspath(__file__))

## Figure out the version from virtualenv.py:
version_re = re.compile(
    r'virtualenv_version = "(.*?)"')
fp = open(os.path.join(here, 'virtualenv.py'))
version = None
for line in fp:
    match = version_re.search(line)
    if match:
        version = match.group(1)
        break
else:
    raise Exception("Cannot find version in virtualenv.py")
fp.close()

## Get long_description from index.txt:
f = open(os.path.join(here, 'docs', 'index.txt'))
long_description = f.read().strip()
long_description = long_description.split('split here', 1)[1]
f.close()

## A warning just for Ian (related to distribution):
try:
    import getpass
except ImportError:
    is_ianb = False
else:
    is_ianb = getpass.getuser() == 'ianb'

if is_ianb and 'register' in sys.argv:
    if 'hg tip\n~~~~~~' in long_description:
        print >> sys.stderr, (
            "WARNING: hg tip is in index.txt")

setup(name='virtualenv',
      version=version,
      description="Virtual Python Environment builder",
      long_description=long_description,
      classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
      ],
      keywords='setuptools deployment installation distutils',
      author='Ian Bicking',
      author_email='ianb@colorstudy.com',
      url='http://virtualenv.openplans.org',
      license='MIT',
      py_modules=['virtualenv'],
      packages=['virtualenv_support'],
      package_data={'virtualenv_support': ['*-py%s.egg' % sys.version[:3], '*.tar.gz']},
      **kw
      )
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.