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’ library. """
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 readme_file_path
= os
.path
.join(setup_dir
, "README")
36 with
open(readme_file_path
) as readme_file
:
37 (synopsis
, long_description
) = pydoc
.splitdoc(readme_file
.read())
39 changelog
= SimpleNamespace()
40 changelog
.package
= "gajja"
41 changelog
.version
= "0.1"
42 changelog
.author
= "Ben Finney <ben+python@benfinney.id.au>"
43 (author_name
, author_email
) = email
.utils
.parseaddr(changelog
.author
)
45 control_structure
= dict()
46 control_structure
['maintainer'] = changelog
.author
47 (maintainer_name
, maintainer_email
) = email
.utils
.parseaddr(
48 control_structure
['maintainer'])
49 control_structure
['homepage'] = "https://notabug.org/bignose/python-gajja"
51 copyright_structure
= SimpleNamespace()
52 license
= SimpleNamespace()
53 license
.synopsis
= "GPLv3+"
54 copyright_structure
.license
= license
58 name
=changelog
.package
,
59 version
=str(changelog
.version
),
60 packages
=find_packages(exclude
=["test"]),
62 # Setuptools metadata.
63 maintainer
=maintainer_name
,
64 maintainer_email
=maintainer_email
,
69 test_suite
="unittest2.collector",
73 "testscenarios >=0.4",
81 "testscenarios >=0.4",
87 author_email
=author_email
,
89 license
=license
.synopsis
,
90 keywords
="test double fake mock filesystem subprocess".split(),
91 url
=control_structure
['homepage'],
92 long_description
=long_description
,
94 # Reference: http://pypi.python.org/pypi?%3Aaction=list_classifiers
95 "Development Status :: 3 - Alpha",
96 "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
97 "Operating System :: POSIX",
98 "Programming Language :: Python :: 2.7",
99 "Programming Language :: Python :: 3.3",
100 "Programming Language :: Python :: 3.4",
101 "Programming Language :: Python :: 3.5",
102 "Intended Audience :: Developers",
103 "Topic :: Software Development :: Testing",
112 # vim: fileencoding=utf-8 filetype=python :