-
Notifications
You must be signed in to change notification settings - Fork 120
/
setup.py
38 lines (30 loc) · 980 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
35
36
37
38
# -*- coding: utf-8 -*-
from setuptools import setup
import platform
import os
import sys
def get_version():
"""バージョン取得"""
base_dir = os.path.dirname(os.path.abspath(__file__))
with open(os.path.join(base_dir, 'VERSION.txt')) as f:
return f.read().strip()
if __name__ == '__main__':
base_dir = os.path.dirname(os.path.abspath(__file__))
# C++モジュールがすでにビルドされ、core/libに入っているか確認
assert os.path.exists(os.path.join(
base_dir, 'core', 'lib', 'core.h')), 'C++モジュールがビルドされていません'
sys.path.append(os.path.join(base_dir, 'tests'))
setup(
name="core",
version=get_version(),
packages=["core"],
package_data={
"core": [
"lib/*.dll",
"lib/*.so",
"lib/*.so.*",
"lib/*.dylib"
]
},
test_suite="core_test",
)