larksuite / larksuite/oapi-sdk-python

nuitka打包问题

Open
#71 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
559
Forks
102
PR merge metrics
No merged PRs in 30d

Description

使用nuitka打包遭遇以下报错

module.lark_oapi.api.hire.v1.model.c: In function 'modulecode_lark_oapi$api$hire$v1$model':
module.lark_oapi.api.hire.v1.model.c:11425:33: warning: implicit declaration of function 'IMPORT_HARD_LARK_OAPI__API__HIRE__V1__MODEL__SITE' [-Wimplicit-function-declaration]
11425 |         tmp_star_imported_280 = IMPORT_HARD_LARK_OAPI__API__HIRE__V1__MODEL__SITE();
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
module.lark_oapi.api.hire.v1.model.c:11425:31: warning: assignment to 'PyObject *' {aka 'struct _object *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
11425 |         tmp_star_imported_280 = IMPORT_HARD_LARK_OAPI__API__HIRE__V1__MODEL__SITE();
      |                               ^              
Nuitka-Scons: Backend linking program with 7061 files (no progress information available for this stage).
/usr/bin/ld: ./module.lark_oapi.api.hire.v1.model.o: in function `modulecode_lark_oapi$api$hire$v1$model':
module.lark_oapi.api.hire.v1.model.c:(.text+0x82ea): undefined reference to `IMPORT_HARD_LARK_OAPI__API__HIRE__V1__MODEL__SITE'
collect2: error: ld returned 1 exit status

在这句import lark_oapi as lark把lark所有模块都加载了,实际根本没用到这个模块,还不能nuitka忽略这个子模块,会在上级模块缺少子模块的错,这该如何解决???

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the reported Nuitka build output and the import statement import lark_oapi as lark, focusing on lark_oapi.api.hire.v1.model and its site submodule. Determine whether the unused submodule can be excluded without breaking parent imports; done means the package links successfully while the required SDK modules remain available.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.