You are not logged in.

#1 2015-08-31 17:33:26

wil93
Member
From: Italy
Registered: 2013-09-15
Posts: 72

[SOLVED-ish] How to depend on "either A or B"

I need the "virtualenv" command, which is provided by either python2-virtualenv or python-virtualenv. How do I depend on "either A or B"?

Last edited by wil93 (2015-08-31 18:19:26)

Offline

#2 2015-08-31 17:41:46

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,420
Website

Re: [SOLVED-ish] How to depend on "either A or B"

You can't, unless you have a virtual package which provides both python2 and python versions.

Adding some context to your problem might find an alternative solution.


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#3 2015-08-31 18:12:46

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,649
Website

Re: [SOLVED-ish] How to depend on "either A or B"

If it's a compile-time dependency, then ideally create a split package, one depending on one version, the other on the other. If it's a runtime dependency, add both to the optdepends array and make it clear that one or the other is needed in a post-install message.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2015-08-31 18:18:50

wil93
Member
From: Italy
Registered: 2013-09-15
Posts: 72

Re: [SOLVED-ish] How to depend on "either A or B"

I now noticed that, actually, the two packages provide virtualenv and virtualenv2 respectively. However, from what I understand, I can use either of these commands equally (so I would check if one is available, and if it's not then use the other one).

I think that, for now, I will just depend on the python3 version. Thanks all smile

Offline

Board footer

Powered by FluxBB