Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 69 lines (62 sloc) 1.779 kB
cc5f22b @douglatornell Update packaging for Python 2.7/3.2 unified codebase.
douglatornell authored
1 # -*- coding: utf-8 -*-
c25c0ff @EnigmaCurry Use lib3to2 automatically when installing from Python 2.x.
authored
2 import sys
cc5f22b @douglatornell Update packaging for Python 2.7/3.2 unified codebase.
douglatornell authored
3 from setuptools import setup
4 import blogofile
c25c0ff @EnigmaCurry Use lib3to2 automatically when installing from Python 2.x.
authored
5
6
cc5f22b @douglatornell Update packaging for Python 2.7/3.2 unified codebase.
douglatornell authored
7 py_version = sys.version_info[:2]
8 PY3 = py_version[0] == 3
ec1a9b5 @douglatornell Add Python 2.6 support to packaging.
douglatornell authored
9 PY26 = py_version == (2, 6)
cc5f22b @douglatornell Update packaging for Python 2.7/3.2 unified codebase.
douglatornell authored
10 if PY3:
11 if py_version < (3, 2):
12 raise RuntimeError(
5e147dc @douglatornell Goodbye site_init directory.
douglatornell authored
13 'On Python 3, Blogofile requires Python 3.2 or later')
f862261 @EnigmaCurry sdist tarball installs on both pythons 3.2 and 2.7! Unit tests still
authored
14 else:
ec1a9b5 @douglatornell Add Python 2.6 support to packaging.
douglatornell authored
15 if py_version < (2, 6):
cc5f22b @douglatornell Update packaging for Python 2.7/3.2 unified codebase.
douglatornell authored
16 raise RuntimeError(
5e147dc @douglatornell Goodbye site_init directory.
douglatornell authored
17 'On Python 2, Blogofile requires Python 2.6 or later')
de4cc86 @EnigmaCurry Selenium tests are working in both py32 and py27.
authored
18
ec1a9b5 @douglatornell Add Python 2.6 support to packaging.
douglatornell authored
19 with open('README.rst', 'rt') as readme:
cc5f22b @douglatornell Update packaging for Python 2.7/3.2 unified codebase.
douglatornell authored
20 long_description = readme.read()
21 with open('CHANGES.txt', 'rt') as changes:
22 long_description += '\n\n' + changes.read()
35c6d58 @douglatornell Remove version pinning as much as possible.
douglatornell authored
23
24 install_requires = [
25 'docutils',
26 'Jinja2',
27 'Mako',
28 'Markdown',
29 'MarkupSafe',
30 'Pygments',
31 'pytz',
32 'PyYAML',
33 'six',
34 'Unidecode',
a8ec638 @EnigmaCurry textile supports 3.0 now, so remove version hack
authored
35 'textile'
35c6d58 @douglatornell Remove version pinning as much as possible.
douglatornell authored
36 ]
cc5f22b @douglatornell Update packaging for Python 2.7/3.2 unified codebase.
douglatornell authored
37 dependency_links = []
ec1a9b5 @douglatornell Add Python 2.6 support to packaging.
douglatornell authored
38 if PY26:
39 install_requires.append('argparse')
9517c5a @EnigmaCurry Tests now run with "python setup.py test"
authored
40
cc5f22b @douglatornell Update packaging for Python 2.7/3.2 unified codebase.
douglatornell authored
41 classifiers = [
42 'Programming Language :: Python :: {0}'.format(py_version)
ec1a9b5 @douglatornell Add Python 2.6 support to packaging.
douglatornell authored
43 for py_version in ['2', '2.6', '2.7', '3', '3.2']]
cc5f22b @douglatornell Update packaging for Python 2.7/3.2 unified codebase.
douglatornell authored
44 classifiers.extend([
45 'Development Status :: 4 - Beta',
46 'License :: OSI Approved :: MIT License',
47 'Programming Language :: Python :: Implementation :: CPython',
48 'Environment :: Console',
35cb483 @douglatornell Prep for 0.8b1 release.
douglatornell authored
49 'Natural Language :: English',
cc5f22b @douglatornell Update packaging for Python 2.7/3.2 unified codebase.
douglatornell authored
50 ])
de4cc86 @EnigmaCurry Selenium tests are working in both py32 and py27.
authored
51
cc5f22b @douglatornell Update packaging for Python 2.7/3.2 unified codebase.
douglatornell authored
52 setup(
53 name="Blogofile",
54 version=blogofile.__version__,
55 description="A static website compiler and blog engine",
56 long_description=long_description,
35cb483 @douglatornell Prep for 0.8b1 release.
douglatornell authored
57 author=blogofile.__author__,
cc5f22b @douglatornell Update packaging for Python 2.7/3.2 unified codebase.
douglatornell authored
58 author_email="blogofile-discuss@googlegroups.com",
59 url="http://www.blogofile.com",
60 license="MIT",
61 classifiers=classifiers,
5e147dc @douglatornell Goodbye site_init directory.
douglatornell authored
62 packages=["blogofile"],
cc5f22b @douglatornell Update packaging for Python 2.7/3.2 unified codebase.
douglatornell authored
63 install_requires=install_requires,
64 dependency_links=dependency_links,
35cb483 @douglatornell Prep for 0.8b1 release.
douglatornell authored
65 zip_safe=False,
cc5f22b @douglatornell Update packaging for Python 2.7/3.2 unified codebase.
douglatornell authored
66 entry_points={
67 'console_scripts': ['blogofile = blogofile.main:main']},
68 )
Something went wrong with that request. Please try again.