-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
62 lines (43 loc) · 1.35 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
56
57
58
59
60
61
62
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Setup file for nvector.
This file was generated with PyScaffold 2.4.4, a tool that easily
puts up a scaffold for your new Python project. Learn more under:
http://pyscaffold.readthedocs.org/
Usage:
Run all tests:
python setup.py test
python setup.py doctests
Build documentation
python setup.py docs
Install
python setup.py install [, --prefix=$PREFIX]
Build
python setup.py bdist_wininst
python setup.py bdist_wheel --universal
python setup.py sdist
PyPi upload:
twine upload dist/*
"""
import sys
from setuptools import setup
def print_version():
import pkg_resources
try:
__version__ = pkg_resources.get_distribution("pymef").version
with open("__conda_version__.txt", "w") as fid:
fid.write(__version__)
except pkg_resources.DistributionNotFound:
__version__ = 'unknown'
print("Version: {0}".format(__version__))
def setup_package():
needs_sphinx = {'build_sphinx', 'upload_docs'}.intersection(sys.argv)
sphinx = ['sphinx', 'numpydoc',
'sphinx_rtd_theme>=0.1.7'] if needs_sphinx else []
setup(setup_requires=['six', 'pyscaffold>=2.4rc1,<2.5a0'] + sphinx,
tests_require=['pytest_cov', 'pytest'],
use_pyscaffold=True)
print_version()
if __name__ == "__main__":
setup_package()