diff options
| author | Denis Jacquerye | 2015-10-23 10:09:25 +0100 |
|---|---|---|
| committer | Denis Jacquerye | 2015-10-23 10:09:25 +0100 |
| commit | 2a9853fb0120b5ca3f4bec7327a858f6066b3fbe (patch) | |
| tree | 3e91aae562f876e77780be2cbfbf9b7edebd9e91 | |
| parent | 9a711a5c508071656e84a70c58869763c990e798 (diff) | |
| parent | cc479ee8aa0c42f637e10a5fb71a210c43f7a989 (diff) | |
| download | trufont-2a9853fb0120b5ca3f4bec7327a858f6066b3fbe.tar.bz2 | |
Merge pull request #45 from n7s/master
| -rw-r--r-- | INSTALL.txt | 50 | ||||
| -rw-r--r-- | Lib/defconQt/__main__.py | 38 | ||||
| -rw-r--r-- | setup.py | 36 |
3 files changed, 98 insertions, 26 deletions
diff --git a/INSTALL.txt b/INSTALL.txt index 50a962d..6d48ebe 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -1,4 +1,50 @@ -To install this package, type the following in the command line: - python setup.py install +Installation steps for Ubuntu/Debian +===================================== + +(Note that we are using version 3.4 of python). + + +sudo apt-get install -qq -y python3-pyqt5 python3-flake8 + +git clone --depth=1 --branch=python3-ufo3 https://github.com/trufont/robofab +git clone --depth=1 --branch=python3-ufo3 https://github.com/trufont/defcon +git clone --depth=1 --branch=python3-ufo3 https://github.com/trufont/ufo2fdk +git clone --depth=1 https://github.com/behdad/fonttools.git + +cd defcon +sudo python3.4 setup.py install --record installed-files.txt + +cd ../robofab +sudo python3.4 setup.py install --record installed-files.txt + +cd ../ufo2fdk +sudo python3.4 setup.py install --record installed-files.txt + +cd ../fonttools +sudo python3.4 setup.py install --record installed-files.txt + +cd ../trufont +sudo python3.4 setup.py install --record installed-files.txt + +To run trufont: +python3.4 -m defconQt + + +To uninstall cleanly the various modules and trufont +==================================================== + +The various python modules are installed in +/usr/local/lib/python3.4/dist-packages/ + +You can delete the subfolders manually or depending on the package, you can also rely on pip or the listing of files you have recorded. + +sudo apt-get install python3-pip +sudo pip3 uninstall robofab defcon ufo2fdk ufoLib defconQt + +to get rid of all the remaining files installed : (careful with rm) +cat installed-files.txt | xargs sudo rm --verbose -vr + + + diff --git a/Lib/defconQt/__main__.py b/Lib/defconQt/__main__.py index e583e5a..663a4b7 100644 --- a/Lib/defconQt/__main__.py +++ b/Lib/defconQt/__main__.py @@ -6,20 +6,26 @@ import sys import os from PyQt5.QtGui import QIcon -if len(sys.argv) > 1: - font = TFont(os.path.abspath(sys.argv[1])) -else: - font = None -# from pycallgraph import PyCallGraph -# from pycallgraph.output import GraphvizOutput -representationFactories.registerAllFactories() -# with PyCallGraph(output=GraphvizOutput()): -app = Application(sys.argv) -# TODO: http://stackoverflow.com/a/21330349/2037879 -app.setOrganizationName("A. Tétar & Co.") -app.setApplicationName("TruFont") -app.setWindowIcon(QIcon(":/resources/app.png")) -window = MainWindow(font) -window.show() -sys.exit(app.exec_()) +def main(): + + if len(sys.argv) > 1: + font = TFont(os.path.abspath(sys.argv[1])) + else: + font = None + + # from pycallgraph import PyCallGraph + # from pycallgraph.output import GraphvizOutput + representationFactories.registerAllFactories() + # with PyCallGraph(output=GraphvizOutput()): + app = Application(sys.argv) + # TODO: http://stackoverflow.com/a/21330349/2037879 + app.setOrganizationName("A. Tétar & Co.") + app.setApplicationName("TruFont") + app.setWindowIcon(QIcon(":/resources/app.png")) + window = MainWindow(font) + window.show() + sys.exit(app.exec_()) + +if __name__ == "__main__": + main() @@ -1,18 +1,26 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- # import sys -from distutils.core import setup + +from setuptools import setup try: import fontTools # noqa except: - print("*** Warning: defcon requires FontTools, see:") - print(" fonttools.sf.net") + print("*** Warning: trufont requires FontTools, see:") + print(" https://github.com/behdad/fonttools/") try: import robofab # noqa except: - print("*** Warning: defcon requires RoboFab, see:") - print(" robofab.com") + print("*** Warning: trufont requires RoboFab (the python3-ufo3 branch), see:") + print(" https://github.com/trufont/robofab") + +try: + import defcon # noqa +except: + print("*** Warning: trufont requires defcon (the python3-ufo3 branch), see:") + print(" https://github.com/trufont/defcon") # if "sdist" in sys.argv: # import os @@ -33,10 +41,10 @@ except: setup( name="defconQt", version="0.1.0", - description="A set of Qt interface objects for working with font data.", + description="Trufont, a cross-platform font editor (a set of Qt interface objects for working with font data).", author="Adrien Tétar", author_email="adri-from-59@hotmail.fr", - # url="", + url="http://trufont.github.io", license="GNU LGPL 2.1/GNU GPL v3", packages=[ "defconQt", @@ -45,5 +53,17 @@ setup( "defconQt.representationFactories", "defconQt.util", ], - package_dir={"": "Lib"} + entry_points={ + 'gui_scripts': [ + "trufont = defconQt.__main__:main" + ] + }, + package_dir={"": "Lib"}, + platforms=["Linux","Win32","Mac OS X"], + classifiers=[ + "Environment :: GUI", + "Programming Language :: Python :: 3.4", + "Intended Audience :: Developers", + "Topic :: Text Processing :: Fonts", + ], ) |
