1- """contentstack - decorator heavy REST client library for Python."""
1+ # !/usr/bin/env python
2+ # distutils/setuptools install script.
23
34from setuptools import setup , find_packages
45import os
56import re
67
8+ ROOT = os .path .dirname (__file__ )
9+ VERSION_RE = re .compile (r'''__version__ = ['"]([0-9.]+)['"]''' )
10+
11+
12+ def get_version ():
13+ init = open (os .path .join (ROOT , 'contentstack' , '__init__.py' )).read ()
14+ return VERSION_RE .search (init ).group (1 )
15+
16+
717package = 'contentstack'
818
919
@@ -17,20 +27,12 @@ def read(fname):
1727 'python-dateutil'
1828]
1929
20-
21- def get_version ():
22- """Return package version as listed in `__version__` in `init.py`."""
23- init_py = open ('decorest/__init__.py' ).read ()
24- return re .search ("__version__ = ['\" ]([^'\" ]+)['\" ]" , init_py ).group (1 )
25-
26-
27- version = get_version ()
28-
2930setup (
30- name = 'contentstack-python' ,
31- version = version ,
31+
32+ name = 'contentstack' ,
33+ version = get_version (),
3234 packages = find_packages (exclude = ['tests' ]),
33- url = 'https://www.contentstack. com' ,
35+ url = 'https://github. com/contentstack/contentstack-python ' ,
3436 license = 'MIT License' ,
3537 author = 'Shailesh Mishra' ,
3638 author_email = 'shailesh.mishra@contentstack.com' ,
@@ -39,13 +41,13 @@ def get_version():
3941 tests_require = ['pytest' ],
4042 long_description = read ('README.rst' ),
4143 include_package_data = True ,
44+
4245 classifiers = [
43- 'Development Status :: 1 - Alpha' ,
46+ "License :: OSI Approved :: MIT License" ,
47+ "Operating System :: OS Independent" ,
4448 'Intended Audience :: Developers' ,
4549 'Natural Language :: English' ,
46- 'License :: OSI Approved :: MIT License' ,
47- 'Operating System :: OS Independent' ,
4850 'Programming Language :: Python' ,
49- 'Programming Language :: Python :: 3.6'
50- ]
51+ 'Programming Language :: Python :: 3.7' ,
52+ ],
5153)
0 commit comments