From 65bdf9c0b76275483220f82a5b53970fa7935b78 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 20 Dec 2006 06:31:37 +0000 Subject: [PATCH] Add ui includes to setup.py to address #7 --- libprs500/__init__.py | 2 +- libprs500/gui/__init__.py | 2 +- setup.py | 29 +++++++++++++++++++++-------- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/libprs500/__init__.py b/libprs500/__init__.py index 44ffff40fc..cc67dab5d9 100644 --- a/libprs500/__init__.py +++ b/libprs500/__init__.py @@ -32,7 +32,7 @@ the following rule in C{/etc/udev/rules.d/90-local.rules} :: BUS=="usb", SYSFS{idProduct}=="029b", SYSFS{idVendor}=="054c", MODE="660", GROUP="plugdev" You may have to adjust the GROUP and the location of the rules file to suit your distribution. """ -__version__ = "0.3.0a3" +__version__ = "0.3.0a4" __docformat__ = "epytext" __author__ = "Kovid Goyal " TEMPORARY_FILENAME_TEMPLATE = "libprs500_"+__version__+"_temp" diff --git a/libprs500/gui/__init__.py b/libprs500/gui/__init__.py index 80a795bef6..cb0419836b 100644 --- a/libprs500/gui/__init__.py +++ b/libprs500/gui/__init__.py @@ -50,7 +50,7 @@ def import_ui(name): uifile = pkg_resources.resource_stream(__name__, name) code_string = StringIO.StringIO() winfo = compiler.UICompiler().compileUi(uifile, code_string) - ui = pkg_resources.resource_filename(__name__, name) + #ui = pkg_resources.resource_filename(__name__, name) exec code_string.getvalue() return locals()[winfo["uiclass"]] diff --git a/setup.py b/setup.py index 21139504b3..816ab64695 100644 --- a/setup.py +++ b/setup.py @@ -34,6 +34,7 @@ if sys.hexversion < 0x2050000: print >> sys.stderr, "You must use python >= 2.5 Try invoking this script as python2.5 setup.py." print >> sys.stderr, "If you are using easy_install, try easy_install-2.5" sys.exit(1) + setup( name='libprs500', @@ -41,9 +42,13 @@ setup( version=VERSION, author='Kovid Goyal', author_email='kovid@kovidgoyal.net', - url = 'http://libprs500.kovidgoyal.net', + url = 'http://libprs500.kovidgoyal.net', + package_data = { 'libprs500.gui' : ['*.ui'] }, entry_points = { - 'console_scripts': [ 'prs500 = libprs500.cli.main:main', 'lrf-meta = libprs500.lrf.meta:main' ], + 'console_scripts': [ \ + 'prs500 = libprs500.cli.main:main', \ + 'lrf-meta = libprs500.lrf.meta:main' \ + ], 'gui_scripts' : [ 'prs500-gui = libprs500.gui.main:main'] }, zip_safe = True, @@ -51,16 +56,24 @@ setup( dependency_links=["http://sourceforge.net/project/showfiles.php?group_id=6473", "http://easynews.dl.sourceforge.net/sourceforge/pyusb/pyusb-0.3.5.tar.gz", ], - description='Library to interface with the Sony Portable Reader 500 over USB. Also has a GUI with library management features.', + description = + """ + Library to interface with the Sony Portable Reader 500 + over USB. Also has a GUI with library management features. + """, long_description = """ - libprs500 is library to interface with the `SONY Portable Reader`_ over USB_. + libprs500 is library to interface with the + `SONY Portable Reader`_ over USB_. It provides methods to list the contents of the file system on the device, as well as copy files from and to the device. - It also provides a command line and a graphical user interface via the commands prs500 and - prs500-gui. The graphical user interface is designed to manage an ebook library and allows for easy + It also provides a command line and a graphical user interface via + the commands prs500 and + prs500-gui. The graphical user interface is designed to + manage an ebook library and allows for easy syncing between the library and the ebook reader. - In addition libprs500 has a utility to read/write the metadata from LRF files (unencrypted books in the SONY BBeB format). A command line + In addition libprs500 has a utility to read/write the metadata + from LRF files (unencrypted books in the SONY BBeB format). A command line interface to this is provided via the command lrf-meta. For SVN access: svn co https://svn.kovidgoyal.net/code/prs-500 @@ -81,7 +94,7 @@ setup( 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: System :: Hardware :: Hardware Drivers' - ] + ] ) try: