setup.py

Wed, 26 Feb 2020 12:48:21 +0000

author
Andy Buckley <andy@insectnation.org>
date
Wed, 26 Feb 2020 12:48:21 +0000
changeset 28
1088bb11189f
parent 24
02f21810d43d
permissions
-rwxr-xr-x

Update to the 2020s

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

mercurial