Mailinglist Archive: opensuse-packaging (127 mails)

< Previous Next >
Re: [opensuse-packaging] Re: Python packaging for Fedora/CentOS requires /usr/bin/python which doesn't exist
  • From: "Axel Braun" <axel.braun@xxxxxx>
  • Date: Tue, 15 Aug 2017 08:52:54 +0200
  • Message-id: <trinity-f91a4d90-c479-4325-8b23-a224a1f31f02-1502779973986@3c-app-gmx-bs30>
Am Dienstag, 15. August 2017, 08:10:16 CEST schrieb Adrian Schröter:
On Montag, 14. August 2017, 22:54:30 CEST wrote Neal Gompa:
On Mon, Aug 14, 2017 at 4:50 PM, Kristoffer Grönlund <kgronlund@xxxxxxxx>
Neal Gompa <ngompa13@xxxxxxxxx> writes:
On Wed, Aug 9, 2017 at 12:20 PM, jan matejek <jmatejek@xxxxxxxx> wrote:
On 9.8.2017 12:25, Kristoffer Grönlund wrote:

I'm having a problem with packaging crmsh for RH distros on OBS: It
seems that the rpm packages end up requiring /usr/bin/python which
not exist on those distributions:

I can't see any direct requirement in the spec file which would do
other than requiring python itself.

You get automatic requirements on shebang interpreters, i.e., what is
listed after "#!" at start of your script.

We're actually moving away from using /usr/bin/python. Would it help
if you changed it to /usr/bin/python2 ?

For what it's worth, we're moving away from /usr/bin/python in Fedora
as well. We recommend using /usr/bin/python2 or /usr/bin/python3 for
the version of python it should be used with.

Thank you, your recommendations seems to have put me on the right
track. I managed to clean up the binary requirements, but something
weird is happening when I change the shebang to /usr/bin/python2: The
rpm ends up still depending on /usr/bin/python. Could it be because
/usr/bin/python2 is a symlink to /usr/bin/python in the build
environment or something like that?

Maybe. At least in RHEL/CentOS 7, /usr/bin/python is a symlink to
/usr/bin/python2, which is a symlink to /usr/bin/python2.7, so I doubt it.

You may have something somewhere still declaring "/usr/bin/python" or
"/usr/bin/env python" as a shebang.

Something is wrong if it's generating a dependency of /bin/python,
though. That means something is specifically setting "/bin/python" as
a shebang.

I could define /usr/bin/python to a specific package given that there
is no definition which exact python version is to be used in RedHat (from
what I read here).

You could do some kind of dynamc definition:
PACKAGE_DIR=$(ls -d /usr/lib/python3.* )/site-packages


To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-packaging+owner@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages