Commit 5fbec349 authored by Rafael Oliveira's avatar Rafael Oliveira

PEP8

parent 2517f01c
...@@ -19,7 +19,7 @@ import os ...@@ -19,7 +19,7 @@ import os
import re import re
import sys import sys
import zc.buildout.easy_install import zc.buildout.easy_install
import zipfile
class Eggs(object): class Eggs(object):
...@@ -43,13 +43,13 @@ class Eggs(object): ...@@ -43,13 +43,13 @@ class Eggs(object):
allow_hosts = b_options['allow-hosts'] allow_hosts = b_options['allow-hosts']
allow_hosts = tuple([host.strip() for host in allow_hosts.split('\n') allow_hosts = tuple([host.strip() for host in allow_hosts.split('\n')
if host.strip()!='']) if host.strip() != ''])
self.allow_hosts = allow_hosts self.allow_hosts = allow_hosts
options['eggs-directory'] = b_options['eggs-directory'] options['eggs-directory'] = b_options['eggs-directory']
options['_e'] = options['eggs-directory'] # backward compat. options['_e'] = options['eggs-directory'] # backward compat.
options['develop-eggs-directory'] = b_options['develop-eggs-directory'] options['develop-eggs-directory'] = b_options['develop-eggs-directory']
options['_d'] = options['develop-eggs-directory'] # backward compat. options['_d'] = options['develop-eggs-directory'] # backward compat.
def working_set(self, extra=()): def working_set(self, extra=()):
"""Separate method to just get the working set """Separate method to just get the working set
...@@ -57,7 +57,6 @@ class Eggs(object): ...@@ -57,7 +57,6 @@ class Eggs(object):
This is intended for reuse by similar recipes. This is intended for reuse by similar recipes.
""" """
options = self.options options = self.options
b_options = self.buildout['buildout']
# Backward compat. :( # Backward compat. :(
options['executable'] = sys.executable options['executable'] = sys.executable
...@@ -91,13 +90,14 @@ class Eggs(object): ...@@ -91,13 +90,14 @@ class Eggs(object):
update = install update = install
class Scripts(Eggs): class Scripts(Eggs):
def __init__(self, buildout, name, options): def __init__(self, buildout, name, options):
super(Scripts, self).__init__(buildout, name, options) super(Scripts, self).__init__(buildout, name, options)
options['bin-directory'] = buildout['buildout']['bin-directory'] options['bin-directory'] = buildout['buildout']['bin-directory']
options['_b'] = options['bin-directory'] # backward compat. options['_b'] = options['bin-directory'] # backward compat.
self.extra_paths = [ self.extra_paths = [
os.path.join(buildout['buildout']['directory'], p.strip()) os.path.join(buildout['buildout']['directory'], p.strip())
...@@ -107,7 +107,6 @@ class Scripts(Eggs): ...@@ -107,7 +107,6 @@ class Scripts(Eggs):
if self.extra_paths: if self.extra_paths:
options['extra-paths'] = '\n'.join(self.extra_paths) options['extra-paths'] = '\n'.join(self.extra_paths)
relative_paths = options.get( relative_paths = options.get(
'relative-paths', 'relative-paths',
buildout['buildout'].get('relative-paths', 'false') buildout['buildout'].get('relative-paths', 'false')
...@@ -122,6 +121,7 @@ class Scripts(Eggs): ...@@ -122,6 +121,7 @@ class Scripts(Eggs):
parse_entry_point = re.compile( parse_entry_point = re.compile(
'([^=]+)=(\w+(?:[.]\w+)*):(\w+(?:[.]\w+)*)$' '([^=]+)=(\w+(?:[.]\w+)*):(\w+(?:[.]\w+)*)$'
).match ).match
def install(self): def install(self):
reqs, ws = self.working_set() reqs, ws = self.working_set()
options = self.options options = self.options
...@@ -166,6 +166,7 @@ class Scripts(Eggs): ...@@ -166,6 +166,7 @@ class Scripts(Eggs):
update = install update = install
def get_bool(options, name, default=False): def get_bool(options, name, default=False):
value = options.get(name) value = options.get(name)
if not value: if not value:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment