setup.py 3.6KB

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