Created
September 5, 2012 01:35
-
-
Save aodag/3628952 to your computer and use it in GitHub Desktop.
installing distribute after pyenv created
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/python-3.3.0rc1/bin/python3.3 | |
import venv | |
import sys | |
import argparse | |
import subprocess | |
import os | |
here = os.path.dirname(__file__) | |
class MyEnvBuilder(venv.EnvBuilder): | |
def post_setup(self, context): | |
print('Install distribute') | |
subprocess.call([context.env_exe, os.path.join(here, 'distribute_setup.py')]) | |
def main(args=sys.argv[1:]): | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--system-site-packages', default=False, action="store_true") | |
parser.add_argument('--clear', default=False, action="store_true") | |
parser.add_argument('--symlinks', default=False, action="store_true") | |
parser.add_argument('--upgrade', default=False, action="store_true") | |
parser.add_argument('env_dir') | |
args = parser.parse_args(args) | |
builder = MyEnvBuilder(system_site_packages=args.system_site_packages, | |
clear=args.clear, | |
symlinks=args.symlinks, | |
upgrade=args.upgrade) | |
builder.create(args.env_dir) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment