Mailinglist Archive: opensuse-packaging (116 mails)

< Previous Next >
Re: [opensuse-packaging] Proper way to set shebangs in singlespecs
  • From: "Luciano Santos" <luc14n0@xxxxxxxxxxxxx>
  • Date: Fri, 22 Dec 2017 00:01:19 +0100
  • Message-id: <trinity-4b3e5271-183d-4b18-a9a7-ee6f3b314592-1513897279921@3c-app-mailcom-lxa06>
You can only use one shebang at a time, so the files in your
python2-package need to have python2, the ones in the python3-package
the python3 shebang. Or none at all.

I appreciate your help Sebastian, really, but I'm afraid you are not
getting me. I know I can only use one shebang at a time and that python2
packages must use python/python2-ending shebangs, python3 ones, python3.

Now, supposing that in this case we hadn't doc/example files in
python-gobject, but script files, what kind of conditionals would we
need to use to make each package use the proper python?

if python2; then

Constructs like this (I'm using it only as illustration), using rpm macros
are not working, at least I didn't figure it out yet. Using bash, same thing.

Since the example files go both under python2-gobject's doc folder and
python3-gobject's doc folder as well, I have being thinking using something
like this (theoretically speaking):

sed -i 'python2 shebang on you'
sed -i 'python3 shebang on you'

Again, supposing python-gobject have scrip files rather than doc/examples.
And, of course, using proper syntax and macros. How would we achieve the
proper shebang goal?
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-packaging+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups