3 from setuptools
import setup, find_packages
4 from setuptools.dist
import Distribution
7 """Distribution which always forces a binary package with platform name
12 path_to_file = os.path.relpath(os.path.join(
"..",
"pointmatcher",
"PointMatcher.h"))
22 with open(path_to_file,
"r", encoding=
"utf-8")
as f:
23 for line
in map(str.strip, f):
24 if line.startswith(
"#define POINTMATCHER_VERSION"):
25 version = line.split()[2].replace(
"\"",
"")
27 except FileNotFoundError:
28 print(f
"Cannot find: '{path_to_file}'. Probably reason is you run 'python -m build', but not 'python -m build --no-isolation --wheel'", file=sys.stderr)
32 raise RuntimeError(f
"Cannot find a version string in the file: '{path_to_file}'")
35 setup(packages=find_packages(include=[
"pypointmatcher*"]),
36 package_data={
"": [
"*.so"]},
38 distclass=BinaryDistribution