setup_cython.py 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #!/usr/bin/env python
  2. # -*- coding: UTF-8 -*-
  3. #
  4. # Copyright (C) 2009-2013 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. from Cython.Distutils import build_ext
  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. cmdclass = {'build_ext': build_ext},
  54. ext_modules = [Extension("scattnlay", ["nmie.cc", "py_nmie.cc", "scattnlay.pyx"], language = "c++", include_dirs = [np.get_include()])]
  55. )