1#! /usr/bin/env python
2
3# Copyright 2009 Google Inc. All Rights Reserved.
4# Copyright 2014 Altera Corporation. All Rights Reserved.
5# Copyright 2014-2015 John McGehee
6#
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11#     http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18
19
20from fake_filesystem import __version__
21
22import os
23
24
25NAME = 'pyfakefs'
26MODULES = ['fake_filesystem',
27           'fake_filesystem_glob',
28           'fake_filesystem_shutil',
29           'fake_tempfile',
30           'fake_filesystem_unittest']
31REQUIRES = ['mox3']
32DESCRIPTION = 'Fake file system for testing file operations without touching the real file system.'
33
34URL = "https://github.com/jmcgeheeiv/pyfakefs"
35
36readme = os.path.join(os.path.dirname(__file__), 'README.md')
37LONG_DESCRIPTION = open(readme).read()
38
39CLASSIFIERS = [
40    'Development Status :: 5 - Production/Stable',
41    'Environment :: Console',
42    'Intended Audience :: Developers',
43    'License :: OSI Approved :: Apache Software License',
44    'Programming Language :: Python',
45    'Programming Language :: Python :: 2.6',
46    'Programming Language :: Python :: 2.7',
47    'Programming Language :: Python :: 3.2',
48    'Programming Language :: Python :: 3.3',
49    'Programming Language :: Python :: 3.4',
50    'Operating System :: POSIX',
51    'Operating System :: MacOS',
52    'Operating System :: Microsoft :: Windows',
53    'Topic :: Software Development :: Libraries',
54    'Topic :: Software Development :: Libraries :: Python Modules',
55    'Topic :: Software Development :: Testing',
56    'Topic :: System :: Filesystems',
57]
58
59AUTHOR = 'Google and John McGehee'
60AUTHOR_EMAIL = 'github@johnnado,com'
61KEYWORDS = ("testing test file os shutil glob mocking unittest "
62            "fakes filesystem unit").split(' ')
63
64params = dict(
65    name=NAME,
66    version=__version__,
67    py_modules=MODULES,
68    install_requires=REQUIRES,
69
70    # metadata for upload to PyPI
71    author=AUTHOR,
72    author_email=AUTHOR_EMAIL,
73    description=DESCRIPTION,
74    long_description=LONG_DESCRIPTION,
75    keywords=KEYWORDS,
76    url=URL,
77    classifiers=CLASSIFIERS,
78)
79
80try:
81    from setuptools import setup
82except ImportError:
83    from distutils.core import setup
84else:
85    params['tests_require'] = ['unittest2']
86    params['test_suite'] = 'unittest2.collector'
87
88setup(**params) # pylint: disable = W0142
89