-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
23 lines (18 loc) · 787 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
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2022 Scipp contributors (https://github.com/scipp)
import os
import setuptools
import subprocess
import sys
def set_version_and_find_packages():
# Write fixed version to file to avoid having gitpython as a hard
# dependency
v = subprocess.check_output(['git', 'describe', '--tags'],
stderr=subprocess.STDOUT,
shell=sys.platform == 'win32')
with open(os.path.join('src', 'ess', '_version.py'), 'w') as f:
f.write('__version__ = \'{}\'\n'.format(v.decode().strip()))
return setuptools.find_packages('src')
setuptools.setup(name='ess',
packages=set_version_and_find_packages(),
package_dir={"": "src"})