1 # -*- coding: utf-8; -*-
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
)
24 from setuptools
import (setup
, find_packages
)
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.2"
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
))
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
,
68 test_suite
="unittest2.collector",
83 author_email
=author_email
,
85 license
=license
.synopsis
,
86 keywords
="test double fake mock filesystem subprocess".split(),
87 url
=control_structure
['homepage'],
88 long_description
=long_description
,
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",
108 # vim: fileencoding=utf-8 filetype=python :