-
Notifications
You must be signed in to change notification settings - Fork 6
/
setup.py
80 lines (64 loc) · 2.01 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/env python3
"""Py-SP2
A package for analyzing Single Particle Soot Photometer data
"""
DOCLINES = __doc__.split("\n")
import glob
from setuptools import setup, find_packages
from os import path
# Needed to build Windows distribution on Linux
# Work around mbcs bug in distutils.
# http://bugs.python.org/issue10945
import codecs
try:
codecs.lookup('mbcs')
except LookupError:
ascii = codecs.lookup('ascii')
func = lambda name, enc=ascii: {True: enc}.get(name=='mbcs')
codecs.register(func)
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
NAME = 'pysp2'
MAINTAINER = 'Bobby Jackson'
MAINTAINER_EMAIL = '[email protected]'
URL = ''
DESCRIPTION = DOCLINES[0]
LONG_DESCRIPTION = "\n".join(DOCLINES[2:])
LICENSE = 'BSD'
PLATFORMS = "Linux, Windows, OSX"
MAJOR = 1
MINOR = 6
MICRO = 0
#SCRIPTS = glob.glob('scripts/*')
#TEST_SUITE = 'nose.collector'
#TESTS_REQUIRE = ['nose']
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
with open(path.join(here, 'requirements.txt')) as requirements_file:
# Parse requirements.txt, ignoring any commented-out lines.
requirements = [
line for line in requirements_file.read().splitlines() if not line.startswith('#')
]
def setup_package():
""" Setup of PySP2 package. """
setup(
name=NAME,
author=MAINTAINER,
author_email=MAINTAINER_EMAIL,
url=URL,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
long_description_content_type='text/markdown',
version=VERSION,
license=LICENSE,
platforms=PLATFORMS,
include_package_data=True,
install_requires=requirements,
packages=find_packages(exclude=['contrib', 'docs',
'tests', 'examples']),
project_urls={
'Source': 'https://github.com/ARM-DOE/PySP2'},
)
if __name__ == '__main__':
setup_package()