biocommons / biocommons.example

Template for new biocommons packages, and source of configuration for periodic updates to derived packages
1 stars 1 forks source link

Makefile uses bash globstar, which is unavailable to older bash versions #41

Open jsstevenson opened 3 months ago

jsstevenson commented 3 months ago

Describe the bug The standard biocommons makefile uses this set of commands for the SHELL variable:

SHELL:=/bin/bash -e -o pipefail -O globstar

However, in this repo (ie the example) the last option is commented out:

SHELL:=/bin/bash -e -o pipefail #-O globstar

This is probably because globstar was introduced in Bash v4, whereas a lot of linux and unix environments, including MacOS, ship with an older version (seems like 3.2 is pretty common). Otherwise, you'll see something like the following:

make venv && source venv/bin/activate && make develop
/bin/bash: line 0: globstar: invalid shell option name
make: *** [devready] Error 2

Expected behavior I guess the question here is whether or not we want to bend over backwards for the MacOS crowd -- either require them to upgrade bash themselves to use the makefiles, or rewrite the relevant targets (clean etc) to use find or something else that would enable recursing through subdirectories.

Additional context It looks like the commit that commented that section out was introduced during the hackathon, and I'm not sure if it was meant to be permanent or if people even really noticed it (I didn't).

korikuzma commented 3 months ago

@jsstevenson This line seems to fix things: https://github.com/biocommons/seqrepo-rest-service/blob/0df10b23b208bfd6cc838e9b427f0ca741310aa4/Makefile#L8