setup.py 2.6 KB

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