packaging python on Tumbleweed - what's the TW way of doing the py_requires macro?
Hi, I'm trying to get a python package to build for Tumbleweed, and the macro %{py_requires} is gone - what do I use instead? Cheers MH -- Mathias Homann Mathias.Homann@openSUSE.org telegram: https://telegram.me/lemmy98 irc: [lemmy] on freenode and ircnet obs: lemmy04 gpg key fingerprint: 8029 2240 F4DD 7776 E7D2 C042 6B8E 029E 13F2 C102
And some more fun: "Nothing provides STOP-devel" ... what is that supposed to mean and what do I do about it? The python package follows the singlespec rules... Cheers Mathias Am 2021-01-04 13:02, schrieb Mathias Homann:
Hi,
I'm trying to get a python package to build for Tumbleweed, and the macro %{py_requires} is gone - what do I use instead?
Cheers MH
-- Mathias Homann Mathias.Homann@openSUSE.org telegram: https://telegram.me/lemmy98 irc: [lemmy] on freenode and ircnet obs: lemmy04 gpg key fingerprint: 8029 2240 F4DD 7776 E7D2 C042 6B8E 029E 13F2 C102
Hi, Check https://en.opensuse.org/openSUSE:Packaging_Python and the documentation for python-rpm-macros. Am 04.01.21 um 13:27 schrieb Mathias Homann:
And some more fun:
"Nothing provides STOP-devel" ... what is that supposed to mean and what do I do about it?
That's a an error message from OBS the obs prjconf version of `%python_module` and only works for the build service resolver.
The python package follows the singlespec rules...
You need to `BuildRequire: python-rpm-macros`, which overrides the OBS definition.
I'm trying to get a python package to build for Tumbleweed, and the macro %{py_requires} is gone - what do I use instead?
I see that https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros still mentions py_requires, but it is horribly outdated. Removing that entry from the wiki. The macro was obsoleted in 2017 [1] You can remove the usage, or replace by - `BuildRequires: %pythons` if you need the full standardlib instead of just python-base - `BuildRequires: %{python_module devel}` if you need to compile against the Python headers
Cheers MH
Cheers Ben [1] https://github.com/rpm-software-management/spec-cleaner/issue/206
Am Montag, 4. Januar 2021, 14:09:49 CET schrieb Ben Greiner:
You need to `BuildRequire: python-rpm-macros`, which overrides the OBS definition.
...I already have that in my spec file... Cheers MH -- Mathias Homann Mathias.Homann@openSUSE.org OBS: lemmy04 Jabber (XMPP): lemmy@tuxonline.tech IRC: [Lemmy] on freenode and ircnet (bouncer active) telegram: https://telegram.me/lemmy98 keybase: https://keybase.io/lemmy gpg key fingerprint: 8029 2240 F4DD 7776 E7D2 C042 6B8E 029E 13F2 C102
On 1/4/21 2:21 PM, Mathias Homann wrote:
Am Montag, 4. Januar 2021, 14:09:49 CET schrieb Ben Greiner:
You need to `BuildRequire: python-rpm-macros`, which overrides the OBS definition. ...I already have that in my spec file... ... if you don't show the specfile we can only guess...
Am 04.01.21 um 14:45 schrieb Sebix:
On 1/4/21 2:21 PM, Mathias Homann wrote:
Am Montag, 4. Januar 2021, 14:09:49 CET schrieb Ben Greiner:
You need to `BuildRequire: python-rpm-macros`, which overrides the OBS definition. ...I already have that in my spec file... ... if you don't show the specfile we can only guess...
~snowglobe/python-autobuild? * You are incorrectly using python_module for Requires. * The error comes from skip_python3 being defined for Tumbleweed. Your %pythons is empty then. The check for sle_version is not working as intended * The files section will create conflicts in %_bindir. Use %python_clone -a, and update-alternatives.
Am Montag, 4. Januar 2021, 14:50:37 CET schrieb Ben Greiner:
Am 04.01.21 um 14:45 schrieb Sebix:
On 1/4/21 2:21 PM, Mathias Homann wrote:
Am Montag, 4. Januar 2021, 14:09:49 CET schrieb Ben Greiner:
You need to `BuildRequire: python-rpm-macros`, which overrides the OBS definition.
...I already have that in my spec file...
... if you don't show the specfile we can only guess...
~snowglobe/python-autobuild?
* You are incorrectly using python_module for Requires. * The error comes from skip_python3 being defined for Tumbleweed. Your %pythons is empty then. The check for sle_version is not working as intended * The files section will create conflicts in %_bindir. Use %python_clone -a, and update-alternatives.
Could you have a look at the specfile again? I **think** i got everything right now, at least it builds (on anything << TW, the source itself isn't ready for python3 yet... yes, i know, i know, you don't have to point out how stupid that is...). Now the next battle: get that crap to properly build from the same spec file for Leap, TW, AND fredora... o.0 Cheers Mathias -- Mathias Homann Mathias.Homann@openSUSE.org OBS: lemmy04 Jabber (XMPP): lemmy@tuxonline.tech IRC: [Lemmy] on freenode and ircnet (bouncer active) telegram: https://telegram.me/lemmy98 keybase: https://keybase.io/lemmy gpg key fingerprint: 8029 2240 F4DD 7776 E7D2 C042 6B8E 029E 13F2 C102
Hi, Am 05.01.21 um 08:40 schrieb Mathias Homann:
~snowglobe/python-autobuild?
* You are incorrectly using python_module for Requires. Still the case. * The error comes from skip_python3 being defined for Tumbleweed. Your %pythons is empty then. The check for sle_version is not working as intended
Could you have a look at the specfile again? I **think** i got everything right now, at least it builds (on anything << TW, the source itself isn't ready for python3 yet... yes, i know, i know, you don't have to point out how stupid that is...).
So the skip_python3 on Tumbleweed *is* intended. Are you aware, that Tumbleweed only has a few base packages left providing python2? You need to re-enable python2 for autobuild and all its dependencies. With singlespec, OBS needs that redefinition in the prjconf. That makes it impossible to submit the package into Factory. If you only build for the python2 flavor, you don't need singlespec at all! Remove the %python_subpackages macro and python_module redefinition and calls. Remove update-alternatives. You can still use python2_build python2_install, python2_sitelib and so on.
Now the next battle: get that crap to properly build from the same spec file for Leap, TW, AND fredora... o.0
Cheers Mathias
Am Dienstag, 5. Januar 2021, 14:36:39 CET schrieb Ben Greiner:
Hi,
Am 05.01.21 um 08:40 schrieb Mathias Homann:
~snowglobe/python-autobuild?
* You are incorrectly using python_module for Requires.
Still the case.
* The error comes from skip_python3 being defined for Tumbleweed. Your %pythons is empty then. The check for sle_version is not working as intended
Could you have a look at the specfile again? I **think** i got everything right now, at least it builds (on anything << TW, the source itself isn't ready for python3 yet... yes, i know, i know, you don't have to point out how stupid that is...).
So the skip_python3 on Tumbleweed *is* intended.
Are you aware, that Tumbleweed only has a few base packages left providing
... for now, yes, but linden lab is supposedly working on porting their autobuild to python3... slowly. python2? You need to re-enable python2 for autobuild and all its dependencies.
With singlespec, OBS needs that redefinition in the prjconf. That makes it impossible to submit the package into Factory.
that's ok, this autobuilkd will never be submitted - in fact, if i wasn't building locally outside of rpm building as well I wouldn't even be publishing it. It is **only** needed to build the phoenix-firestorm viewer that is the main reason for all this humbug o.0
If you only build for the python2 flavor
like I said - eventually it will all be python3, just not yet. Cheers MH -- Mathias Homann Mathias.Homann@openSUSE.org OBS: lemmy04 Jabber (XMPP): lemmy@tuxonline.tech IRC: [Lemmy] on freenode and ircnet (bouncer active) telegram: https://telegram.me/lemmy98 keybase: https://keybase.io/lemmy gpg key fingerprint: 8029 2240 F4DD 7776 E7D2 C042 6B8E 029E 13F2 C102
Am 05.01.21 um 15:00 schrieb Mathias Homann:
Hi,
Am 05.01.21 um 08:40 schrieb Mathias Homann:
So the skip_python3 on Tumbleweed *is* intended. ... for now, yes, but linden lab is supposedly working on porting
Am Dienstag, 5. Januar 2021, 14:36:39 CET schrieb Ben Greiner: their autobuild to python3... slowly.
Are you aware, that Tumbleweed only has a few base packages left providing python2? You need to re-enable python2 for autobuild and all its dependencies. With singlespec, OBS needs that redefinition in the prjconf. That makes it impossible to submit the package into Factory. that's ok, this autobuilkd will never be submitted - in fact, if i wasn't building locally outside of rpm building as well I wouldn't even be publishing it. It is **only** needed to build the phoenix-firestorm viewer that is the main reason for all this humbug o.0
If you only build for the python2 flavor like I said - eventually it will all be python3, just not yet.
Do you really need to build on tumbleweed right now? Because the dependency tree going through python-llbase is not that small. See home:bnavigator:branches:home:lemmy04:snowglobe.
Cheers MH
HTH Ben
Am Dienstag, 5. Januar 2021, 15:11:15 CET schrieb Ben Greiner:
Am 05.01.21 um 15:00 schrieb Mathias Homann:
Am Dienstag, 5. Januar 2021, 14:36:39 CET schrieb Ben Greiner:
Hi,
Am 05.01.21 um 08:40 schrieb Mathias Homann:
So the skip_python3 on Tumbleweed *is* intended.
... for now, yes, but linden lab is supposedly working on porting their autobuild to python3... slowly.
Are you aware, that Tumbleweed only has a few base packages left providing
python2? You need to re-enable python2 for autobuild and all its dependencies.
With singlespec, OBS needs that redefinition in the prjconf. That makes it impossible to submit the package into Factory.
that's ok, this autobuilkd will never be submitted - in fact, if i wasn't building locally outside of rpm building as well I wouldn't even be publishing it. It is **only** needed to build the phoenix-firestorm viewer that is the main reason for all this humbug o.0
If you only build for the python2 flavor
like I said - eventually it will all be python3, just not yet.
Do you really need to build on tumbleweed right now? Because the dependency tree going through python-llbase is not that small. See home:bnavigator:branches:home:lemmy04:snowglobe.
need to, ... well, it looks as if switching to TW is the only option for gamers on linux to get commercial games to run, more and more games on steam need glibc 2.17 or better and even Leap 15.3 still only has 2.16.... But I guess I can disable building on TW until linden labs autobuild actually works on python 3. Cheers MH -- Mathias Homann Mathias.Homann@openSUSE.org Jabber (XMPP): lemmy@tuxonline.tech IRC: [Lemmy] on freenode and ircnet (bouncer active) telegram: https://telegram.me/lemmy98 keybase: https://keybase.io/lemmy gpg key fingerprint: 8029 2240 F4DD 7776 E7D2 C042 6B8E 029E 13F2 C102
Ben Greiner píše v Út 05. 01. 2021 v 14:36 +0100:
So the skip_python3 on Tumbleweed *is* intended. Are you aware, that Tumbleweed only has a few base packages left providing python2? You need
Moreover that Python 2 will be removed from Factory as soon as possible (which means mostly when Firefox and nodejs won't need it for building)? Matěj -- https://matej.ceplovi.cz/blog/, Jabber: mcepl@ceplovi.cz GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8 Never, never, never believe any war will be smooth and easy, or that anyone who embarks on the strange voyage can measure the tides and hurricanes he will encounter. The statesman who yields to war fever must realise that once the signal is given, he is no longer the master of policy but the slave of unforeseeable and uncontrollable events. -- Winston Churchill, 1930
Mathias Homann píše v Po 04. 01. 2021 v 14:21 +0100:
Am Montag, 4. Januar 2021, 14:09:49 CET schrieb Ben Greiner:
You need to `BuildRequire: python-rpm-macros`, which overrides the OBS definition.
...I already have that in my spec file...
Name: %{name} Version: %{version} Is this a contribution to the Obfuscated SPEC File Contest? You know that if you write just Name: python-autobuild Version: 1.1.9 macros %{name} and %{version} with exactly the same content will be defined as well, right? Best, Matěj -- https://matej.ceplovi.cz/blog/, Jabber: mcepl@ceplovi.cz GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8 It took me fifteen years to discover I had no talent for writing, but I couldn’t give it up, because by that time I was too famous. -- Robert Benchley
Hi, On 1/4/21 1:02 PM, Mathias Homann wrote:
Hi,
I'm trying to get a python package to build for Tumbleweed, and the macro %{py_requires} is gone - what do I use instead?
Cheers MH
Have you read https://en.opensuse.org/openSUSE:Packaging_Python? Especially https://en.opensuse.org/openSUSE:Packaging_Python#BuildRequires which mentions: BuildRequires: %{pythons} But usually that won't be required, as, for example BuildRequires: %{python_module setuptools} already pulls the needed (build) dependencies. I hope this helps and best regards, Sebastian
participants (5)
-
Ben Greiner
-
Mathias Homann
-
Mathias Homann
-
Matěj Cepl
-
Sebix