A python singlespec question

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

A python singlespec question

gregfreemyer
All,

What's the right syntax for:

%{python_sitelib}/dfvfs-%{timestamp}-py2.7.egg-info

in a spec file %files section.  Obviously "py2.7" is wrong.

My testing package for python singlespec is at:
https://build.opensuse.org/package/show/home:gregfreemyer:Tools-for-forensic-boot-cd/python-dfVFS

Thanks
Greg
--
Greg Freemyer
Advances are made by answering questions. Discoveries are made by
questioning answers.
— Bernard Haisch
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: A python singlespec question

Sebastian-2
On 10/03/2017 07:35 PM, Greg Freemyer wrote:
> %{python_sitelib}/dfvfs-%{timestamp}-py2.7.egg-info
>
> in a spec file %files section.  Obviously "py2.7" is wrong.
hardcoding the version won't work of course

I many packages simply use '...py*.egg-info', others do
'py%{python_version}.egg-info'

Sebastian

--
python programming - mail server - photo - video - https://sebix.at
cryptographic key at https://sebix.at/DC9B463B.asc and on public keyservers



signature.asc (871 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: A python singlespec question

gregfreemyer
On Tue, Oct 3, 2017 at 3:30 PM, Sebastian <[hidden email]> wrote:
> On 10/03/2017 07:35 PM, Greg Freemyer wrote:
>> %{python_sitelib}/dfvfs-%{timestamp}-py2.7.egg-info
>>
>> in a spec file %files section.  Obviously "py2.7" is wrong.
> hardcoding the version won't work of course
>
> I many packages simply use '...py*.egg-info', others do
> 'py%{python_version}.egg-info'

I'm not sure * would work in a singlespec package, but
%{python_version} is exactly the macro I was looking for.

Thanks
Greg
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: A python singlespec question

Sebastian-2
On 10/04/2017 12:59 AM, Greg Freemyer wrote:
> I'm not sure * would work in a singlespec package,
It does, why should it not work? Thei %files section is processed
"twice", once for each version. In one run, the version is 2.7 and thus
the sitelib points to the 2.7-sitelib. There is only the py2.7.egg-info
directory, not a py3.6.egg-info. And then the same for 3.6 (or what ever
version is used).

Sebastian

--
python programming - mail server - photo - video - https://sebix.at
cryptographic key at https://sebix.at/DC9B463B.asc and on public keyservers



signature.asc (871 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: A python singlespec question

gregfreemyer
On Wed, Oct 4, 2017 at 3:06 AM, Sebastian <[hidden email]> wrote:
> On 10/04/2017 12:59 AM, Greg Freemyer wrote:
>> I'm not sure * would work in a singlespec package,
> It does, why should it not work? Thei %files section is processed
> "twice", once for each version. In one run, the version is 2.7 and thus
> the sitelib points to the 2.7-sitelib. There is only the py2.7.egg-info
> directory, not a py3.6.egg-info. And then the same for 3.6 (or what ever
> version is used).
>
> Sebastian


So the %install section is also run twice?  Once for python 2 and once
for python 3?

I did not appreciate that.

Greg
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: A python singlespec question

Sebastian-2
On 10/04/2017 10:21 PM, Greg Freemyer wrote:
> So the %install section is also run twice?  Once for python 2 and once
> for python 3?
No, it is not. I was overly simplifying how singlespec works. See
https://en.opensuse.org/openSUSE:Packaging_Python_Singlespec

--
python programming - mail server - photo - video - https://sebix.at
cryptographic key at https://sebix.at/DC9B463B.asc and on public keyservers



signature.asc (871 bytes) Download Attachment