Mailinglist Archive: opensuse-packaging (31 mails)

< Previous Next >
Re: [opensuse-packaging] Separating python modules into packages
  • From: Axel Braun <axel.braun@xxxxxx>
  • Date: Fri, 27 Sep 2019 11:10:54 +0200
  • Message-id: <1698090.RqehOu38gv@southpole>
Hello Thomas.

Am Freitag, 27. September 2019, 08:59:27 CEST schrieb Thomas Schraitle:

I need to separate one module from a build of a python package into a
separate package.

First question: which Python version(s)? Is this package for Python 3
only or do you need to support both (2 and 3)?

Python3 only

No surprise, as this is not the location for the module.
So, I've defined a variable to keep the path:
%define t_path $(ls
-d /usr/lib/python3.* )/site-packages/trytond/modules

That definition looks wrong to me. ;)

but it worked in a shell environment :-)

I guess you already have the "python-rpm-macros" package as build
requirement. Shell expansions is tricky, so I would better rely on
these Python macros.

If you need Python3 only, I would try to redefine the variable like

%define t_path %{python3_sitelib}/trytond/modules

Yes! That fixed it, thanks a lot!

Here is an overview of these macros:

I will look into this.

One last question - to not get the files twice, is there a smarter way than
%exclude in the files section for every definition from the subpackage?

As I don't know your project, I'm not 100% sure what else you need.

At the moment it seems to work :-)

Thanks again

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

< Previous Next >
List Navigation
Follow Ups