Skip to content

how do i add additional files to a wheel? #2946

Answered by DetachHead
DetachHead asked this question in Q&A
Discussion options

You must be logged in to vote

ok so i got it working. it turns out i need to update the files dict when building the wheel, but copy the files normally when doing an editable install. i also realized the files were being copied to the same level as my package, instead of inside the package itself (ie. it was copying the files to a separate package called dist in site-packages instead of in basedpyright/dist) because i wasn't including pypi_package_dir in the keys when updating the files dict.

here's what my hook looks like now, which seems to work:

def pdm_build_update_files(context: Context, files: dict[str, Path]):
    context.ensure_build_dir()
    run_npm("ci")
    run_npm("run", "build:cli:dev")

    npm_package_dir

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@KotlinIsland
Comment options

@frostming
Comment options

@KotlinIsland
Comment options

@frostming
Comment options

@KotlinIsland
Comment options

Answer selected by DetachHead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants