Switch to more targeted CC specification
[cached-property.git] / setup.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 import os
5 import sys
6 import codecs
7
8 try:
9 from setuptools import setup
10 except ImportError:
11 from distutils.core import setup
12
13 __version__ = "1.5.1"
14
15
16 def read(fname):
17 return codecs.open(
18 os.path.join(os.path.dirname(__file__), fname), "r", "utf-8"
19 ).read()
20
21
22 readme = read("README.rst")
23 history = read("HISTORY.rst").replace(".. :changelog:", "")
24
25 if sys.argv[-1] == "publish":
26 os.system("python setup.py sdist bdist_wheel")
27 os.system("twine upload dist/*")
28 os.system("git tag -a %s -m 'version %s'" % (__version__, __version__))
29 os.system("git push --tags")
30 sys.exit()
31
32 setup(
33 name="cached-property",
34 version=__version__,
35 description="A decorator for caching properties in classes.",
36 long_description=readme + "\n\n" + history,
37 author="Daniel Greenfeld",
38 author_email="pydanny@gmail.com",
39 url="https://github.com/pydanny/cached-property",
40 py_modules=["cached_property"],
41 include_package_data=True,
42 license="BSD",
43 zip_safe=False,
44 keywords="cached-property",
45 classifiers=[
46 "Development Status :: 5 - Production/Stable",
47 "Intended Audience :: Developers",
48 "License :: OSI Approved :: BSD License",
49 "Natural Language :: English",
50 "Programming Language :: Python :: 2",
51 "Programming Language :: Python :: 2.7",
52 "Programming Language :: Python :: 3",
53 "Programming Language :: Python :: 3.4",
54 "Programming Language :: Python :: 3.5",
55 "Programming Language :: Python :: 3.6",
56 "Programming Language :: Python :: 3.7",
57 ],
58 )