Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
'''
This is the install file for pymagmodel.
Copyright (C) 2019 Helmholtz Centre Potsdam GFZ,
German Research Centre for Geosciences, Potsdam, Germany
Cite as:
TODO
This file is part of pymagmodel.
pymagmodel 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.
pymagmodel 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 pymagmodel. If not, see <https://www.gnu.org/licenses/>.
'''
import os
import codecs
from setuptools import setup
# https://packaging.python.org/guides/single-sourcing-package-version/
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()
def get_version(rel_path):
for line in read(rel_path).splitlines():
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
description = ''' python interface for global geomagnetic field models '''
setup(
name='pymagglobal',
version=get_version('pymagglobal/__init__.py'),
author='Maximilian Schanner',
author_email='arthus@gfz-potsdam.de',
packages=['pymagglobal'],
license='GPL v3',
description=description,
long_description=description,
install_requires=[],
package_data={'pymagglobal': ['dat/*']},
include_package_data=True,
)