diff options
author | Brad Warren <bmw@users.noreply.github.com> | 2018-11-20 03:21:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-20 03:21:45 +0300 |
commit | 000fc0b751e140f6055c524f012d932c62a929e6 (patch) | |
tree | baa3b40570dffb4b691074739d7845dc675503a1 /tools/venv3.py | |
parent | 5e9a5e4daa23bae848ddff76c6964e31f9f68e8f (diff) | |
parent | 9fd4bf3dfa9ad214bff896c63a3649e28b83463c (diff) |
Merge pull request #6498 from certbot/fix-merge-conflicts
Fix merge conflicts in test-everything
Diffstat (limited to 'tools/venv3.py')
-rwxr-xr-x | tools/venv3.py | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/tools/venv3.py b/tools/venv3.py new file mode 100755 index 000000000..1bacc9c9a --- /dev/null +++ b/tools/venv3.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python +# Developer virtualenv setup for Certbot client + +from __future__ import absolute_import + +import os +import subprocess +import sys + +import _venv_common + +REQUIREMENTS = [ + '-e acme[dev]', + '-e .[dev,docs]', + '-e certbot-apache', + '-e certbot-dns-cloudflare', + '-e certbot-dns-cloudxns', + '-e certbot-dns-digitalocean', + '-e certbot-dns-dnsimple', + '-e certbot-dns-dnsmadeeasy', + '-e certbot-dns-gehirn', + '-e certbot-dns-google', + '-e certbot-dns-linode', + '-e certbot-dns-luadns', + '-e certbot-dns-nsone', + '-e certbot-dns-ovh', + '-e certbot-dns-rfc2136', + '-e certbot-dns-route53', + '-e certbot-dns-sakuracloud', + '-e certbot-nginx', + '-e certbot-postfix', + '-e letshelp-certbot', + '-e certbot-compatibility-test', +] + +def get_venv_args(): + with open(os.devnull, 'w') as fnull: + where_python3_st_code = subprocess.call( + 'where python3', shell=True, stdout=fnull, stderr=fnull) + command_python3_st_code = subprocess.call( + 'command -v python3', shell=True, stdout=fnull, stderr=fnull) + + if not where_python3_st_code or not command_python3_st_code: + return '--python python3' + + raise ValueError('Couldn\'t find python3 in {0}'.format(os.environ.get('PATH'))) + +def main(): + venv_args = get_venv_args() + + return _venv_common.main('venv3', venv_args, REQUIREMENTS) + +if __name__ == '__main__': + sys.exit(main()) |