Skip to content

Commit

Permalink
Added setup py
Browse files Browse the repository at this point in the history
  • Loading branch information
AeonLucid committed Sep 2, 2021
1 parent b687af7 commit ef6430e
Show file tree
Hide file tree
Showing 9 changed files with 720 additions and 7 deletions.
674 changes: 674 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include README.md
include LICENSE.txt
include requirements.txt
recursive-exclude tests *
2 changes: 1 addition & 1 deletion examples/example_douyin.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from androidemu.java.java_class_def import JavaClassDef
from androidemu.java.java_method_def import java_method_def

from samples import debug_utils
import debug_utils


class XGorgen(metaclass=JavaClassDef, jvm_name='com/ss/sys/ces/a'):
Expand Down
5 changes: 2 additions & 3 deletions examples/example_jiagu.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
from androidemu.java.java_class_def import JavaClassDef
from androidemu.java.java_method_def import java_method_def


# Create java class.
from samples import debug_utils
import debug_utils


# Create java class.
class MainActivity(metaclass=JavaClassDef, jvm_name='local/myapp/testnativeapp/MainActivity'):

def __init__(self):
Expand Down
2 changes: 1 addition & 1 deletion examples/example_jni.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from androidemu.java.java_class_def import JavaClassDef
from androidemu.java.java_method_def import java_method_def

from samples import debug_utils
import debug_utils


# Create java class.
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[bdist_wheel]
universal=1
35 changes: 35 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env python3

from pathlib import Path
from setuptools import setup, find_packages

project_dir = Path(__file__).parent

setup(
name="androidemu",
version="0.0.1",
description="Allows you to partly emulate an Android native library.",
long_description=project_dir.joinpath("README.md").read_text(encoding="utf-8"),
long_description_content_type="text/markdown",
keywords=["python"],
author="AeonLucid",
author_email="[email protected]",
url="https://github.com/johnthagen/python-blueprint",
packages=find_packages("src"),
package_dir={"": "src"},
python_requires=">=3.7",
include_package_data=True,
install_requires=project_dir.joinpath("requirements.txt").read_text().split("\n"),
license="GPLv3",
classifiers=[
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: System :: Emulators",
"Intended Audience :: Developers",
],
)
2 changes: 1 addition & 1 deletion src/androidemu/native/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def dlopen(self, uc, path):
logger.debug("Called dlopen(%s)" % path)

if path == 'libvendorconn.so':
lib = os.path.realpath(os.path.join(__file__, '..', '..', '..', 'samples', 'example_binaries', 'libvendorconn.so'))
lib = os.path.realpath(os.path.join(__file__, '..', '..', '..', '..', 'examples', 'example_binaries', 'libvendorconn.so'))
mod = self._emu.load_library(lib)

return mod.base
Expand Down
1 change: 0 additions & 1 deletion src/androidemu/vfs/file_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from androidemu.cpu.syscall_handlers import SyscallHandlers
from androidemu.utils import memory_helpers
from androidemu.vfs import file_helpers
from samples import debug_utils

logger = logging.getLogger(__name__)

Expand Down

0 comments on commit ef6430e

Please sign in to comment.