from Hacker News

Ask HN: Need advice on how to deal with setup.py, Conda requirements and recipe

by mguijarr on 9/1/22, 10:01 AM with 0 comments

Hi,

I work on a Python project, with non-Python dependencies. For example, the project uses redis ; a full installation means installing redis server + redis-py.

So, we are using Conda and are happy with it. We have a requirements.txt file with the dependencies. When making the Conda package, dependencies have to be copied to meta.yaml... I would like to avoid this duplication.

I can access yaml or setup.py from conda-build, I was thinking to replace requirements.txt with environment.yml ?

Some people like using setup.py - and also, for development it is quite convenient to rely on `pip install -e .` in an already existing Conda env. Finally, maybe it is better to have dependencies only in setup.py, then (`install_requires`) ?

But, how to deal with non-Python dependencies like Redis server ?

I was thinking of using Poetry... Not sure it helps.

I am a bit confused ! Any advice from the community ? :)

Thanks in advance