-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
34 lines (29 loc) · 923 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
33
34
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
def build_native(spec):
# build an example rust library
build = spec.add_external_build(
cmd=['cargo', 'build', '--release'],
path='./cabi'
)
spec.add_cffi_module(
module_path='simplet2s._native',
dylib=lambda: build.find_dylib('simplet2s', in_path='target/release'),
header_filename=lambda: build.find_header('simplet2s.h', in_path='target'),
rtld_flags=['NOW', 'NODELETE']
)
setup(
name='simplet2s',
version='0.2.0',
url='https://github.com/bosondata/simplet2s-rs',
description='A simple traditional Chinese to simplified Chinese converter',
packages=find_packages(),
zip_safe=False,
platforms='any',
setup_requires=['milksnake'],
install_requires=['milksnake'],
tests_require=['pytest'],
milksnake_tasks=[
build_native
]
)