-
Notifications
You must be signed in to change notification settings - Fork 106
/
setup.py
32 lines (30 loc) · 895 Bytes
/
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
import glob
import os.path
from setuptools import setup
# glob patterns in setup.cfg dont support recursive patterns
# https://github.com/pypa/setuptools/issues/1806
# so we have to do it in setup.py
ui_files = [
os.path.relpath(f, "histoqc/ui/")
for f in glob.iglob("histoqc/ui/**/*", recursive=True)
if os.path.isfile(f)
]
data_files = [
os.path.relpath(f, "histoqc/data/")
for folder in ['models', 'pen', 'templates']
for f in glob.iglob(f"histoqc/data/{folder}/**/*", recursive=True)
if os.path.isfile(f)
]
setup(
use_scm_version={
# duplicated config from pyproject.toml; keep in sync
"write_to": "histoqc/_version.py",
"version_scheme": "post-release",
},
setup_requires=['setuptools_scm'],
package_data={
'histoqc.config': ['*.ini'],
'histoqc.data': data_files,
'histoqc.ui': ui_files,
}
)