setup.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. from setuptools import setup
  2. import setuptools.command.build_py
  3. def readme():
  4. with open('README.rst') as f:
  5. return f.read()
  6. class BuildTestCommand(setuptools.command.build_py.build_py):
  7. """Custom build command."""
  8. def run(self):
  9. # run tests using doctest
  10. import doctest
  11. from ipfml import processing
  12. from ipfml import metrics
  13. from ipfml.filters import noise as noise_filters
  14. from ipfml.iqa import fr as fr_iqa
  15. from ipfml import utils
  16. print("==============================")
  17. print("Runs test command...")
  18. doctest.testmod(processing)
  19. doctest.testmod(metrics)
  20. doctest.testmod(noise_filters)
  21. doctest.testmod(fr_iqa)
  22. doctest.testmod(utils)
  23. setuptools.command.build_py.build_py.run(self)
  24. setup(
  25. name='ipfml',
  26. version='0.3.5',
  27. description='Image Processing For Machine Learning',
  28. long_description=readme(),
  29. classifiers=[
  30. 'Development Status :: 4 - Beta',
  31. 'License :: OSI Approved :: MIT License',
  32. 'Programming Language :: Python :: 3.6',
  33. 'Topic :: Scientific/Engineering :: Artificial Intelligence'
  34. ],
  35. url='https://github.com/jbuisine/IPFML',
  36. author='Jérôme BUISINE',
  37. author_email='jerome.buisine@univ-littoral.fr',
  38. license='MIT',
  39. packages=['ipfml', 'ipfml/filters', 'ipfml/iqa'],
  40. install_requires=[
  41. 'numpy',
  42. 'Pillow',
  43. 'sklearn',
  44. 'scikit-image',
  45. 'scipy',
  46. 'opencv-python',
  47. 'scipy',
  48. ],
  49. cmdclass={
  50. 'build_py': BuildTestCommand,
  51. },
  52. zip_safe=False)