/
setup.py
76 lines (62 loc) · 2.26 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
import io
import sys
from glob import glob
from os.path import basename
from os.path import dirname
from os.path import join
from os.path import splitext
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [("pytest-args=", "a", "Arguments to pass to pytest")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = ""
def run_tests(self):
import shlex
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(shlex.split(self.pytest_args))
sys.exit(errno)
def read(*names, **kwargs):
with io.open(
join(dirname(__file__), *names),
encoding=kwargs.get('encoding', 'utf8')
) as fh:
return fh.read()
requirements = ["pytz>=2018", "numpy>=1.16.0", "matplotlib>=3.0.0"]
# upload to pypi:
# python setup.py sdist bdist_wheel
# python -m twine upload dist/*
setup(
name="pydiagnostics",
version="0.6.0",
author="Timo Lesterhuis",
author_email="timolesterhuis@gmail.com",
description="A toolbox to analyse diagnostic data!",
long_description=read("README.rst"),
long_description_content_type="text/x-rst",
url="https://github.com/tim00w/diagnostics/",
project_urls={
'Documentation': 'https://diagnostics.readthedocs.io/',
#'Changelog': 'https://python-nameless.readthedocs.io/en/latest/changelog.html',
"Source": "https://github.com/tim00w/diagnostics",
'Issue Tracker': 'https://github.com/timolesterhuis/diagnostics/issues',
},
packages=find_packages(where="src"),
package_dir={"": "src"},
py_modules=[splitext(basename(path))[0] for path in glob('src/*.py')],
install_requires=requirements,
tests_require=["pytest", "pytest-cov", "pytest-mpl"],
cmdclass={"pytest": PyTest},
license="MIT License",
include_package_data=True,
classifiers=[
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
)