forked from weikanggong/snfpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
53 lines (44 loc) · 1.72 KB
/
Copy pathsetup.py
File metadata and controls
53 lines (44 loc) · 1.72 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
51
52
53
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def main():
import versioneer
from io import open
import os.path as op
from inspect import getfile, currentframe
from setuptools import setup, find_packages
root_dir = op.dirname(op.abspath(getfile(currentframe())))
ldict = locals()
with open(op.join(root_dir, 'snf', 'info.py')) as infofile:
exec(infofile.read(), globals(), ldict)
# get long description from README
with open(op.join(root_dir, ldict['__longdesc__'])) as src:
ldict['__longdesc__'] = src.read()
ldict.setdefault('__version__', versioneer.get_version())
ldict.setdefault('__cmdclass__', versioneer.get_cmdclass())
DOWNLOAD_URL = (
'https://github.com/rmarkello/{name}/archive/{ver}.tar.gz'.format(
name=ldict['__packagename__'],
ver=ldict['__version__']))
setup(
name=ldict['__packagename__'],
version=ldict['__version__'],
description=ldict['__description__'],
long_description=ldict['__longdesc__'],
long_description_content_type=ldict['__longdesctype__'],
author=ldict['__author__'],
author_email=ldict['__email__'],
maintainer=ldict['__maintainer__'],
maintainer_email=ldict['__email__'],
url=ldict['__url__'],
license=ldict['__license__'],
classifiers=ldict['CLASSIFIERS'],
download_url=DOWNLOAD_URL,
install_requires=ldict['INSTALL_REQUIRES'],
packages=find_packages(exclude=['snf/tests']),
package_data=ldict['PACKAGE_DATA'],
tests_require=ldict['TESTS_REQUIRE'],
extras_require=ldict['EXTRAS_REQUIRE'],
cmdclass=ldict['__cmdclass__']
)
if __name__ == '__main__':
main()