Python WAMR API binding: Add malloc/free and register_native (#1989)
This commit is contained in:
@ -9,9 +9,10 @@
|
||||
# pylint: disable=missing-module-docstring
|
||||
|
||||
import pathlib
|
||||
from setuptools import setup
|
||||
from setuptools import setup, find_packages
|
||||
from setuptools.command.develop import develop
|
||||
from setuptools.command.install import install
|
||||
from setuptools.command.egg_info import egg_info
|
||||
from subprocess import check_call
|
||||
|
||||
|
||||
@ -19,19 +20,25 @@ def build_library():
|
||||
cur_path = pathlib.Path(__file__).parent
|
||||
check_call(f"{cur_path}/utils/create_lib.sh".split())
|
||||
|
||||
|
||||
class PreDevelopCommand(develop):
|
||||
"""Pre-installation for development mode."""
|
||||
def run(self):
|
||||
build_library()
|
||||
develop.run(self)
|
||||
|
||||
|
||||
class PreInstallCommand(install):
|
||||
"""Pre-installation for installation mode."""
|
||||
def run(self):
|
||||
build_library()
|
||||
install.run(self)
|
||||
|
||||
|
||||
class PreEggInfoCommand(egg_info):
|
||||
def run(self):
|
||||
build_library()
|
||||
egg_info.run(self)
|
||||
|
||||
|
||||
with open("README.md") as f:
|
||||
readme = f.read()
|
||||
|
||||
@ -43,6 +50,8 @@ setup(
|
||||
version="0.1.0",
|
||||
description="A WebAssembly runtime powered by WAMR",
|
||||
long_description=readme,
|
||||
packages=find_packages(where="src"),
|
||||
package_dir={"": "src"},
|
||||
author="The WAMR Project Developers",
|
||||
author_email="hello@bytecodealliance.org",
|
||||
url="https://github.com/bytecodealliance/wasm-micro-runtime",
|
||||
@ -51,5 +60,6 @@ setup(
|
||||
cmdclass={
|
||||
'develop': PreDevelopCommand,
|
||||
'install': PreInstallCommand,
|
||||
'egg_info': PreEggInfoCommand,
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user