forked from glencoesoftware/omero-user-token
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
86 lines (73 loc) · 2.66 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
import os
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import version
# Hack to prevent stupid "TypeError: 'NoneType' object is not callable" error
# in multiprocessing/util.py _exit_function when running `python
# setup.py test` or `python setup.py flake8`. See:
# * http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
# * https://github.com/getsentry/raven-python/blob/master/setup.py
import multiprocessing
assert multiprocessing # silence flake8
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', 'Arguments to pass to py.test')]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
if isinstance(self.pytest_args, str):
# pytest requires arguments as a list or tuple even if singular
self.pytest_args = [self.pytest_args]
errno = pytest.main(self.pytest_args)
sys.exit(errno)
def read(fname):
"""
Utility function to read the README file.
:rtype : String
"""
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(name='omero-user-token',
python_requires='>=3.9',
version=version.getVersion(),
description='OMERO user token management system',
long_description=read('README.md'),
long_description_content_type='text/markdown',
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Intended Audience :: Science/Research',
'Intended Audience :: Developers',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10'
'Programming Language :: Python :: 3.11'
'Programming Language :: Python :: 3.12'
],
keywords='',
author='Glencoe Software, Inc.',
author_email='[email protected]',
url='https://github.com/glencoesoftware/omero-user-token',
packages=find_packages(),
zip_safe=True,
include_package_data=True,
platforms='any',
setup_requires=['flake8'],
install_requires=[
'click>=7.0',
'configparser==4.0.2',
'omero-py>5.6',
],
tests_require=[],
cmdclass={'test': PyTest},
data_files=[],
entry_points={
'console_scripts': [
'omero_user_token = omero_user_token.cli.omero_user_token:main',
]
}
)