-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
58 lines (46 loc) · 1.31 KB
/
setup.py
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
import setuptools
from setuptools.command.install import install
import os
with open("README.md", "r") as fh:
long_description = fh.read()
def getversion():
'''
read the version string from __init__
'''
#get the init file path
thispath = os.path.abspath(os.path.dirname(__file__))+'/'
initfile = thispath + 'spicedmodel/__init__.py'
#read the file in
f = open(initfile,'r')
lines = f.readlines()
f.close()
#search for the version
version = 'unknown'
for l in lines:
if '__version__' in l:
s = l.split('=')
version = s[-1].strip().strip('"').strip("'")
break
return version
version = getversion()
setuptools.setup(
name="spicedmodel",
version=version,
author="Matthew Knight James",
author_email="[email protected]",
description="Python wrapper for the Scalable Plasma Ion Composition and Electron Density (SPICED) model",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/mattkjames7/spicedmodel",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Operating System :: POSIX",
],
install_requires=[
'numpy',
'matplotlib',
],
include_package_data=True,
)