setup.py 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. ]
  30. dev_require = [
  31. 'requests',
  32. ] + tests_require
  33. # Python 3.4 require
  34. if sys.version_info.major == 3 and sys.version_info.minor == 4:
  35. install_requires.append('typing')
  36. with open('README.md', 'r') as readme_file:
  37. long_description = readme_file.read()
  38. setup(
  39. name='hapic',
  40. # Versions should comply with PEP440. For a discussion on single-sourcing
  41. # the version across setup.py and the project code, see
  42. # https://packaging.python.org/en/latest/single_source_version.html
  43. version=version,
  44. description='HTTP api input/output manager',
  45. long_description=long_description,
  46. long_description_content_type='text/markdown',
  47. # The project's main homepage.
  48. url='https://github.com/algoo/hapic',
  49. # Author details
  50. author='Algoo Development Team',
  51. author_email='contact@algoo.fr',
  52. # Choose your license
  53. license='MIT',
  54. # What does your project relate to?
  55. keywords='http api validation',
  56. # You can just specify the packages manually here if your project is
  57. # simple. Or you can use find_packages().
  58. packages=find_packages(exclude=['contrib', 'docs', 'tests']),
  59. # Alternatively, if you want to distribute just a my_module.py, uncomment
  60. # this:
  61. # py_modules=["my_module"],
  62. # List run-time dependencies here. These will be installed by pip when
  63. # your project is installed. For an analysis of "install_requires" vs pip's
  64. # requirements files see:
  65. # https://packaging.python.org/en/latest/requirements.html
  66. install_requires=install_requires,
  67. # List additional groups of dependencies here (e.g. development
  68. # dependencies). You can install these using the following syntax,
  69. # for example:
  70. # $ pip install -e ".[test]"
  71. extras_require={
  72. 'test': tests_require,
  73. 'dev': dev_require,
  74. },
  75. # If there are data files included in your packages that need to be
  76. # installed, specify them here. If using Python 2.6 or less, then these
  77. # have to be included in MANIFEST.in as well.
  78. # package_data={
  79. # 'sample': ['package_data.dat'],
  80. # },
  81. # Although 'package_data' is the preferred approach, in some case you may
  82. # need to place data files outside of your packages. See:
  83. # http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files # noqa
  84. # In this case, 'data_file' will be installed into '<sys.prefix>/my_data'
  85. # data_files=[('my_data', ['data/data_file'])],
  86. # To provide executable scripts, use entry points in preference to the
  87. # "scripts" keyword. Entry points provide cross-platform support and allow
  88. # pip to create the appropriate form of executable for the target platform.
  89. entry_points={},
  90. setup_requires=[],
  91. dependency_links=[
  92. 'git+https://github.com/algoo/apispec.git@hapic_apispec#egg=apispec-0.35.0-algoo'
  93. ],
  94. tests_require=tests_require,
  95. include_package_data=True,
  96. )