setup.py 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/usr/bin/env python
  2. # -*- coding: UTF-8 -*-
  3. #
  4. # Copyright (C) 2009-2015 Ovidio Peña Rodríguez <ovidio@bytesfall.com>
  5. # Copyright (C) 2013-2015 Konstantin Ladutenko <kostyfisik@gmail.com>
  6. #
  7. # This file is part of python-scattnlay
  8. #
  9. # This program is free software: you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation, either version 3 of the License, or
  12. # (at your option) any later version.
  13. #
  14. # This program is distributed in the hope that it will be useful,
  15. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. # GNU General Public License for more details.
  18. #
  19. # The only additional remark is that we expect that all publications
  20. # describing work using this software, or all commercial products
  21. # using it, cite the following reference:
  22. # [1] O. Pena and U. Pal, "Scattering of electromagnetic radiation by
  23. # a multilayered sphere," Computer Physics Communications,
  24. # vol. 180, Nov. 2009, pp. 2348-2354.
  25. #
  26. # You should have received a copy of the GNU General Public License
  27. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  28. __version__ = '2.0.1'
  29. __title__ = 'Calculation of the scattering of EM radiation by a multilayered sphere'
  30. __mod__ = 'python-scattnlay'
  31. __author__ = 'Ovidio Peña Rodríguez'
  32. __email__ = 'ovidio@bytesfall.com'
  33. __url__ = 'http://scattering.sourceforge.net/'
  34. from distutils.core import setup
  35. from distutils.extension import Extension
  36. import numpy as np
  37. setup(name = __mod__,
  38. version = __version__,
  39. description = __title__,
  40. long_description="""The Python version of scattnlay, a computer implementation of the algorithm for the calculation of electromagnetic \
  41. radiation scattering by a multilayered sphere developed by Yang. It has been shown that the program is effective, \
  42. resulting in very accurate values of scattering efficiencies for a wide range of size parameters, which is a \
  43. considerable improvement over previous implementations of similar algorithms. For details see: \
  44. O. Pena, U. Pal, Comput. Phys. Commun. 180 (2009) 2348-2354.""",
  45. author = __author__,
  46. author_email = __email__,
  47. maintainer = __author__,
  48. maintainer_email = __email__,
  49. keywords = ['Mie scattering', 'Multilayered sphere', 'Efficiency factors', 'Cross-sections'],
  50. url = __url__,
  51. license = 'GPL',
  52. platforms = 'any',
  53. ext_modules = [Extension("scattnlay",
  54. ["src/nmie.cc", "src/py_nmie.cc", "src/scattnlay.cpp"],
  55. language = "c++",
  56. include_dirs = [np.get_include()])],
  57. extra_compile_args=['-std=c++11']
  58. )