-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
71 lines (65 loc) · 1.96 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
from setuptools import setup
from setuptools.command.test import test as TestCommand
import loris
import sys
# Distribution Guidance:
# https://www.digitalocean.com/community/tutorials/how-to-package-and-distribute-python-applications
# https://docs.python.org/3/distutils/sourcedist.html
# http://python-packaging.readthedocs.io/en/latest/minimal.html
# Maybe for init script? http://python-packaging.readthedocs.io/en/latest/command-line-scripts.html#the-console-scripts-entry-point
class PyTest(TestCommand):
# http://pytest.org/latest/goodpractices.html#manual-integration
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def run_tests(self):
import pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)
PACKAGES=(
'loris',
'loris.compliance',
'loris.handlers',
'loris.helpers',
'loris.info',
'loris.parameters',
'loris.resolvers',
'loris.transcoders',
)
PACKAGE_DATA={
'loris': ['sample.jp2','config.json'],
'loris.www': ['www/favicon.ico'],
'loris.openjpeg': [
'openjpeg/linux/x86_64/opj_decompress',
'openjpeg/linux/x86_64/libopenjp2.so.2.1.2'
]
}
setup(
name='Loris',
version=loris.__version__,
author='Jon Stroop',
author_email='[email protected]',
packages=PACKAGES,
# Include additional files into the package
package_data=PACKAGE_DATA,
include_package_data=True,
# Details
#url='http://pypi.python.org/pypi/MyApplication_v010/',
license='LICENSE',
description='Loris IIIF Image Server',
long_description=open('README.md').read(),
cmdclass = {'test': PyTest},
setup_requires=[ ],
tests_require=[
'nose>=1.3.7',
'pytest-cov>=2.8.1',
],
install_requires=[
'cherrypy>=18.4.0',
'more-itertools>=8.0.0',
'pillow>=6.2.1',
'python-magic>=0.4.15',
'pyyaml>=5.1.2',
'requests>=2.22.0',
]
)