Skip to content

Commit

Permalink
Merge pull request #46 from AllYarnsAreBeautiful/py-installer
Browse files Browse the repository at this point in the history
added loading with pyinstaller
  • Loading branch information
niccokunzmann committed Jul 14, 2016
2 parents 14b5898 + cacfd53 commit a755090
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
5 changes: 5 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# see https://packaging.python.org/appveyor/#adding-appveyor-support-to-your-project
clone_depth: 1
environment:

PYPI_PASSWORD:
secure: Gxrd9WI60wyczr9mHtiQHvJ45Oq0UyQZNrvUtKs2D5w=
PYPI_USERNAME: niccokunzmann3

matrix:

# For Python versions available on Appveyor, see
Expand Down
10 changes: 7 additions & 3 deletions knittingpattern/Loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,13 @@ def _relative_to_absolute(self, module_location, folder):
elif os.path.isdir(module_location):
path = module_location
else:
__import__(module_location)
module = sys.modules[module_location]
path = os.path.dirname(module.__file__)
module_folder = os.path.dirname(module_location)
if module_folder:
path = module_folder
else:
__import__(module_location)
module = sys.modules[module_location]
path = os.path.dirname(module.__file__)
absolute_path = os.path.join(path, folder)
return absolute_path

Expand Down
2 changes: 1 addition & 1 deletion knittingpattern/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# there should be no imports

#: the version of the knitting pattern library
__version__ = '0.1.10'
__version__ = '0.1.11'

#: an empty knitting pattern set as specification
EMPTY_KNITTING_PATTERN_SET = {"version": "0.1", "type": "knitting pattern",
Expand Down

0 comments on commit a755090

Please sign in to comment.