From cca8045fd28653115953dcc7412826fd4387d913 Mon Sep 17 00:00:00 2001 From: Nicolas Spalinger Date: Thu, 22 Oct 2015 14:29:13 -0500 Subject: Modified setup.py and __main.py__ for Windows users. --- Lib/defconQt/__main__.py | 4 ++++ setup.py | 16 +++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Lib/defconQt/__main__.py b/Lib/defconQt/__main__.py index e583e5a..59cb671 100644 --- a/Lib/defconQt/__main__.py +++ b/Lib/defconQt/__main__.py @@ -6,6 +6,10 @@ import sys import os from PyQt5.QtGui import QIcon +def main(): + if __name__ == "__main__": + main() + if len(sys.argv) > 1: font = TFont(os.path.abspath(sys.argv[1])) else: diff --git a/setup.py b/setup.py index feb13ee..75664da 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,8 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- # import sys -from distutils.core import setup + +from setuptools import setup try: import fontTools # noqa @@ -11,13 +13,13 @@ except: try: import robofab # noqa except: - print("*** Warning: trufont requires RoboFab, see:") + print("*** Warning: trufont requires RoboFab (the python3-ufo3 branch), see:") print(" https://github.com/trufont/robofab") try: - import defcon #noqa + import defcon # noqa except: - print("*** Warning: trufont requires defcon, see:") + print("*** Warning: trufont requires defcon (the python3-ufo3 branch), see:") print(" https://github.com/trufont/defcon") # if "sdist" in sys.argv: @@ -51,7 +53,11 @@ setup( "defconQt.representationFactories", "defconQt.util", ], - scripts=["trufont"], + entry_points={ + 'gui_scripts': [ + "trufont = defconQt.__main__:main" + ] + }, package_dir={"": "Lib"}, platforms=["Linux","Win32","Mac OS X"], classifiers=[ -- cgit v1.2.3