forked from Blosc/python-blosc2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
34 lines (27 loc) · 1.13 KB
/
setup.py
File metadata and controls
34 lines (27 loc) · 1.13 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
#######################################################################
# Copyright (c) 2019-present, Blosc Development Team <blosc@blosc.org>
# All rights reserved.
#
# This source code is licensed under a BSD-style license (found in the
# LICENSE.txt file in the root directory of this source tree)
#######################################################################
from skbuild import setup
def cmake_bool(cond):
return "ON" if cond else "OFF"
# Blosc version
VERSION = open("VERSION").read().strip()
# Create the version.py file
open("blosc2/version.py", "w").write('__version__ = "%s"\n' % VERSION)
def exclude_pkgconfig(cmake_manifest):
"""remove pkgconfig file from installation: gh-110."""
return list(filter(lambda name: not (name.endswith('.pc')), cmake_manifest))
# These keywords need to be in setup()
# https://scikit-build.readthedocs.io/en/latest/usage.html#setuptools-options
setup(
version=VERSION,
packages=["blosc2"],
package_dir={"blosc2": "blosc2"},
include_package_data=True,
cmake_process_manifest_hook=exclude_pkgconfig,
install_requires=open("requirements-runtime.txt").read().split(),
)