-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsetup.py
94 lines (81 loc) · 3.04 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import os
import os.path as osp
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import sys
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 readme():
with open('README.rst') as f:
return f.read()
# read the version from version.py
with open(osp.join('straditize', 'version.py')) as f:
exec(f.read())
dependencies = [
'psyplot-gui>=1.2.3',
'psyplot>=1.2.0',
'psy-strat',
'scipy',
'scikit-image',
'openpyxl',
'netCDF4',
]
# Test for PyQt5 dependency. During a conda build, this is handled by the
# meta.yaml so we can skip this dependency
if not os.getenv('CONDA_BUILD'):
# The package might nevertheless be installed, just registered with a
# different name
try:
import PyQt5
except ImportError:
dependencies.append('pyqt5!=5.12')
dependencies.append('PyQtWebEngine')
dependencies.append('pyqt5-sip')
setup(name='straditize',
version=__version__,
description='Python package for digitizing pollen diagrams',
long_description=readme(),
classifiers=[
'Development Status :: 7 - Inactive',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Visualization',
'Topic :: Scientific/Engineering :: GIS',
'Topic :: Scientific/Engineering',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Operating System :: OS Independent',
],
keywords=('visualization earth-sciences paleo climate paleoclimate '
'pollen diagram digitization database'),
url='https://github.com/Chilipp/straditize',
author='Philipp Sommer',
author_email='philipp.sommer@unil.ch',
license="GPLv3",
packages=find_packages(exclude=['docs', 'tests*', 'examples']),
install_requires=dependencies,
package_data={'straditize': [
osp.join('straditize', 'widgets', 'icons', '*.png'),
osp.join('straditize', 'widgets', 'docs', '*.rst'),
osp.join('straditize', 'widgets', 'docs', '*.png'),
osp.join('straditize', 'widgets', 'tutorial', '*', '*.rst'),
osp.join('straditize', 'widgets', 'tutorial', '*', '*.png'),
]},
include_package_data=True,
tests_require=['pytest', 'psutil'],
cmdclass={'test': PyTest},
entry_points={
'console_scripts': ['straditize=straditize.__main__:main'],
'psyplot_gui': ['straditizer=straditize.widgets:StraditizerWidgets'],
},
zip_safe=False)