forked from quintusdias/glymur
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
49 lines (44 loc) · 1.7 KB
/
Copy pathsetup.py
File metadata and controls
49 lines (44 loc) · 1.7 KB
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
# Standard library imports ...
import pathlib
import re
# Third party library imports ...
from setuptools import setup
kwargs = {
'name': 'Glymur',
'description': 'Tools for accessing JPEG2000 files',
'long_description': open('README.md').read(),
'author': 'John Evans',
'author_email': 'john.g.evans.ne@gmail.com',
'url': 'https://github.com/quintusdias/glymur',
'packages': ['glymur', 'glymur.data', 'glymur.lib', 'tests'],
'package_data': {'glymur': ['data/*.jp2', 'data/*.j2k', 'data/*.jpx']},
'entry_points': {
'console_scripts': ['jp2dump=glymur.command_line:main'],
},
'license': 'MIT',
'test_suite': 'glymur.test',
'install_requires': ['lxml', 'numpy', 'setuptools'],
}
kwargs['classifiers'] = [
"Programming Language :: Python",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"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)