Repository navigation
Replies: 1 comment
|
Your screenshot already has Use setuptools imports and add these settings to from setuptools import setup, Extension
setup(
name="my_package",
version="0.1",
packages=["my_package"],
package_data={"my_package": ["pdf/*.pdf"]},
ext_modules=[Extension("my_package.test", ["my_package/test.c"])],
)The example uses the generated
from importlib.resources import files
pdf = files("my_package").joinpath("pdf/book.pdf").read_bytes()I built and installed matching C and Cython examples with setuptools 84.0.0 on Linux; both wheels contained the compiled extension and Declaring a package also copies its Python modules. If you need the compiled |
Uh oh!
There was an error while loading. Please reload this page.
I only use ext_modules, not package. I want to package it as. pyd, but I encountered an issue where I cannot include other static files。
This is my setup function
I want to package pdf/book.pdf to the my_mackage directory after executing the build task。
I tried to add
data_files=[("book", ["my_package/pdf/book.pdf"])],, but it didn't workMANIFEST.in
All reactions