Skip to main content

akracer is next version of py_mini_racer

Project description

AKRacer

AKRacer 主要是解决 py_mini_racer 在 64 位 ARM 操作系统中的动态链接库调用问题,主要 方案就是通过 pip install akracer 使得在对应 py_mini_racer 目录中下载相应的已经 编译好的动态链接库,目前主要包括 armlibmini_racer.dylibarmlibmini_racer.glibc.so 这 两个动态链接库,分别对应 Apple M 系列芯片和 Ubuntu 18.04,20.04 和 22.04 及树莓派 64 位操作系统。

安装

pip install akracer

环境变量设置

需要在本地设置 PyPI 的环境变量

  1. HATCH_INDEX_USER__token__
  2. HATCH_INDEX_AUTHpypi-xxxx
  3. 如果使用 PyCharm 则可以在 Settings -> Tools -> Terminal -> Environment variables 中设置
  4. 具体的值在 .pypirc 文件中,其中 pypi-xxxx 为对应的 token 是从 pypi 项目的设置中生成的

定制化

主要修改 akracer/py_mini_racer/py_mini_racer.py 中的 _get_lib_path 函数,使得其可以 正常调用到对应的动态链接库。

对应操作

  1. 修改版本:akracer/py_mini_racer/__init__.py 中的 __version__ 更新到新版本
  2. 删除版本:akracer/dist 删除该文件夹,以删除老版本
  3. 构建版本:hatch build
  4. 发布版本:hatch publish

注意:第一次上传需要在 hatch publish -u __token__ -a pypi-xxxx 中配置好 token,参考 https://hatch.pypa.io/latest/publish/#authentication 其中的 pypi-xxxx 为对应的 token 是从 pypi 项目的设置中生成的。

动态链接库

本项目目标是解决 py_mini_racer 在 64 位操作系统中的动态链接库调用问题;

  1. py_mini_racer 在 x86 架构的操作系统中,可以直接使用 pip 安装,不需要额外的动态链接库;
  2. 其在 ARM 架构的操作系统中,需要额外的动态链接库
  3. 本次主要提供其在 Apple M 系列芯片中的动态链接库
  4. 还提供 ARM 在 Ubuntu 18.04,20.04 和 22.04 中的动态链接库
  5. 还提供其在树莓派 64 位操作系统中的动态链接库

对应一览表

  1. armlibmini_racer.dylib 对应 Apple M 系列芯片
  2. armlibmini_racer.glibc.so 对应 Ubuntu 18.04,20.04 和 22.04 及树莓派 64 位操作系统
  3. 其余则由 py_mini_racer 编译安装

项目管理

  1. Hatch
  2. Hatch 文档

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

akracer-0.0.14.tar.gz (10.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

akracer-0.0.14-py3-none-any.whl (10.1 MB view details)

Uploaded Python 3

File details

Details for the file akracer-0.0.14.tar.gz.

File metadata

  • Download URL: akracer-0.0.14.tar.gz
  • Upload date:
  • Size: 10.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for akracer-0.0.14.tar.gz
Algorithm Hash digest
SHA256 e084c14bf6d9a02d5da375e3af1cba3d46f103aa1cf3a2010593b3e95bf1c29a
MD5 61bf21c54f2b90e576977f58ab9a3291
BLAKE2b-256 1ec6f38feed5b961d73e1b4cb049fdb45338356e0f5b828b230c00d0e51f3137

See more details on using hashes here.

File details

Details for the file akracer-0.0.14-py3-none-any.whl.

File metadata

  • Download URL: akracer-0.0.14-py3-none-any.whl
  • Upload date:
  • Size: 10.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for akracer-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 629eaccd0e1d18366804b797eb2692ed47bed0028f55b5a5af3cc277d521df04
MD5 d3ee2554ed9c7ff98900f4efa54b556a
BLAKE2b-256 53cb1041355b14cd4b76ac082e8c676858f6eddb78f0ba37c59284adf36e5103

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page