setup.py 1.8 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
#
14
# Copyright(C) 2013-2019 Max-Planck-Society
Theo Steininger's avatar
Theo Steininger committed
15
#
16
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.
Marco Selig's avatar
Marco Selig committed
17

18
from setuptools import find_packages, setup
csongor's avatar
csongor committed
19

Philipp Arras's avatar
Philipp Arras committed
20

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

Philipp Arras's avatar
Philipp Arras committed
29

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

Philipp Arras's avatar
Philipp Arras committed
33
setup(name="nifty5",
34
      version=__version__,
Martin Reinecke's avatar
Martin Reinecke committed
35
      author="Theo Steininger, Martin Reinecke",
Martin Reinecke's avatar
Martin Reinecke committed
36
      author_email="martin@mpa-garching.mpg.de",
Marco Selig's avatar
Marco Selig committed
37
      description="Numerical Information Field Theory",
Marco Selig's avatar
Marco Selig committed
38
      url="http://www.mpa-garching.mpg.de/ift/nifty/",
Philipp Arras's avatar
Philipp Arras committed
39
      packages=find_packages(include=["nifty5", "nifty5.*"]),
Martin Reinecke's avatar
Martin Reinecke committed
40
      zip_safe=True,
41
      license="GPLv3",
Martin Reinecke's avatar
Martin Reinecke committed
42 43
      setup_requires=['scipy'],
      install_requires=['scipy'],
44
      python_requires='>=3.5',
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+)"],
      )