-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
50 lines (42 loc) · 1.38 KB
/
Copy pathsetup.py
File metadata and controls
50 lines (42 loc) · 1.38 KB
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
#!/usr/bin/python3
from setuptools import setup
from setuptools import find_packages
import codecs
import os.path
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_info(rel_path, info):
for line in read(rel_path).splitlines():
if line.startswith(f'__{info}__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError(f"Unable to find {info} string.")
if __name__ == '__main__':
setup(
name='nchainplotter',
version=get_info('nchainplotter/__init__.py', 'version'),
packages=find_packages(),
include_package_data=True,
author=get_info('nchainplotter/__init__.py', 'author'),
author_email='daniele.tomatis@newcleo.com',
description='Python module for the graphic representation'
'of depletion chains.',
long_description_content_type='text/x-rst',
long_description=open('README.rst', 'r').read(),
license='',
python_requires='>=3.8.10',
install_requires=[
'pandas' ,
'numpy',
'matplotlib',
'h5py',
'lxml',
'PyYAML',
'tikz_python',
'xmlschema',
'typing-extensions'
],
)