[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opensuse-packaging
Subject:    [opensuse-packaging] Re: Packaging python singlespec applications
From:       Todd Rme <toddrme2178 () gmail ! com>
Date:       2017-09-13 15:18:42
Message-ID: CADb7s=u+DJK_=J+pq6mReQP8jj5LCmTk=Sz98hY4THgAiug_Ow () mail ! gmail ! com
[Download RAW message or body]

On Wed, Sep 13, 2017 at 7:42 AM, jan matejek <jmatejek@suse.com> wrote:
> hello,
>
> On 12.9.2017 21:28, Todd Rme wrote:
>> First, it would be nice if %python_subpackages allowed us to specify
>> additional packages to manage. These would be packages named using
>> "%package -n foo" that we nevertheless want to have multiple versions
>> of. The macros would then create a set of packages
>> "foo-%{python_bin_suffix}". So for example we might say
>> %{python_subpackages spyder}. If we did that, we would get
>> "spyder-3.6" and "spyder-2.7", with Requires, Provides, Obsoletes, and
>> %files all handled appropriately for the given python version.
>
> I kind of like this, but don't quite understand how you would use it.
> You're presuming the package is called "spyder"? or "python-spyder"? what is the subpackage here?

So you would still have "Name: python-spyder" that would be handled
normally (although it might not have a %files section).  There would
be a subpackage  "%package -n spyder". The "spyder" %package,
%description, %files, etc. would be replaced by
"spyder-%{python2_bin_suffix}" and "spyder-%{python3_bin_suffix}".

>> Second, it would be nice if there was some way to handle "%files -f
>> file". This is pretty much mandatory for -lang packages. So perhaps
>> something as bare-bones as allowing %files %{python_files foo -f
>> foo-%{$python_bin_suffix}.bar}, or something more advanced like
>> %{python_files foo -f foo.bar} which automatically inserts
>> %{$python_bin_suffix}
>
> Trouble with %files -f is that there is no good way to process the filelist -- it is generated at
> build time, but singlespec macros run at preprocessing time.
> A solution might be having a separate step in the %install section that would generate/convert the
> separate filelists?

Let's use python-numpy as an example. My understanding is that at
preprocessing time something like "%files %{python_files}" is
converted to, for example, "%files -n python3-numpy". My idea is that
something like "%files %{python_files -f foo.bar}" would be converted
to "%files -n python3-numpy -f foo-%{python3_bin_suffix}.bar". So it
would still be done at the preprocessing stage, as only the file name
would need to be edited.  The actual file contents would be handled by
the normal %files macro.

>> Third, it would be nice if %python_clone handled .desktop files and
>> appdata.xml files, or there was some alternative macro for these.
>
> That probably can be done. Please file a bug at github.com/opensuse/python-rpm-macros

Will do.

>> Fourth, it would be nice if there was a singlespec-aware version of
>> %find_lang and perhaps even %lang_package. %find_lang is easy enough
>> to handle manually with grep, but I have not found a good solution for
>> %lang_package.
>
> There's an existing bug for %find_lang. %lang_package probably can be folded under that.

Okay
-- 
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org
To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic