Commit 98636c73 authored by Lucas Carvalho's avatar Lucas Carvalho

Moved imports to avoid circular import.

parent a4f4b49f
...@@ -18,9 +18,6 @@ It doesn't install scripts. It uses setuptools and requires it to be ...@@ -18,9 +18,6 @@ It doesn't install scripts. It uses setuptools and requires it to be
installed. installed.
""" """
from zc.buildout.networkcache import get_filename_from_url, \
upload_network_cached, \
download_network_cached
import distutils.errors import distutils.errors
import fnmatch import fnmatch
import glob import glob
...@@ -44,6 +41,12 @@ _oprp = getattr(os.path, 'realpath', lambda path: path) ...@@ -44,6 +41,12 @@ _oprp = getattr(os.path, 'realpath', lambda path: path)
def realpath(path): def realpath(path):
return os.path.normcase(os.path.abspath(_oprp(path))) return os.path.normcase(os.path.abspath(_oprp(path)))
from zc.buildout.networkcache import get_filename_from_url, \
upload_network_cached, \
download_network_cached
default_index_url = os.environ.get( default_index_url = os.environ.get(
'buildout-testing-index-url', 'buildout-testing-index-url',
'http://pypi.python.org/simple', 'http://pypi.python.org/simple',
......
...@@ -19,7 +19,6 @@ import posixpath ...@@ -19,7 +19,6 @@ import posixpath
import re import re
import urllib import urllib
import urlparse import urlparse
from download import check_md5sum
from slapos.libnetworkcache import NetworkcacheClient, UploadError, \ from slapos.libnetworkcache import NetworkcacheClient, UploadError, \
DirectoryNotFound DirectoryNotFound
...@@ -126,3 +125,6 @@ def get_filename_from_url(url): ...@@ -126,3 +125,6 @@ def get_filename_from_url(url):
assert name, ( assert name, (
'URL %r produced no filename' % url) 'URL %r produced no filename' % url)
return name return name
from download import check_md5sum
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