forked from siesta-project/aiida_siesta_plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
38 lines (30 loc) · 1002 Bytes
/
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
"""
A setuptools based AiiDA plugin setup module.
Based on tutorial page:
http://aiida-core.readthedocs.io/en/latest/developer_guide/plugins/update_plugin.html
For packaging help:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
import codecs
import json
import os
from setuptools import find_packages, setup
THIS_LOC = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
"""
Build an absolute path from *parts* and and return the contents of the
resulting file. Assume UTF-8 encoding.
"""
with codecs.open(os.path.join(THIS_LOC, *parts), "rb", "utf-8") as filenam:
return filenam.read()
if __name__ == '__main__':
with open('setup.json', 'r') as info:
kwargs = json.load(info) # pylint: disable=invalid-name
setup(
include_package_data=True,
packages=find_packages(),
long_description=read('PyPI-README.rst'),
reentry_register=True,
**kwargs
)