-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathglymur.setup.py
57 lines (52 loc) · 2.08 KB
/
glymur.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
# Standard library imports ...
import pathlib
import re
# Third party library imports ...
from setuptools import setup
import os
from distutils.core import Extension
kwargs = {
'name': 'Glymur',
'description': 'Tools for accessing JPEG2000 files',
'long_description': open('README.md').read(),
'author': 'John Evans',
'author_email': '[email protected]',
'url': 'https://github.com/quintusdias/glymur',
'packages': ['glymur', 'glymur.data', 'glymur.lib'],
'package_data': {'glymur': ['data/*.jp2', 'data/*.j2k', 'data/*.jpx', 'bin/*']},
'entry_points': {
'console_scripts': ['%s=glymur.bin:program' % name for name in os.listdir('glymur/bin') if not name.endswith('.py')] + [
'jp2dump=glymur.command_line:main',
'tiff2jp2=glymur.command_line:tiff2jp2'
],
},
'license': 'MIT',
'test_suite': 'glymur.test',
'ext_modules': [Extension('glymur.openjpeg', [], libraries=['openjp2'])],
'install_requires': ['lxml', 'numpy', 'setuptools', 'packaging'],
'python_requires': '>=3.8',
}
kwargs['classifiers'] = [
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"License :: OSI Approved :: MIT License",
"Development Status :: 5 - Production/Stable",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows :: Windows XP",
"Intended Audience :: Science/Research",
"Intended Audience :: Information Technology",
"Topic :: Software Development :: Libraries :: Python Modules"
]
# Get the version string. Cannot do this by importing glymur!
p = pathlib.Path('glymur') / 'version.py'
contents = p.read_text()
pattern = r'''version\s=\s"(?P<version>\d*.\d*.\d*.*)"\s'''
match = re.search(pattern, contents)
kwargs['version'] = match.group('version')
setup(**kwargs)