Update README.md
[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.2"
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.md")
23 history = read("HISTORY.md")
24
25 if sys.argv[-1] == "publish":
26 try:
27 import wheel
28 import twine
29 except: # Yes, this is not how we usually do try/except
30 raise ImportError('Run "pip install wheel twine"')
31 os.system("python setup.py sdist bdist_wheel")
32 os.system("twine upload dist/*")
33 os.system("git tag -a %s -m 'version %s'" % (__version__, __version__))
34 os.system("git push --tags")
35 sys.exit()
36
37 setup(
38 name="cached-property",
39 version=__version__,
40 description="A decorator for caching properties in classes.",
41 long_description=readme + "\n\n" + history,
42 long_description_content_type="text/x-md",
43 author="Daniel Greenfeld",
44 author_email="pydanny@gmail.com",
45 url="https://github.com/pydanny/cached-property",
46 py_modules=["cached_property"],
47 include_package_data=True,
48 license="BSD",
49 zip_safe=False,
50 keywords="cached-property",
51 classifiers=[
52 "Development Status :: 5 - Production/Stable",
53 "Intended Audience :: Developers",
54 "License :: OSI Approved :: BSD License",
55 "Natural Language :: English",
56 "Programming Language :: Python :: 2",
57 "Programming Language :: Python :: 2.7",
58 "Programming Language :: Python :: 3",
59 "Programming Language :: Python :: 3.5",
60 "Programming Language :: Python :: 3.6",
61 "Programming Language :: Python :: 3.7",
62 "Programming Language :: Python :: 3.8",
63 ],
64 )