-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.py
More file actions
46 lines (38 loc) · 1.37 KB
/
setup.py
File metadata and controls
46 lines (38 loc) · 1.37 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
#!/usr/bin/env python
from pathlib import Path
import re
from setuptools import setup
NAME_PACKAGE = "h5writer"
PATH_CWD = Path()
PATH_PACKAGE = PATH_CWD / NAME_PACKAGE
PATH_VERSION = PATH_PACKAGE / "_version.py"
def get_version_tag(path_version: Path) -> str:
verstrline = open(str(path_version), "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo is not None:
return mo.group(1)
else:
raise RuntimeError(f"Unable to find version string in {str(path_version)}")
setup(
name="h5writer",
version=get_version_tag(PATH_VERSION),
description="Tool for writing HDF5 files",
author="Max F. Hantke, Benedikt Daurer, Filipe R. N. C. Maia, Jamie van der Sanden",
author_email="maxhantke@gmail.com",
url="https://github.com/mhantke/h5writer",
install_requires=["h5py>=2.2"],
extras_require={"mpi": "mpi4py>=1.3.1"},
packages=["h5writer"],
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
],
license="MIT License",
)