setup.py 1.86 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
Theo Steininger's avatar
Theo Steininger committed
13
#
Martin Reinecke's avatar
Martin Reinecke committed
14
# Copyright(C) 2013-2018 Max-Planck-Society
Theo Steininger's avatar
Theo Steininger committed
15 16 17
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
Marco Selig's avatar
Marco Selig committed
18

Martin Reinecke's avatar
Martin Reinecke committed
19
from setuptools import setup, find_packages
csongor's avatar
csongor committed
20

21 22 23 24
def write_version():
    import subprocess
    p = subprocess.Popen(["git", "describe", "--dirty"],
                         stdout=subprocess.PIPE)
Philipp Arras's avatar
Philipp Arras committed
25
    res = p.communicate()[0].strip().decode('utf-8')
26
    with open("nifty4/git_version.py", "w") as file:
Martin Reinecke's avatar
tweaks  
Martin Reinecke committed
27
        file.write('gitversion = "{}"\n'.format(res))
28 29

write_version()
Martin Reinecke's avatar
tweaks  
Martin Reinecke committed
30
exec(open('nifty4/version.py').read())
31

Martin Reinecke's avatar
Martin Reinecke committed
32
setup(name="nifty4",
33
      version=__version__,
Martin Reinecke's avatar
Martin Reinecke committed
34
      author="Theo Steininger, Martin Reinecke",
Martin Reinecke's avatar
Martin Reinecke committed
35
      author_email="martin@mpa-garching.mpg.de",
Marco Selig's avatar
Marco Selig committed
36
      description="Numerical Information Field Theory",
Marco Selig's avatar
Marco Selig committed
37
      url="http://www.mpa-garching.mpg.de/ift/nifty/",
Martin Reinecke's avatar
Martin Reinecke committed
38
      packages=find_packages(include=["nifty4", "nifty4.*"]),
Martin Reinecke's avatar
Martin Reinecke committed
39
      zip_safe=True,
40
      license="GPLv3",
Martin Reinecke's avatar
cleanup  
Martin Reinecke committed
41
      setup_requires=['future', 'numpy'],
Martin Reinecke's avatar
Martin Reinecke committed
42
      install_requires=['future', 'numpy', 'pyfftw>=0.10.4'],
43 44 45
      classifiers=[
        "Development Status :: 4 - Beta",
        "Topic :: Utilities",
Theo Steininger's avatar
Theo Steininger committed
46 47 48
        "License :: OSI Approved :: GNU General Public License v3 "
        "or later (GPLv3+)"],
      )