File tree 3 files changed +20
-6
lines changed
3 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 10
10
from contentstack .stack import Stack
11
11
from .utility import Utils
12
12
13
- __title__ = 'contentstack-python'
13
+ __title__ = 'contentstack-delivery- python'
14
14
__author__ = 'contentstack'
15
15
__status__ = 'debug'
16
16
__version__ = 'v1.8.1'
Original file line number Diff line number Diff line change 8
8
from contentstack .contenttype import ContentType
9
9
from contentstack .https_connection import HTTPSConnection
10
10
from 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__
11
15
12
- __author__ = "ishaileshmishra ([email protected] )"
13
- __license__ = "MIT"
14
- __version__ = '1.8.1'
15
16
16
17
log = logging .getLogger (__name__ )
17
18
DEFAULT_HOST = 'cdn.contentstack.io'
Original file line number Diff line number Diff line change 4
4
# as the name and version) as well as which code files to include
5
5
6
6
import os
7
+ import re
8
+ import sys
7
9
8
10
try :
9
- from setuptools import setup
11
+ from setuptools import setup , find_packages
10
12
except ImportError :
11
13
from distutils .core import setup
12
14
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
+
13
26
with open (os .path .join (os .path .dirname (__file__ ), 'README.md' )) as readme :
14
27
long_description = readme .read ()
15
28
25
38
type = "process" ,
26
39
created = "09 Jun 2020" ,
27
40
keywords = "contentstack-python" ,
28
- version = "1.8.1" ,
41
+ version = get_version ( package ) ,
29
42
author = "Contentstack" ,
30
43
31
44
description = "Contentstack is a headless CMS with an API-first approach." ,
You can’t perform that action at this time.
0 commit comments