setup.py

Wed, 24 Apr 2013 10:37:45 +0200

author
Andy Buckley <andy@insectnation.org>
date
Wed, 24 Apr 2013 10:37:45 +0200
changeset 24
02f21810d43d
parent 21
71e18d3b1685
child 28
1088bb11189f
permissions
-rwxr-xr-x

Adding -1/--one-pageand --exclude options, and various tweaks

andy@13 1 #! /usr/bin/env python
andy@13 2
andy@15 3 """\
andy@24 4 emin makes static Web pages for presenting lots of imagey things: photos, PDFs,
andy@24 5 graphs with thumbnails as well as links to the image/doc file proper.
andy@13 6
andy@24 7 It's primarily intended for making Web photo galleries for the sorts of people
andy@24 8 who don't want to install some PHP monstrosity just to put their photos
andy@24 9 online. On the assumption that most people will want to tweak their gallery's
andy@24 10 appearance, the output is fully customisable using the Cheetah templating
andy@24 11 engine.
andy@24 12
andy@24 13 Supported image formats are JPEG, PNG, GIF, TIFF, PDF and EPS, with the latter
andy@24 14 two being converted to PNG for Web display. Image resizing, renaming and
andy@24 15 thumbnailing is supported, as is building a zip file to download the whole
andy@24 16 set. Large image sets can be split over several pages.
andy@13 17 """
andy@13 18
andy@15 19 ## Get setuptools stuff
andy@19 20 from distutils.core import setup
andy@15 21
andy@15 22
andy@24 23 ## Try to import Cheetah templating
andy@24 24 try:
andy@24 25 from Cheetah.Template import Template
andy@24 26 except Exception, e:
andy@24 27 logging.error("Couldn't import required Cheetah package: please install Cheetah first")
andy@24 28 exit(1)
andy@24 29
andy@24 30 ## Try to import Python Imaging Library
andy@24 31 try:
andy@24 32 import PIL.Image
andy@24 33 except Exception, e:
andy@24 34 logging.error("Couldn't import required Python Imaging Library package: please install PIL first")
andy@24 35 exit(1)
andy@24 36
andy@24 37
andy@13 38 ## Setup definition
andy@13 39 setup(name = 'emin',
andy@24 40 version = "0.3.4",
andy@13 41 scripts = ['emin'],
andy@21 42 requires = ["Cheetah", "PIL"],
andy@18 43 author = 'Andy Buckley',
andy@13 44 author_email = 'andy@insectnation.org',
andy@13 45 #url = 'http://www.insectnation.org/projects/emin/',
andy@13 46 description = 'A simple builder of static Web galleries.',
andy@15 47 long_description = __doc__,
andy@13 48 keywords = 'photo gallery web www html template',
andy@13 49 license = 'GPL',
andy@13 50 classifiers = ['Development Status :: 4 - Beta',
andy@18 51 'Environment :: Console',
andy@13 52 'License :: OSI Approved :: GNU General Public License (GPL)',
andy@13 53 'Operating System :: OS Independent',
andy@13 54 'Programming Language :: Python']
andy@13 55 )

mercurial