mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 09:05:45 +00:00
4147feb77f
--HG-- rename : other-licenses/virtualenv/AUTHORS.txt => python/virtualenv/AUTHORS.txt rename : other-licenses/virtualenv/LICENSE.txt => python/virtualenv/LICENSE.txt rename : other-licenses/virtualenv/MANIFEST.in => python/virtualenv/MANIFEST.in rename : other-licenses/virtualenv/PKG-INFO => python/virtualenv/PKG-INFO rename : other-licenses/virtualenv/docs/index.txt => python/virtualenv/docs/index.txt rename : other-licenses/virtualenv/docs/news.txt => python/virtualenv/docs/news.txt rename : other-licenses/virtualenv/scripts/virtualenv => python/virtualenv/scripts/virtualenv rename : other-licenses/virtualenv/setup.cfg => python/virtualenv/setup.cfg rename : other-licenses/virtualenv/setup.py => python/virtualenv/setup.py rename : other-licenses/virtualenv/virtualenv.py => python/virtualenv/virtualenv.py rename : other-licenses/virtualenv/virtualenv_embedded/activate.bat => python/virtualenv/virtualenv_embedded/activate.bat rename : other-licenses/virtualenv/virtualenv_embedded/activate.csh => python/virtualenv/virtualenv_embedded/activate.csh rename : other-licenses/virtualenv/virtualenv_embedded/activate.fish => python/virtualenv/virtualenv_embedded/activate.fish rename : other-licenses/virtualenv/virtualenv_embedded/activate.ps1 => python/virtualenv/virtualenv_embedded/activate.ps1 rename : other-licenses/virtualenv/virtualenv_embedded/activate.sh => python/virtualenv/virtualenv_embedded/activate.sh rename : other-licenses/virtualenv/virtualenv_embedded/activate_this.py => python/virtualenv/virtualenv_embedded/activate_this.py rename : other-licenses/virtualenv/virtualenv_embedded/deactivate.bat => python/virtualenv/virtualenv_embedded/deactivate.bat rename : other-licenses/virtualenv/virtualenv_embedded/distribute_setup.py => python/virtualenv/virtualenv_embedded/distribute_setup.py rename : other-licenses/virtualenv/virtualenv_embedded/distutils-init.py => python/virtualenv/virtualenv_embedded/distutils-init.py rename : other-licenses/virtualenv/virtualenv_embedded/distutils.cfg => python/virtualenv/virtualenv_embedded/distutils.cfg rename : other-licenses/virtualenv/virtualenv_embedded/ez_setup.py => python/virtualenv/virtualenv_embedded/ez_setup.py rename : other-licenses/virtualenv/virtualenv_embedded/site.py => python/virtualenv/virtualenv_embedded/site.py rename : other-licenses/virtualenv/virtualenv_support/__init__.py => python/virtualenv/virtualenv_support/__init__.py rename : other-licenses/virtualenv/virtualenv_support/distribute-0.6.27.tar.gz => python/virtualenv/virtualenv_support/distribute-0.6.27.tar.gz rename : other-licenses/virtualenv/virtualenv_support/pip-1.1.tar.gz => python/virtualenv/virtualenv_support/pip-1.1.tar.gz rename : other-licenses/virtualenv/virtualenv_support/setuptools-0.6c11-py2.4.egg => python/virtualenv/virtualenv_support/setuptools-0.6c11-py2.4.egg rename : other-licenses/virtualenv/virtualenv_support/setuptools-0.6c11-py2.5.egg => python/virtualenv/virtualenv_support/setuptools-0.6c11-py2.5.egg rename : other-licenses/virtualenv/virtualenv_support/setuptools-0.6c11-py2.6.egg => python/virtualenv/virtualenv_support/setuptools-0.6c11-py2.6.egg rename : other-licenses/virtualenv/virtualenv_support/setuptools-0.6c11-py2.7.egg => python/virtualenv/virtualenv_support/setuptools-0.6c11-py2.7.egg
93 lines
3.1 KiB
Python
93 lines
3.1 KiB
Python
import os
|
|
import re
|
|
import shutil
|
|
import sys
|
|
|
|
try:
|
|
from setuptools import setup
|
|
setup_params = {
|
|
'entry_points': {
|
|
'console_scripts': [
|
|
'virtualenv=virtualenv:main',
|
|
'virtualenv-%s.%s=virtualenv:main' % sys.version_info[:2]
|
|
],
|
|
},
|
|
'zip_safe': False,
|
|
'test_suite': 'nose.collector',
|
|
'tests_require': ['nose', 'Mock'],
|
|
}
|
|
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"')
|
|
setup_params = {}
|
|
else:
|
|
script = 'scripts/virtualenv'
|
|
script_ver = script + '-%s.%s' % sys.version_info[:2]
|
|
shutil.copy(script, script_ver)
|
|
setup_params = {'scripts': [script, script_ver]}
|
|
|
|
here = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
## 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()
|
|
f = open(os.path.join(here, 'docs', 'news.txt'))
|
|
long_description += "\n\n" + f.read()
|
|
f.close()
|
|
|
|
|
|
def get_version():
|
|
f = open(os.path.join(here, 'virtualenv.py'))
|
|
version_file = f.read()
|
|
f.close()
|
|
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
|
|
version_file, re.M)
|
|
if version_match:
|
|
return version_match.group(1)
|
|
raise RuntimeError("Unable to find version string.")
|
|
|
|
|
|
# Hack to prevent stupid TypeError: 'NoneType' object is not callable error on
|
|
# exit of python setup.py test # in multiprocessing/util.py _exit_function when
|
|
# running python setup.py test (see
|
|
# http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
|
|
try:
|
|
import multiprocessing
|
|
except ImportError:
|
|
pass
|
|
|
|
setup(
|
|
name='virtualenv',
|
|
# If you change the version here, change it in virtualenv.py and
|
|
# docs/conf.py as well
|
|
version=get_version(),
|
|
description="Virtual Python Environment builder",
|
|
long_description=long_description,
|
|
classifiers=[
|
|
'Development Status :: 4 - Beta',
|
|
'Intended Audience :: Developers',
|
|
'License :: OSI Approved :: MIT License',
|
|
'Programming Language :: Python :: 2',
|
|
'Programming Language :: Python :: 2.4',
|
|
'Programming Language :: Python :: 2.5',
|
|
'Programming Language :: Python :: 2.6',
|
|
'Programming Language :: Python :: 2.7',
|
|
'Programming Language :: Python :: 3',
|
|
'Programming Language :: Python :: 3.1',
|
|
'Programming Language :: Python :: 3.2',
|
|
],
|
|
keywords='setuptools deployment installation distutils',
|
|
author='Ian Bicking',
|
|
author_email='ianb@colorstudy.com',
|
|
maintainer='Jannis Leidel, Carl Meyer and Brian Rosner',
|
|
maintainer_email='python-virtualenv@groups.google.com',
|
|
url='http://www.virtualenv.org',
|
|
license='MIT',
|
|
py_modules=['virtualenv'],
|
|
packages=['virtualenv_support'],
|
|
package_data={'virtualenv_support': ['*-py%s.egg' % sys.version[:3], '*.tar.gz']},
|
|
**setup_params)
|