From 1b31806423c8fec4040fed6d1009db016860b763 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 1 May 2018 20:37:51 -0400 Subject: [PATCH] rename inkstitch/ to lib/ You can't have a module and a package named the same thing. PyInstaller wants to import the main script as if it were a module, and this doesn't work unless there's no directory of the same name with a __init__.py in it. --- inkstitch.py | 4 ++-- {inkstitch => lib}/__init__.py | 4 ++-- {inkstitch => lib}/elements/__init__.py | 0 {inkstitch => lib}/elements/auto_fill.py | 0 {inkstitch => lib}/elements/element.py | 0 {inkstitch => lib}/elements/fill.py | 0 {inkstitch => lib}/elements/polyline.py | 0 {inkstitch => lib}/elements/satin_column.py | 0 {inkstitch => lib}/elements/stroke.py | 0 {inkstitch => lib}/extensions/__init__.py | 0 {inkstitch => lib}/extensions/base.py | 0 {inkstitch => lib}/extensions/embroider.py | 0 {inkstitch => lib}/extensions/input.py | 0 {inkstitch => lib}/extensions/palettes.py | 0 {inkstitch => lib}/extensions/params.py | 0 {inkstitch => lib}/extensions/print_pdf.py | 0 {inkstitch => lib}/extensions/simulate.py | 0 {inkstitch => lib}/simulator.py | 0 {inkstitch => lib}/stitch_plan/__init__.py | 0 {inkstitch => lib}/stitch_plan/stitch_plan.py | 0 {inkstitch => lib}/stitch_plan/stop.py | 0 {inkstitch => lib}/stitch_plan/ties.py | 0 {inkstitch => lib}/stitch_plan/trim.py | 0 {inkstitch => lib}/stitches/__init__.py | 0 {inkstitch => lib}/stitches/auto_fill.py | 0 {inkstitch => lib}/stitches/fill.py | 0 {inkstitch => lib}/stitches/running_stitch.py | 0 {inkstitch => lib}/svg.py | 0 {inkstitch => lib}/threads/__init__.py | 0 {inkstitch => lib}/threads/catalog.py | 0 {inkstitch => lib}/threads/color.py | 0 {inkstitch => lib}/threads/palette.py | 0 {inkstitch => lib}/utils/__init__.py | 0 {inkstitch => lib}/utils/cache.py | 0 {inkstitch => lib}/utils/geometry.py | 0 {inkstitch => lib}/utils/inkscape.py | 0 {inkstitch => lib}/utils/io.py | 0 37 files changed, 4 insertions(+), 4 deletions(-) rename {inkstitch => lib}/__init__.py (99%) rename {inkstitch => lib}/elements/__init__.py (100%) rename {inkstitch => lib}/elements/auto_fill.py (100%) rename {inkstitch => lib}/elements/element.py (100%) rename {inkstitch => lib}/elements/fill.py (100%) rename {inkstitch => lib}/elements/polyline.py (100%) rename {inkstitch => lib}/elements/satin_column.py (100%) rename {inkstitch => lib}/elements/stroke.py (100%) rename {inkstitch => lib}/extensions/__init__.py (100%) rename {inkstitch => lib}/extensions/base.py (100%) rename {inkstitch => lib}/extensions/embroider.py (100%) rename {inkstitch => lib}/extensions/input.py (100%) rename {inkstitch => lib}/extensions/palettes.py (100%) rename {inkstitch => lib}/extensions/params.py (100%) rename {inkstitch => lib}/extensions/print_pdf.py (100%) rename {inkstitch => lib}/extensions/simulate.py (100%) rename {inkstitch => lib}/simulator.py (100%) rename {inkstitch => lib}/stitch_plan/__init__.py (100%) rename {inkstitch => lib}/stitch_plan/stitch_plan.py (100%) rename {inkstitch => lib}/stitch_plan/stop.py (100%) rename {inkstitch => lib}/stitch_plan/ties.py (100%) rename {inkstitch => lib}/stitch_plan/trim.py (100%) rename {inkstitch => lib}/stitches/__init__.py (100%) rename {inkstitch => lib}/stitches/auto_fill.py (100%) rename {inkstitch => lib}/stitches/fill.py (100%) rename {inkstitch => lib}/stitches/running_stitch.py (100%) rename {inkstitch => lib}/svg.py (100%) rename {inkstitch => lib}/threads/__init__.py (100%) rename {inkstitch => lib}/threads/catalog.py (100%) rename {inkstitch => lib}/threads/color.py (100%) rename {inkstitch => lib}/threads/palette.py (100%) rename {inkstitch => lib}/utils/__init__.py (100%) rename {inkstitch => lib}/utils/cache.py (100%) rename {inkstitch => lib}/utils/geometry.py (100%) rename {inkstitch => lib}/utils/inkscape.py (100%) rename {inkstitch => lib}/utils/io.py (100%) diff --git a/inkstitch.py b/inkstitch.py index fe8d6ecb4..a9ce829eb 100644 --- a/inkstitch.py +++ b/inkstitch.py @@ -1,8 +1,8 @@ import sys import traceback from argparse import ArgumentParser -from inkstitch.utils import save_stderr, restore_stderr -from inkstitch import extensions +from lib.utils import save_stderr, restore_stderr +from lib import extensions parser = ArgumentParser() diff --git a/inkstitch/__init__.py b/lib/__init__.py similarity index 99% rename from inkstitch/__init__.py rename to lib/__init__.py index 45eed3a66..2c0ee6209 100644 --- a/inkstitch/__init__.py +++ b/lib/__init__.py @@ -7,8 +7,8 @@ import gettext from copy import deepcopy import math import libembroidery -from inkstitch.utils import cache -from inkstitch.utils.geometry import Point +from .utils import cache +from .utils.geometry import Point import inkex import simplepath diff --git a/inkstitch/elements/__init__.py b/lib/elements/__init__.py similarity index 100% rename from inkstitch/elements/__init__.py rename to lib/elements/__init__.py diff --git a/inkstitch/elements/auto_fill.py b/lib/elements/auto_fill.py similarity index 100% rename from inkstitch/elements/auto_fill.py rename to lib/elements/auto_fill.py diff --git a/inkstitch/elements/element.py b/lib/elements/element.py similarity index 100% rename from inkstitch/elements/element.py rename to lib/elements/element.py diff --git a/inkstitch/elements/fill.py b/lib/elements/fill.py similarity index 100% rename from inkstitch/elements/fill.py rename to lib/elements/fill.py diff --git a/inkstitch/elements/polyline.py b/lib/elements/polyline.py similarity index 100% rename from inkstitch/elements/polyline.py rename to lib/elements/polyline.py diff --git a/inkstitch/elements/satin_column.py b/lib/elements/satin_column.py similarity index 100% rename from inkstitch/elements/satin_column.py rename to lib/elements/satin_column.py diff --git a/inkstitch/elements/stroke.py b/lib/elements/stroke.py similarity index 100% rename from inkstitch/elements/stroke.py rename to lib/elements/stroke.py diff --git a/inkstitch/extensions/__init__.py b/lib/extensions/__init__.py similarity index 100% rename from inkstitch/extensions/__init__.py rename to lib/extensions/__init__.py diff --git a/inkstitch/extensions/base.py b/lib/extensions/base.py similarity index 100% rename from inkstitch/extensions/base.py rename to lib/extensions/base.py diff --git a/inkstitch/extensions/embroider.py b/lib/extensions/embroider.py similarity index 100% rename from inkstitch/extensions/embroider.py rename to lib/extensions/embroider.py diff --git a/inkstitch/extensions/input.py b/lib/extensions/input.py similarity index 100% rename from inkstitch/extensions/input.py rename to lib/extensions/input.py diff --git a/inkstitch/extensions/palettes.py b/lib/extensions/palettes.py similarity index 100% rename from inkstitch/extensions/palettes.py rename to lib/extensions/palettes.py diff --git a/inkstitch/extensions/params.py b/lib/extensions/params.py similarity index 100% rename from inkstitch/extensions/params.py rename to lib/extensions/params.py diff --git a/inkstitch/extensions/print_pdf.py b/lib/extensions/print_pdf.py similarity index 100% rename from inkstitch/extensions/print_pdf.py rename to lib/extensions/print_pdf.py diff --git a/inkstitch/extensions/simulate.py b/lib/extensions/simulate.py similarity index 100% rename from inkstitch/extensions/simulate.py rename to lib/extensions/simulate.py diff --git a/inkstitch/simulator.py b/lib/simulator.py similarity index 100% rename from inkstitch/simulator.py rename to lib/simulator.py diff --git a/inkstitch/stitch_plan/__init__.py b/lib/stitch_plan/__init__.py similarity index 100% rename from inkstitch/stitch_plan/__init__.py rename to lib/stitch_plan/__init__.py diff --git a/inkstitch/stitch_plan/stitch_plan.py b/lib/stitch_plan/stitch_plan.py similarity index 100% rename from inkstitch/stitch_plan/stitch_plan.py rename to lib/stitch_plan/stitch_plan.py diff --git a/inkstitch/stitch_plan/stop.py b/lib/stitch_plan/stop.py similarity index 100% rename from inkstitch/stitch_plan/stop.py rename to lib/stitch_plan/stop.py diff --git a/inkstitch/stitch_plan/ties.py b/lib/stitch_plan/ties.py similarity index 100% rename from inkstitch/stitch_plan/ties.py rename to lib/stitch_plan/ties.py diff --git a/inkstitch/stitch_plan/trim.py b/lib/stitch_plan/trim.py similarity index 100% rename from inkstitch/stitch_plan/trim.py rename to lib/stitch_plan/trim.py diff --git a/inkstitch/stitches/__init__.py b/lib/stitches/__init__.py similarity index 100% rename from inkstitch/stitches/__init__.py rename to lib/stitches/__init__.py diff --git a/inkstitch/stitches/auto_fill.py b/lib/stitches/auto_fill.py similarity index 100% rename from inkstitch/stitches/auto_fill.py rename to lib/stitches/auto_fill.py diff --git a/inkstitch/stitches/fill.py b/lib/stitches/fill.py similarity index 100% rename from inkstitch/stitches/fill.py rename to lib/stitches/fill.py diff --git a/inkstitch/stitches/running_stitch.py b/lib/stitches/running_stitch.py similarity index 100% rename from inkstitch/stitches/running_stitch.py rename to lib/stitches/running_stitch.py diff --git a/inkstitch/svg.py b/lib/svg.py similarity index 100% rename from inkstitch/svg.py rename to lib/svg.py diff --git a/inkstitch/threads/__init__.py b/lib/threads/__init__.py similarity index 100% rename from inkstitch/threads/__init__.py rename to lib/threads/__init__.py diff --git a/inkstitch/threads/catalog.py b/lib/threads/catalog.py similarity index 100% rename from inkstitch/threads/catalog.py rename to lib/threads/catalog.py diff --git a/inkstitch/threads/color.py b/lib/threads/color.py similarity index 100% rename from inkstitch/threads/color.py rename to lib/threads/color.py diff --git a/inkstitch/threads/palette.py b/lib/threads/palette.py similarity index 100% rename from inkstitch/threads/palette.py rename to lib/threads/palette.py diff --git a/inkstitch/utils/__init__.py b/lib/utils/__init__.py similarity index 100% rename from inkstitch/utils/__init__.py rename to lib/utils/__init__.py diff --git a/inkstitch/utils/cache.py b/lib/utils/cache.py similarity index 100% rename from inkstitch/utils/cache.py rename to lib/utils/cache.py diff --git a/inkstitch/utils/geometry.py b/lib/utils/geometry.py similarity index 100% rename from inkstitch/utils/geometry.py rename to lib/utils/geometry.py diff --git a/inkstitch/utils/inkscape.py b/lib/utils/inkscape.py similarity index 100% rename from inkstitch/utils/inkscape.py rename to lib/utils/inkscape.py diff --git a/inkstitch/utils/io.py b/lib/utils/io.py similarity index 100% rename from inkstitch/utils/io.py rename to lib/utils/io.py