0

Is it possible to configure a brew install command with setuptools? A common use case is with MacOs which does not come with UnixODBC or freetds. So the hypothetical scenario I'm trying to emulate is the following:

if os is MacOs, then run brew install freetds/unixodbc.

user3166881
  • 138
  • 3
  • 13
  • You can write a python script to get the system os and then do the if/else statement as you wish, this should help: https://stackoverflow.com/questions/110362/how-can-i-find-the-current-os-in-python – Max Aug 24 '18 at 14:06
  • Hey Max, my question is specific to using setuptools :) – user3166881 Aug 24 '18 at 14:12
  • Jumped to conclusions, sorry! – Max Aug 24 '18 at 14:15
  • Possible duplicate of [How to include .exe, apt-get and brew install files on a PyPi setup.py file](https://stackoverflow.com/questions/51902779/how-to-include-exe-apt-get-and-brew-install-files-on-a-pypi-setup-py-file) – hoefling Aug 25 '18 at 11:30
  • Definitely not a duplicate, the user is trying to figure out why a custom script he embedded into setup.py is not downloading said files when the .whl is installed. I’m very specifically looking for a solution that comes with setuptools – user3166881 Aug 25 '18 at 15:45
  • Read the answer in the linked question, also my comments there. `setuptools` will not install brewed packages or any other package manager's for you, as it's not responsible for that. You can, however, build and distribute a wheel with all the non-python dependencies bundled. – hoefling Aug 25 '18 at 16:53
  • Marking questions as duplicates does not mean your question is bad or unsuitable; it is a way of providing an information that will be useful to you. – hoefling Aug 25 '18 at 16:54
  • I understand, just didn't find the answer in that link useful - I wasn't asking for an opinion on whether this the right way. My question was pertaining to whether it's possible to do such a thing within setuptools. Hope that makes my point more clear. – user3166881 Aug 28 '18 at 15:23

0 Answers0