mirror of
https://github.com/certbot/certbot.git
synced 2026-06-03 13:59:02 -04:00
I want to use isort as part of https://github.com/certbot/certbot/issues/9572 because I want to do it programmatically, however, I felt like the config needed to be tweaked a bit due to it not understanding what is and is not our own code. This PR updates the isort config so it recognizes our own modules and runs `isort .` from the root of the repo to update everything. * update isort config * run "isort ."
33 lines
1 KiB
Python
Executable file
33 lines
1 KiB
Python
Executable file
#!/usr/bin/env python
|
|
# pip installs the requested packages in editable mode and runs unit tests on
|
|
# them. Each package is installed and tested in the order they are provided
|
|
# before the script moves on to the next package. If CERTBOT_NO_PIN is set not
|
|
# set to 1, packages are installed using pinned versions of all of our
|
|
# dependencies. See pip_install.py for more information on the versions pinned
|
|
# to.
|
|
import os
|
|
import re
|
|
import subprocess
|
|
import sys
|
|
|
|
|
|
def call_with_print(command):
|
|
print(command)
|
|
subprocess.check_call(command, shell=True)
|
|
|
|
|
|
def main(args):
|
|
script_dir = os.path.dirname(os.path.abspath(__file__))
|
|
command = [sys.executable, os.path.join(script_dir, 'pip_install_editable.py')]
|
|
|
|
for requirement in args:
|
|
current_command = command[:]
|
|
current_command.append(requirement)
|
|
call_with_print(' '.join(current_command))
|
|
pkg = re.sub(r'\[\w+\]', '', requirement)
|
|
|
|
call_with_print(' '.join([
|
|
sys.executable, '-m', 'pytest', pkg]))
|
|
|
|
if __name__ == '__main__':
|
|
main(sys.argv[1:])
|