Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Commit

Permalink
Removing unneeded argparse imports and moving pip imports into scope
Browse files Browse the repository at this point in the history
  • Loading branch information
benvanik committed Apr 11, 2012
1 parent e28fa0d commit ce39422
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 8 deletions.
2 changes: 0 additions & 2 deletions anvil/commands/build_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
__author__ = 'benvanik@google.com (Ben Vanik)'


import argparse

import anvil.commands.util as commandutil
from anvil.manage import manage_command

Expand Down
1 change: 0 additions & 1 deletion anvil/commands/clean_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
__author__ = 'benvanik@google.com (Ben Vanik)'


import argparse
import os
import shutil
import sys
Expand Down
1 change: 0 additions & 1 deletion anvil/commands/deploy_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
__author__ = 'benvanik@google.com (Ben Vanik)'


import argparse
import os
import shutil
import sys
Expand Down
1 change: 0 additions & 1 deletion anvil/commands/serve_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
__author__ = 'benvanik@google.com (Ben Vanik)'


import argparse
import os
import sys

Expand Down
1 change: 0 additions & 1 deletion anvil/commands/test_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
__author__ = 'benvanik@google.com (Ben Vanik)'


import argparse
import os
import sys

Expand Down
4 changes: 2 additions & 2 deletions anvil/depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
__author__ = 'benvanik@google.com (Ben Vanik)'


import pip
import pkg_resources
import os
import subprocess
import sys
Expand Down Expand Up @@ -95,6 +93,7 @@ def __init__(self, requirement_str, *args, **kwargs):
features of requirement strings.
"""
super(PythonLibrary, self).__init__(*args, **kwargs)
import pkg_resources
self.requires_root = True
self.requirement_str = requirement_str
self.requirement = pkg_resources.Requirement.parse(requirement_str)
Expand All @@ -105,6 +104,7 @@ def __str__(self):
def check(self):
any_found = False
any_valid = False
import pip
for distro in pip.get_installed_distributions():
# distro is a pkg_resources.Distribution
if distro in self.requirement:
Expand Down

0 comments on commit ce39422

Please sign in to comment.