Skip to main content

A python lib created from Difficult Rocket development

Project description

lib-not-dr

A python lib came from Difficult Rocket development

一个在 Difficult Rocket 开发中 分离出来的 python 库

Information/信息

  • Version/版本: 0.1.0

Author/作者

shenjackyuanjie

License/许可证

MPL-2.0

安装/Install

pip install lib-not-dr

使用/Usage

Nuitka Compiler Helper

simple example 简单示例

import subprocess
from pathlib import Path
from lib_not_dr.nuitka.compile import CompilerHelper

compiler = CompilerHelper(src_file = Path("main.py"))

print(compiler)
subprocess.run(compiler.gen_subprocess_cmd())

more complex example 复杂示例

import sys
import subprocess
from pathlib import Path
from lib_not_dr.nuitka.compile import CompilerHelper

compiler = CompilerHelper(src_file = Path("main.py"), run_after_build=True)

print(compiler)

if '-y' in sys.argv or '--yes' in sys.argv:
    do_run = True
elif '-n' in sys.argv or '--no' in sys.argv:
    do_run = False
else: # do_run is None
    while (do_run := input("compile? [y/n]").lower()) not in ["y", "n", "yes", "no"]:
        pass
        # 获取用户输入是否编译
        # get user confirmation to compile or not
    do_run = True if do_run[0] == "y" else False

if do_run:
    subprocess.run(compiler.gen_subprocess_cmd())

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

lib-not-dr-0.1.1.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

lib_not_dr-0.1.1-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

Details for the file lib-not-dr-0.1.1.tar.gz.

File metadata

  • Download URL: lib-not-dr-0.1.1.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.7.4 CPython/3.8.10

File hashes

Hashes for lib-not-dr-0.1.1.tar.gz
Algorithm Hash digest
SHA256 01b4123d4104463cb2e61c5194bba0e22465257da0e5ef08c84908fd742b2c54
MD5 1fa133c6a67994eb4f7c17fa1a55f5bf
BLAKE2b-256 1c1ebcc09d8caeef417098cdfaa11731e5af6cc7d2f9553183914816c2a3c7fb

See more details on using hashes here.

File details

Details for the file lib_not_dr-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: lib_not_dr-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.7.4 CPython/3.8.10

File hashes

Hashes for lib_not_dr-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b509eb982882e9b0b99b59e4c73baa405591904b86e94324634371556bea4683
MD5 7861f33c054709aee81aae96e502b136
BLAKE2b-256 ec035d414ba7bb4c0c1e2f9ec6558d7ac0ce7716479d068000db27824ca16b40

See more details on using hashes here.

Supported by

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