0

I created own Python Package in which I want to add own Python C Extension, because in Python Package I'm importing this C-Ext. I want to install it from local files, not pypi. I have dist files of C Extension, and I wonder how to do it properly. I assume that I should do some configuration in setup.py. Maybe something like Extension object where I can define own source for package?

setuptools.setup(
    ...
    packages=[Extension('ownpackage', '/package.tar.gz')],
    ...
)

1 Answer 1

0

After a while I found the answer. Just add source files to project dir and setup.py

Extension("c_ext", ["module/c_exts/main.c", ...]),

Then build module.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.