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

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@28 10 appearance, the output is customisable using the Cheetah templating engine.
andy@24 11
andy@24 12 Supported image formats are JPEG, PNG, GIF, TIFF, PDF and EPS, with the latter
andy@24 13 two being converted to PNG for Web display. Image resizing, renaming and
andy@24 14 thumbnailing is supported, as is building a zip file to download the whole
andy@24 15 set. Large image sets can be split over several pages.
andy@13 16 """
andy@13 17
andy@28 18 ## Py3 comptibility
andy@28 19 from __future__ import print_function
andy@28 20
andy@15 21 ## Get setuptools stuff
andy@28 22 #from distutils.core import setup
andy@28 23 from setuptools import setup
andy@24 24
andy@24 25
andy@13 26 ## Setup definition
andy@13 27 setup(name = 'emin',
andy@28 28 version = "0.4.0",
andy@13 29 scripts = ['emin'],
andy@21 30 requires = ["Cheetah", "PIL"],
andy@28 31 install_requires = ["Cheetah3", "Pillow", "pdf2image"],
andy@28 32 python_requires = ">=3",
andy@18 33 author = 'Andy Buckley',
andy@13 34 author_email = 'andy@insectnation.org',
andy@13 35 #url = 'http://www.insectnation.org/projects/emin/',
andy@13 36 description = 'A simple builder of static Web galleries.',
andy@15 37 long_description = __doc__,
andy@13 38 keywords = 'photo gallery web www html template',
andy@13 39 license = 'GPL',
andy@13 40 classifiers = ['Development Status :: 4 - Beta',
andy@18 41 'Environment :: Console',
andy@13 42 'License :: OSI Approved :: GNU General Public License (GPL)',
andy@13 43 'Operating System :: OS Independent',
andy@13 44 'Programming Language :: Python']
andy@13 45 )
andy@28 46
andy@28 47
andy@28 48 ## Try to import Cheetah templating
andy@28 49 try:
andy@28 50 import Cheetah
andy@28 51 from Cheetah.Template import Template
andy@28 52 except Exception as e:
andy@28 53 print("Couldn't import required Cheetah package")
andy@28 54 exit(1)
andy@28 55
andy@28 56 ## Try to import Python Imaging Library
andy@28 57 try:
andy@28 58 import PIL.Image
andy@28 59 except Exception as e:
andy@28 60 print("Couldn't import required Python Imaging Library package")
andy@28 61 exit(1)
andy@28 62
andy@28 63 ## Try to import pdf2image converter
andy@28 64 try:
andy@28 65 import pdf2image
andy@28 66 except Exception as e:
andy@28 67 print("Couldn't import optional pdf2image package")

mercurial