setup.py

changeset 28
1088bb11189f
parent 24
02f21810d43d
equal deleted inserted replaced
27:4ce678884842 28:1088bb11189f
5 graphs with thumbnails as well as links to the image/doc file proper. 5 graphs with thumbnails as well as links to the image/doc file proper.
6 6
7 It's primarily intended for making Web photo galleries for the sorts of people 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 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 9 online. On the assumption that most people will want to tweak their gallery's
10 appearance, the output is fully customisable using the Cheetah templating 10 appearance, the output is customisable using the Cheetah templating engine.
11 engine.
12 11
13 Supported image formats are JPEG, PNG, GIF, TIFF, PDF and EPS, with the latter 12 Supported image formats are JPEG, PNG, GIF, TIFF, PDF and EPS, with the latter
14 two being converted to PNG for Web display. Image resizing, renaming and 13 two being converted to PNG for Web display. Image resizing, renaming and
15 thumbnailing is supported, as is building a zip file to download the whole 14 thumbnailing is supported, as is building a zip file to download the whole
16 set. Large image sets can be split over several pages. 15 set. Large image sets can be split over several pages.
17 """ 16 """
18 17
18 ## Py3 comptibility
19 from __future__ import print_function
20
19 ## Get setuptools stuff 21 ## Get setuptools stuff
20 from distutils.core import setup 22 #from distutils.core import setup
21 23 from setuptools import setup
22
23 ## Try to import Cheetah templating
24 try:
25 from Cheetah.Template import Template
26 except Exception, e:
27 logging.error("Couldn't import required Cheetah package: please install Cheetah first")
28 exit(1)
29
30 ## Try to import Python Imaging Library
31 try:
32 import PIL.Image
33 except Exception, e:
34 logging.error("Couldn't import required Python Imaging Library package: please install PIL first")
35 exit(1)
36 24
37 25
38 ## Setup definition 26 ## Setup definition
39 setup(name = 'emin', 27 setup(name = 'emin',
40 version = "0.3.4", 28 version = "0.4.0",
41 scripts = ['emin'], 29 scripts = ['emin'],
42 requires = ["Cheetah", "PIL"], 30 requires = ["Cheetah", "PIL"],
31 install_requires = ["Cheetah3", "Pillow", "pdf2image"],
32 python_requires = ">=3",
43 author = 'Andy Buckley', 33 author = 'Andy Buckley',
44 author_email = 'andy@insectnation.org', 34 author_email = 'andy@insectnation.org',
45 #url = 'http://www.insectnation.org/projects/emin/', 35 #url = 'http://www.insectnation.org/projects/emin/',
46 description = 'A simple builder of static Web galleries.', 36 description = 'A simple builder of static Web galleries.',
47 long_description = __doc__, 37 long_description = __doc__,
51 'Environment :: Console', 41 'Environment :: Console',
52 'License :: OSI Approved :: GNU General Public License (GPL)', 42 'License :: OSI Approved :: GNU General Public License (GPL)',
53 'Operating System :: OS Independent', 43 'Operating System :: OS Independent',
54 'Programming Language :: Python'] 44 'Programming Language :: Python']
55 ) 45 )
46
47
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)
55
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)
62
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