File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010from contentstack .stack import Stack
1111from .utility import Utils
1212
13- __title__ = 'contentstack-python'
13+ __title__ = 'contentstack-delivery- python'
1414__author__ = 'contentstack'
1515__status__ = 'debug'
1616__version__ = 'v1.8.1'
Original file line number Diff line number Diff line change 88from contentstack .contenttype import ContentType
99from contentstack .https_connection import HTTPSConnection
1010from contentstack .image_transform import ImageTransform
11+ from contentstack import __author__
12+ from contentstack import __developer_email__
13+ from contentstack import __license__
14+ from contentstack import __version__
1115
12- __author__ = "ishaileshmishra (shailesh.mishra@contentstack.com)"
13- __license__ = "MIT"
14- __version__ = '1.8.1'
1516
1617log = logging .getLogger (__name__ )
1718DEFAULT_HOST = 'cdn.contentstack.io'
Original file line number Diff line number Diff line change 44# as the name and version) as well as which code files to include
55
66import os
7+ import re
8+ import sys
79
810try :
9- from setuptools import setup
11+ from setuptools import setup , find_packages
1012except ImportError :
1113 from distutils .core import setup
1214
15+ package = "contentstack"
16+
17+ def get_version (package ):
18+ """
19+ Return package version as listed in `__version__` in `init.py`.
20+ """
21+ init_py = open (os .path .join (package , '__init__.py' )).read ()
22+ return re .search ("^__version__ = ['\" ]([^'\" ]+)['\" ]" ,
23+ init_py , re .MULTILINE ).group (1 )
24+
25+
1326with open (os .path .join (os .path .dirname (__file__ ), 'README.md' )) as readme :
1427 long_description = readme .read ()
1528
2538 type = "process" ,
2639 created = "09 Jun 2020" ,
2740 keywords = "contentstack-python" ,
28- version = "1.8.1" ,
41+ version = get_version ( package ) ,
2942 author = "Contentstack" ,
3043 author_email = "shailesh.mishra@contentstack.com, sunil.lakshman@contentstack.com" ,
3144 description = "Contentstack is a headless CMS with an API-first approach." ,
You can’t perform that action at this time.
0 commit comments