https://bugzilla.redhat.com/show_bug.cgi?id=1503915
--- Comment #15 from Stuart D Gathman stuart@gathman.org --- Spec URL: https://gathman.org/linux/SPECS/roca-detect.spec SRPM URL: https://gathman.org/linux/f28/src/roca-detect-1.2.1-5.fc28.src.rpm
1. Added tabs after tags and double space between sections to SPEC. I aim to please.
3,4. I wasn't going to leave the commented out code in there. Really, I wasn't!
6. Removed square brackets and parens from description.
9. I was eager to see what %{py_shbang_opts} would add. The -s seems quite reasonable. I'll use that for wrappers from now on. Thanks! A trivial wrapper seems the one place where multiple imports on one line would be entirely appropriate - but I split into two lines, and now the trivial wrapper is fully pep8 compliant. I can't complain much since you caved on using a distro specific wrapper.
For reference, here is the EASY script I am replacing. It works on Windows, but not on Fedora without a lot of hacking (and additional runtime dependencies). By far the smallest hack to upstream is to simply replace it with a trivial wrapper. (I won't convince you, but thought I'd try.)
#!/usr/bin/python3 # EASY-INSTALL-ENTRY-SCRIPT: 'roca-detect==1.2.1','console_scripts','roca-detect-tls' __requires__ = 'roca-detect==1.2.1' import re import sys from pkg_resources import load_entry_point
if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script.pyw?|.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point('roca-detect==1.2.1', 'console_scripts', 'roca-detect-tls')() )
The roca-detect EASY script would run roca.detect.py, and roca-detect-tls EASY script (new in upstream version 1.2.1) runs roca.detect_tls.py (but is broken on Fedora). The roca-detect-tls entry works if you symlink to it directly. But they both use the forbidden (for good reason) /usr/bin/env shbang. The detect.py cli scans local files, the detect_tls.py cli makes actual network connections.
The upshot is that roca-detect-tls is actually a different function from roca-detect.
Proposal:
How do you feel about patching both upstream cli scripts to replace the env shbang with %{__python} %{py_shbang_opts} - and making the /usr/bin entries simply symlink to them? I'll go ahead and do that, test, and then come back here for your reaction.