IT8951 icon indicating copy to clipboard operation
IT8951 copied to clipboard

Add dependency requirements in setup.py file

Open robweber opened this issue 2 years ago • 1 comments

Would it be possible to add the dependency requirements in either the setup.py file so they can be pulled in when the library is built? This would help being able to include this library automatically as part of other projects without having to a) include this project reqs in the larger project or b) explaining they need to be installed separately.

I understand there is a difference in install on RPI vs other systems for the purposes of testing. Would using platform filtering in this case solve that issue so it's still cross-platform? I can write up an actual PR but excluding the x86_64 platform would filter out the Linux desktop systems but do the install on Arm architecture.

setup(
....
install_requires = [
    'pillow',
    'RPI-GPIO; platform_machine != "x86_64"'
]
)

robweber avatar Feb 22 '22 15:02 robweber

This would be super helpful for my project as well.

I'd be happy to test and validate.

txoof avatar Feb 22 '22 19:02 txoof

Fixed by 777d3473ec4ce64eee1326cf8e58dd17e30b8025

GregDMeyer avatar Nov 04 '23 02:11 GregDMeyer

(I was considering using platform filtering but I figured precisely getting the filtering right might be a headache, so I just added optional dependencies rpi. If this is annoying for some reason let me know, and we can try to do the best possible with platform filtering!)

GregDMeyer avatar Nov 04 '23 02:11 GregDMeyer