forked from asm/pymruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
39 lines (34 loc) · 1.08 KB
/
Copy pathsetup.py
File metadata and controls
39 lines (34 loc) · 1.08 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
35
36
37
38
39
# from distutils.core import setup, Extension
from setuptools import setup, Extension #, find_packages
from os.path import isfile,exists
try:
if isfile("MANIFEST"):
import os
os.unlink("MANIFEST")
except:
pass
extra=[]
libpath=r"mruby/build/host/lib/libmruby"
if exists(f'{libpath}.a'):
extra.append(f'{libpath}.a')
elif exists(f'{libpath}.lib'):
extra.append(f'{libpath}.lib')
ext_modules = [
Extension('pymruby', ['src/pymruby.c'],
extra_compile_args = ['-g', '-fPIC', '-DMRB_ENABLE_DEBUG_HOOK'],
library_dirs = ['mruby/build/host/lib'],
include_dirs = ['mruby/include'],
extra_objects = extra,
depends = ['src/pymruby.h'])
]
setup(name = 'pymruby',
version = '0.2',
description = 'Python binding for mruby',
author = 'Jason Snell',
url = 'http://www.ruby.dj',
license = 'MIT',
# packages=find_packages(exclude=["tests", "*.tests", "*.tests.*", "tests.*"]),
ext_package = '',
ext_modules = ext_modules
)