setup.py 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. # noise folder
  12. from ipfml.filters import noise as noise_filters
  13. # iqa folder
  14. from ipfml.iqa import fr as fr_iqa
  15. # metrics folder
  16. from ipfml import metrics
  17. # processing folder
  18. from ipfml.processing import compression as compression_processing
  19. from ipfml.processing import movement as movement_processing
  20. from ipfml.processing import reconstruction as reconstruction_processing
  21. from ipfml.processing import segmentation as segmentation_processing
  22. from ipfml.processing import transform as transform_processing
  23. # utils
  24. from ipfml import utils
  25. print("==============================")
  26. print("Runs test command...")
  27. # noise folder
  28. doctest.testmod(noise_filters)
  29. # iqa folder
  30. doctest.testmod(fr_iqa)
  31. # metrics folder
  32. doctest.testmod(metrics)
  33. # processing folder
  34. doctest.testmod(compression_processing)
  35. doctest.testmod(movement_processing)
  36. doctest.testmod(reconstruction_processing)
  37. doctest.testmod(segmentation_processing)
  38. doctest.testmod(transform_processing)
  39. # utils
  40. doctest.testmod(utils)
  41. setuptools.command.build_py.build_py.run(self)
  42. setup(
  43. name='ipfml',
  44. version='0.4.1',
  45. description='Image Processing For Machine Learning',
  46. long_description=readme(),
  47. classifiers=[
  48. 'Development Status :: 4 - Beta',
  49. 'License :: OSI Approved :: MIT License',
  50. 'Programming Language :: Python :: 3.6',
  51. 'Topic :: Scientific/Engineering :: Artificial Intelligence'
  52. ],
  53. url='https://github.com/prise-3d/ipfml',
  54. author='Jérôme BUISINE',
  55. author_email='jerome.buisine@univ-littoral.fr',
  56. license='MIT',
  57. packages=['ipfml', 'ipfml/filters', 'ipfml/iqa', 'ipfml/processing'],
  58. install_requires=[
  59. 'numpy',
  60. 'Pillow',
  61. 'sklearn',
  62. 'scikit-image',
  63. 'scipy',
  64. 'opencv-python',
  65. 'scipy',
  66. ],
  67. cmdclass={
  68. 'build_py': BuildTestCommand,
  69. },
  70. zip_safe=False)