Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

allow script creation without setuptools

  • Loading branch information...
commit 99ca364e72d5a5d9659036ed69a2171ed3166c72 1 parent deb1752
@ianb ianb authored
Showing with 20 additions and 14 deletions.
  1. +3 −0  scripts/virtualenv
  2. +17 −14 setup.py
View
3  scripts/virtualenv
@@ -0,0 +1,3 @@
+#!/usr/bin/env python
+import virtualenv
+virtualenv.main()
View
31 setup.py
@@ -1,17 +1,16 @@
+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
- print 'Note: without Setuptools installed you will have to use "python -m virtualenv ENV"'
-import sys, os
+ 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
-## A warning just for Ian:
-try:
- import getpass
-except ImportError:
- is_ianb = False
-else:
- is_ianb = getpass.getuser() == 'ianb'
here = os.path.dirname(os.path.abspath(__file__))
@@ -35,6 +34,14 @@
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, (
@@ -57,9 +64,5 @@
py_modules=['virtualenv'],
packages=['virtualenv_support'],
package_data={'virtualenv_support': ['*-py%s.egg' % sys.version[:3], '*.tar.gz']},
- zip_safe=False,
- entry_points="""
- [console_scripts]
- virtualenv = virtualenv:main
- """,
+ **kw
)
Please sign in to comment.
Something went wrong with that request. Please try again.