1# -*- coding: utf-8 -*- 2from __future__ import division 3from __future__ import print_function 4from __future__ import absolute_import 5 6import os 7import io 8from setuptools import setup, find_packages 9 10 11# Helpers 12def read(*paths): 13 """Read a text file.""" 14 basedir = os.path.dirname(__file__) 15 fullpath = os.path.join(basedir, *paths) 16 contents = io.open(fullpath, encoding='utf-8').read().strip() 17 return contents 18 19 20# Prepare 21PACKAGE = 'datapackage' 22NAME = PACKAGE.replace('_', '-') 23INSTALL_REQUIRES = [ 24 'six>=1.10', 25 'click>=6.7', 26 'chardet>=3.0', 27 'requests>=2.8', 28 'jsonschema>=2.5', 29 'unicodecsv>=0.14', 30 'jsonpointer>=1.10', 31 'tableschema>=1.12.1', 32 'tabulator>=1.29', 33] 34INSTALL_CCHARDET_REQUIRES = [ 35 'cchardet>=2.0', 36] 37TESTS_REQUIRE = [ 38 'mock', 39 'pylama', 40 'pytest', 41 'pytest-cov', 42 'httpretty', 43 'tableschema-sql', 44] 45README = read('README.md') 46VERSION = read(PACKAGE, 'VERSION') 47PACKAGES = find_packages(exclude=['examples', 'tests']) 48 49 50# Run 51setup( 52 name=NAME, 53 version=VERSION, 54 packages=PACKAGES, 55 include_package_data=True, 56 install_requires=INSTALL_REQUIRES, 57 tests_require=TESTS_REQUIRE, 58 extras_require={ 59 'develop': TESTS_REQUIRE, 60 'cchardet': INSTALL_CCHARDET_REQUIRES, 61 }, 62 entry_points={ 63 'console_scripts': [ 64 'datapackage = datapackage.__main__:cli', 65 ] 66 }, 67 zip_safe=False, 68 long_description=README, 69 long_description_content_type='text/markdown', 70 description='Utilities to work with Data Packages as defined on specs.frictionlessdata.io', 71 author='Open Knowledge Foundation', 72 author_email='info@okfn.org', 73 url='https://github.com/frictionlessdata/datapackage-py', 74 license='MIT', 75 keywords=[ 76 'frictionless data', 77 'open data', 78 'json schema', 79 'table schema', 80 'data package', 81 'tabular data package', 82 ], 83 classifiers=[ 84 'Development Status :: 4 - Beta', 85 'Intended Audience :: Developers', 86 'Intended Audience :: Information Technology', 87 'Topic :: Utilities', 88 'License :: OSI Approved :: MIT License', 89 'Programming Language :: Python :: 2.7', 90 'Programming Language :: Python :: 3.4', 91 'Programming Language :: Python :: 3.5', 92 'Programming Language :: Python :: 3.6', 93 'Programming Language :: Python :: 3.7', 94 ], 95) 96