Files
rapidyaml/api/python/setup.py
Tim 'mithro' Ansell 4acd71c5de Fix version.
2021-03-22 23:59:41 -07:00

33 lines
872 B
Python

#!/usr/bin/env python
from pathlib import Path
from setuptools import setup
from cmake_build_extension import BuildExtension, CMakeExtension
# define a CMake package
cmake_args = dict(
name='ryml.ryml',
install_prefix='',
source_dir=str(Path("../../").absolute()),
cmake_component='python',
cmake_configure_options=[
"-DRYML_BUILD_API:BOOL=ON",
])
try:
ext = CMakeExtension(**cmake_args)
except TypeError:
# FIXME: cmake_build_extension may not support cmake_component.
del cmake_args['cmake_component']
ext = CMakeExtension(**cmake_args)
setup(name='rapidyaml',
version='0.1.0',
packages=['ryml'],
ext_modules=[ext],
cmdclass=dict(build_ext=BuildExtension),
author='Joao Paulo Magalhaes',
url='https://github.com/biojppm/rapidyaml',
description='This is a test',
license='MIT',
)