Be explicit about why we use ‘io.BytesIO’ for the fake file.
[python-gajja.git] / setup.py
blob1e17fa703e873d188a62a09764787b36157b5452
1 # -*- coding: utf-8; -*-
3 # setup.py
4 # Part of Gajja, a Python test double library.
6 # Copyright © 2008–2016 Ben Finney <ben+python@benfinney.id.au>
8 # This is free software: you may copy, modify, and/or distribute this work
9 # under the terms of the GNU General Public License as published by the
10 # Free Software Foundation; version 3 of that license or any later version.
11 # No warranty expressed or implied. See the file ‘LICENSE.GPL-3’ for details.
13 """ Distribution setup for Gajja code base. """
15 from __future__ import (absolute_import, unicode_literals)
17 import sys
18 import os
19 import os.path
20 import types
21 import pydoc
22 import email.utils
24 from setuptools import (setup, find_packages)
26 __metaclass__ = type
29 class SimpleNamespace:
30 """ A simple attribute-based namespace. """
33 setup_dir = os.path.dirname(__file__)
35 changelog = SimpleNamespace()
36 changelog.package = "gajja"
37 changelog.version = "0.1.3"
38 changelog.author = "Ben Finney <ben+python@benfinney.id.au>"
39 (author_name, author_email) = email.utils.parseaddr(changelog.author)
41 control_structure = dict()
42 control_structure['maintainer'] = changelog.author
43 (maintainer_name, maintainer_email) = email.utils.parseaddr(
44 control_structure['maintainer'])
45 control_structure['homepage'] = "https://notabug.org/bignose/python-gajja"
47 copyright_structure = SimpleNamespace()
48 license = SimpleNamespace()
49 license.synopsis = "GPLv3+"
50 copyright_structure.license = license
52 main_module = __import__(changelog.package)
53 (synopsis, long_description) = pydoc.splitdoc(pydoc.getdoc(main_module))
56 setup(
57 name=changelog.package,
58 version=str(changelog.version),
59 packages=find_packages(exclude=["test"]),
61 # Setuptools metadata.
62 maintainer=maintainer_name,
63 maintainer_email=maintainer_email,
64 zip_safe=False,
65 setup_requires=[
66 "python-debian",
68 test_suite="unittest2.collector",
69 tests_require=[
70 "unittest2 >=0.5.1",
71 "testtools",
72 "mock >=1.3",
74 install_requires=[
75 "setuptools",
76 "unittest2 >=0.5.1",
77 "testtools",
78 "mock >=1.3",
81 # PyPI metadata.
82 author=author_name,
83 author_email=author_email,
84 description=synopsis,
85 license=license.synopsis,
86 keywords="test double fake mock filesystem subprocess".split(),
87 url=control_structure['homepage'],
88 long_description=long_description,
89 classifiers=[
90 # Reference: http://pypi.python.org/pypi?%3Aaction=list_classifiers
91 "Development Status :: 3 - Alpha",
92 "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
93 "Operating System :: POSIX",
94 "Programming Language :: Python :: 2.7",
95 "Programming Language :: Python :: 3.3",
96 "Programming Language :: Python :: 3.4",
97 "Programming Language :: Python :: 3.5",
98 "Intended Audience :: Developers",
99 "Topic :: Software Development :: Testing",
104 # Local variables:
105 # coding: utf-8
106 # mode: python
107 # End:
108 # vim: fileencoding=utf-8 filetype=python :