|
1 | | -from setuptools import setup |
| 1 | +"""contentstack - decorator heavy REST client library for Python.""" |
| 2 | + |
| 3 | +from setuptools import setup, find_packages |
| 4 | +import os |
| 5 | +import re |
| 6 | + |
2 | 7 | package = 'contentstack' |
| 8 | + |
| 9 | + |
| 10 | +def read(fname): |
| 11 | + """Read description from local file.""" |
| 12 | + return open(os.path.join(os.path.dirname(__file__), fname)).read() |
| 13 | + |
| 14 | + |
3 | 15 | requirements = [ |
4 | 16 | 'requests>=2.20.0,<3.0', |
5 | 17 | 'python-dateutil' |
6 | 18 | ] |
| 19 | + |
| 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 | + |
7 | 29 | setup( |
8 | 30 | name='contentstack-python', |
9 | | - version='1.0.0', |
10 | | - packages=['contentstack', 'doc', 'tests'], |
| 31 | + version=version, |
| 32 | + packages=find_packages(exclude=['tests']), |
11 | 33 | url='https://www.contentstack.com', |
12 | 34 | license='MIT License', |
13 | 35 | author='Shailesh Mishra', |
14 | 36 | author_email='shailesh.mishra@contentstack.com', |
15 | 37 | description='Create python-based applications and use the python SDK to fetch and deliver content from Contentstack. The SDK uses Content Delivery APIs. ', |
16 | | - install_requires=['requests', 'config'] |
| 38 | + install_requires=['requests'], |
| 39 | + tests_require=['pytest'], |
| 40 | + long_description=read('README.rst'), |
| 41 | + include_package_data=True, |
| 42 | + classifiers=[ |
| 43 | + 'Development Status :: 1 - Alpha', |
| 44 | + 'Intended Audience :: Developers', |
| 45 | + 'Natural Language :: English', |
| 46 | + 'License :: OSI Approved :: MIT License', |
| 47 | + 'Operating System :: OS Independent', |
| 48 | + 'Programming Language :: Python', |
| 49 | + 'Programming Language :: Python :: 3.6' |
| 50 | + ] |
17 | 51 | ) |
18 | | - |
|
0 commit comments