best way to distribute a package that can work in API or ABI mode

20 views
Skip to first unread message

John Cupitt

unread,
Feb 23, 2018, 1:27:45 PM2/23/18
to python-cffi
Hello everyone,

First, thank you for cffi, it's very nice.

I'm trying to make a module that can work in API or ABI mode. At install time (when the user enters "pip install thing"), I'd like my setup.py to first try making an API mode add-on, then if that fails, fall back to ABI mode.

This seems to work fine on my local machine, but I can't work out how to package it so pypi will accept it. It seems to like pure python modules, or modules which include some C, but not modules which can be either.

What's the best way to get where I want to go? Should I make two separate modules, one for API and one for ABI?

John

TitanSnow

unread,
Feb 24, 2018, 8:22:05 PM2/24/18
to pytho...@googlegroups.com
Hi John,

You can package it as a source distribution by
python setup.py sdist

--
-- python-cffi: To unsubscribe from this group, send email to python-cffi...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/python-cffi?hl=en
---
You received this message because you are subscribed to the Google Groups "python-cffi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-cffi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
TitanSnow

John Cupitt

unread,
Feb 25, 2018, 10:59:37 AM2/25/18
to python-cffi
Of course! Thank you very much, that seems to do exactly what I want.

John
Reply all
Reply to author
Forward
0 new messages