Merge pull request #16 from pklaus/relative-imports

Fixing more relative import statements
This commit is contained in:
Paulo Henrique Silva 2015-02-18 13:29:38 -02:00
commit ca5044224c
8 changed files with 13 additions and 13 deletions

View file

@ -16,8 +16,8 @@
# the License.
if __name__ == '__main__':
from .common import read
from .render import GerberSvgContext
from gerber.common import read
from gerber.render import GerberSvgContext
import sys
if len(sys.argv) < 2:
@ -27,7 +27,7 @@ if __name__ == '__main__':
ctx = GerberSvgContext()
ctx.alpha = 0.95
for filename in sys.argv[1:]:
print "parsing %s" % filename
print("parsing %s" % filename)
if 'GTO' in filename or 'GBO' in filename:
ctx.color = (1, 1, 1)
ctx.alpha = 0.8

View file

@ -30,9 +30,9 @@ def read(filename):
CncFile object representing the file, either GerberFile or
ExcellonFile. Returns None if file is not an Excellon or Gerber file.
"""
import rs274x
import excellon
from utils import detect_file_format
from . import rs274x
from . import excellon
from .utils import detect_file_format
fmt = detect_file_format(filename)
if fmt == 'rs274x':
return rs274x.read(filename)

View file

@ -24,5 +24,5 @@ SVG is the only supported format.
"""
from svgwrite_backend import GerberSvgContext
from cairo_backend import GerberCairoContext
from .svgwrite_backend import GerberSvgContext
from .cairo_backend import GerberCairoContext

View file

@ -4,7 +4,7 @@
# Author: Hamilton Kibbe <ham@hamiltonkib.be>
from ..cam import CamFile, FileSettings
from tests import *
from .tests import *
def test_filesettings_defaults():

View file

@ -5,7 +5,7 @@
from ..common import read
from ..excellon import ExcellonFile
from ..rs274x import GerberFile
from tests import *
from .tests import *
import os

View file

@ -3,7 +3,7 @@
# Author: Hamilton Kibbe <ham@hamiltonkib.be>
from ..primitives import *
from tests import *
from .tests import *
def test_primitive_implementation_warning():

View file

@ -5,7 +5,7 @@
import os
from ..rs274x import read, GerberFile
from tests import *
from .tests import *
TOP_COPPER_FILE = os.path.join(os.path.dirname(__file__),

View file

@ -29,7 +29,7 @@ METADATA = {
'license': "Apache",
'keywords': "gerber tools",
'url': "http://github.com/curtacircuitos/gerber-tools",
'packages': ['gerber'],
'packages': ['gerber', 'gerber.render'],
'long_description': read('README.md'),
'classifiers':[
"Development Status :: 3 - Alpha",