setup.py 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. # coding: utf-8
  2. # Always prefer setuptools over distutils
  3. from setuptools import setup
  4. from setuptools import find_packages
  5. from os import path
  6. import sys
  7. # INFO - G.M - 29-05-2018 - exec info.py file in order to obtain version
  8. # without any dependencies trouble.
  9. # see https://milkr.io/kfei/5-common-patterns-to-version-your-Python-package
  10. # section "Exec/execfile" for other example and "Import from the package" for
  11. # information about import strategy problem.
  12. infos_dict = {}
  13. with open("hapic/infos.py") as fp:
  14. exec(fp.read(), infos_dict)
  15. version = infos_dict['__version__']
  16. here = path.abspath(path.dirname(__file__))
  17. install_requires = [
  18. 'marshmallow >2.0.0,<3.0.0a1',
  19. 'hapic_apispec==0.37.0',
  20. 'multidict'
  21. ]
  22. tests_require = [
  23. 'pytest',
  24. 'pytest-cov',
  25. 'bottle',
  26. 'flask',
  27. 'pyramid',
  28. 'webtest',
  29. 'aiohttp',
  30. 'pytest-aiohttp',
  31. ]
  32. dev_require = [
  33. 'requests',
  34. ] + tests_require
  35. # Python 3.4 require
  36. if sys.version_info.major == 3 and sys.version_info.minor == 4:
  37. install_requires.append('typing')
  38. with open('README.md', 'r') as readme_file:
  39. long_description = readme_file.read()
  40. setup(
  41. name='hapic',
  42. # Versions should comply with PEP440. For a discussion on single-sourcing
  43. # the version across setup.py and the project code, see
  44. # https://packaging.python.org/en/latest/single_source_version.html
  45. version=version,
  46. description='HTTP api input/output manager',
  47. long_description=long_description,
  48. long_description_content_type='text/markdown',
  49. # The project's main homepage.
  50. url='https://github.com/algoo/hapic',
  51. # Author details
  52. author='Algoo Development Team',
  53. author_email='contact@algoo.fr',
  54. # Choose your license
  55. license='MIT',
  56. # What does your project relate to?
  57. keywords='http api validation',
  58. # You can just specify the packages manually here if your project is
  59. # simple. Or you can use find_packages().
  60. packages=find_packages(exclude=['contrib', 'docs', 'tests']),
  61. # Alternatively, if you want to distribute just a my_module.py, uncomment
  62. # this:
  63. # py_modules=["my_module"],
  64. # List run-time dependencies here. These will be installed by pip when
  65. # your project is installed. For an analysis of "install_requires" vs pip's
  66. # requirements files see:
  67. # https://packaging.python.org/en/latest/requirements.html
  68. install_requires=install_requires,
  69. # List additional groups of dependencies here (e.g. development
  70. # dependencies). You can install these using the following syntax,
  71. # for example:
  72. # $ pip install -e ".[test]"
  73. extras_require={
  74. 'test': tests_require,
  75. 'dev': dev_require,
  76. },
  77. # If there are data files included in your packages that need to be
  78. # installed, specify them here. If using Python 2.6 or less, then these
  79. # have to be included in MANIFEST.in as well.
  80. # package_data={
  81. # 'sample': ['package_data.dat'],
  82. # },
  83. # Although 'package_data' is the preferred approach, in some case you may
  84. # need to place data files outside of your packages. See:
  85. # http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files # noqa
  86. # In this case, 'data_file' will be installed into '<sys.prefix>/my_data'
  87. # data_files=[('my_data', ['data/data_file'])],
  88. # To provide executable scripts, use entry points in preference to the
  89. # "scripts" keyword. Entry points provide cross-platform support and allow
  90. # pip to create the appropriate form of executable for the target platform.
  91. entry_points={},
  92. setup_requires=[],
  93. dependency_links=[
  94. 'git+https://github.com/algoo/apispec.git@hapic_apispec#egg=apispec-0.35.0-algoo'
  95. ],
  96. tests_require=tests_require,
  97. include_package_data=True,
  98. )