Benjamin Peterson | a4d9af9 | 2020-01-06 18:42:54 -0800 | [diff] [blame] | 1 | # Copyright (c) 2010-2020 Benjamin Peterson |
Benjamin Peterson | 78833c7 | 2015-10-20 21:34:23 -0700 | [diff] [blame] | 2 | # |
| 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy |
| 4 | # of this software and associated documentation files (the "Software"), to deal |
| 5 | # in the Software without restriction, including without limitation the rights |
| 6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 7 | # copies of the Software, and to permit persons to whom the Software is |
| 8 | # furnished to do so, subject to the following conditions: |
| 9 | # |
| 10 | # The above copyright notice and this permission notice shall be included in all |
| 11 | # copies or substantial portions of the Software. |
| 12 | # |
| 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 19 | # SOFTWARE. |
| 20 | |
Benjamin Peterson | 5b59a78 | 2014-01-04 18:29:44 -0600 | [diff] [blame] | 21 | from __future__ import with_statement |
| 22 | |
Eli Schwartz | 7385912 | 2019-11-04 22:02:10 -0500 | [diff] [blame] | 23 | # Six is a dependency of setuptools, so using setuptools creates a |
| 24 | # circular dependency when building a Python stack from source. We |
| 25 | # therefore allow falling back to distutils to install six. |
| 26 | try: |
| 27 | from setuptools import setup |
| 28 | except ImportError: |
| 29 | from distutils.core import setup |
Benjamin Peterson | dfc800b | 2010-11-20 15:52:32 -0600 | [diff] [blame] | 30 | |
| 31 | import six |
| 32 | |
| 33 | six_classifiers = [ |
Jon Dufresne | 5d0bb5b | 2018-01-06 12:31:26 -0800 | [diff] [blame] | 34 | "Development Status :: 5 - Production/Stable", |
Benjamin Peterson | dfc800b | 2010-11-20 15:52:32 -0600 | [diff] [blame] | 35 | "Programming Language :: Python :: 2", |
| 36 | "Programming Language :: Python :: 3", |
| 37 | "Intended Audience :: Developers", |
| 38 | "License :: OSI Approved :: MIT License", |
| 39 | "Topic :: Software Development :: Libraries", |
| 40 | "Topic :: Utilities", |
| 41 | ] |
| 42 | |
Sviatoslav Sydorenko | c28fa79 | 2017-08-27 06:45:36 +0300 | [diff] [blame] | 43 | with open("README.rst", "r") as fp: |
Benjamin Peterson | dfc800b | 2010-11-20 15:52:32 -0600 | [diff] [blame] | 44 | six_long_description = fp.read() |
Benjamin Peterson | dfc800b | 2010-11-20 15:52:32 -0600 | [diff] [blame] | 45 | |
| 46 | setup(name="six", |
| 47 | version=six.__version__, |
| 48 | author="Benjamin Peterson", |
| 49 | author_email="benjamin@python.org", |
Benjamin Peterson | 8f26110 | 2018-07-07 11:51:00 -0700 | [diff] [blame] | 50 | url="https://github.com/benjaminp/six", |
Thomas Bechtold | 490148d | 2017-03-01 08:11:00 +0100 | [diff] [blame] | 51 | tests_require=["pytest"], |
Benjamin Peterson | dfc800b | 2010-11-20 15:52:32 -0600 | [diff] [blame] | 52 | py_modules=["six"], |
| 53 | description="Python 2 and 3 compatibility utilities", |
| 54 | long_description=six_long_description, |
Benjamin Peterson | 196bfb9 | 2014-01-04 23:37:35 -0600 | [diff] [blame] | 55 | license="MIT", |
Jon Dufresne | 34506dc | 2018-01-21 23:08:50 -0800 | [diff] [blame] | 56 | classifiers=six_classifiers, |
Hugo van Kemenade | ac4bdc5 | 2020-01-08 04:13:50 +0200 | [diff] [blame] | 57 | python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*", |
Benjamin Peterson | dfc800b | 2010-11-20 15:52:32 -0600 | [diff] [blame] | 58 | ) |