EddyRivasLab / easel

Sequence analysis library used by Eddy/Rivas lab code
Other
46 stars 26 forks source link

python3 is required for re.fullmatch(); make it explicit in shebang #25

Closed traviswheeler closed 6 years ago

traviswheeler commented 6 years ago

On my machine, using rmanprocess.py (e.g. building HMMER userguide with 'make pdf') resulted in numerous errors of this form: File "../../easel/devkit/rmanprocess.py", line 41, in if not re.fullmatch(r'\s*', line): AttributeError: 'module' object has no attribute 'fullmatch'

The cause of these errors is that re.fullmatch() only exists in python3, but rmanprocess.py's shebang line only called for

! /usr/bin/env python

If the default python install is 2.x, the script fails with the errors above.

Changing to

! /usr/bin/env python3

forces the use of the correct version.

(This is not future-proof to the arrival of python4. I am unfamiliar with future-proof options to make it work, but I suspect that other things in the script might break in a change to 4.x, so it may be good to force 3.x)

cryptogenomicon commented 6 years ago

Thanks!