setup.py 1.87 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

Philipp Arras's avatar
Philipp Arras committed
21

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

Philipp Arras's avatar
Philipp Arras committed
30

31
write_version()
Philipp Arras's avatar
Philipp Arras committed
32
exec(open('nifty5/version.py').read())
33

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