Packaging python-nautikos fails as versions executable cannot be found
Hi all, can someone help me find my error in packaging python-nautikos?
https://build.opensuse.org/package/show/home:ojkastl_buildservice:Branch_dev...
The %pyproject_install macro fails as it cannot find the python-versioned executable in /usr/bin/: [ 13s] RPM build errors: [ 13s] File not found: /home/abuild/rpmbuild/BUILDROOT/python-nautikos-0.3.4-1.1.x86_64/usr/bin/nautikos-3.9 I must have missed something (or something inside upstream's settings is broken). I have added the update-alternatives commands as documented in the wiki. Thanks in advance! Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
Am 09.10.23 um 08:59 schrieb Johannes Kastl:
Hi all,
can someone help me find my error in packaging python-nautikos?
https://build.opensuse.org/package/show/home:ojkastl_buildservice:Branch_dev...
The %pyproject_install macro fails as it cannot find the python-versioned executable in /usr/bin/:
[ 13s] RPM build errors: [ 13s] File not found: /home/abuild/rpmbuild/BUILDROOT/python-nautikos-0.3.4-1.1.x86_64/usr/bin/nautikos-3.9
I must have missed something (or something inside upstream's settings is broken). I have added the update-alternatives commands as documented in the wiki.
Which wiki page? You used the wrong macro. https://en.opensuse.org/openSUSE:Packaging_Python#update-alternatives The "If not" clause for *|%prepare_alternative something|* refers to the rare case when you would create nautikos-3.9 and the other flavors yourself. The wording is a bit misleading. https://build.opensuse.org/request/show/1116384 17 <https://build.opensuse.org/request/show/1116384#diff_0_n17>-%prepare_alternative nautikos 18 <https://build.opensuse.org/request/show/1116384#diff_0_n18>+%python_clone -a %{buildroot}%{_bindir}/nautikos
Thanks in advance! Johannes
Hi Ben, On 09.10.23 at 09:51 Ben Greiner wrote:
Am 09.10.23 um 08:59 schrieb Johannes Kastl:
I must have missed something (or something inside upstream's settings is broken). I have added the update-alternatives commands as documented in the wiki.
Which wiki page? You used the wrong macro.
https://en.opensuse.org/openSUSE:Packaging_Python#update-alternatives The "If not" clause for *|%prepare_alternative something|* refers to the rare case when you would create nautikos-3.9 and the other flavors yourself. The wording is a bit misleading.
OK, I thought this was the way to go as I had no %python_clone in my spec file. I would add a second stanza after the "If", something like: "If the %python_install does not create the version-specific file names itself, please add the %python_clone command to your install section" D'accord?
Thanks very much! Kind Regards Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
Am 09.10.23 um 09:55 schrieb Johannes Kastl:
Hi Ben,
On 09.10.23 at 09:51 Ben Greiner wrote:
Am 09.10.23 um 08:59 schrieb Johannes Kastl:
I must have missed something (or something inside upstream's settings is broken). I have added the update-alternatives commands as documented in the wiki.
Which wiki page? You used the wrong macro.
https://en.opensuse.org/openSUSE:Packaging_Python#update-alternatives The "If not" clause for *|%prepare_alternative something|* refers to the rare case when you would create nautikos-3.9 and the other flavors yourself. The wording is a bit misleading.
OK, I thought this was the way to go as I had no %python_clone in my spec file.
I would add a second stanza after the "If", something like: "If the %python_install does not create the version-specific file names itself, please add the %python_clone command to your install section"
Why would you expect deprecated %python_install or %pyproject_install do that? %python_clone is standard and added by py2pack automatically. It's not optional for flavored commands.
On 09.10.23 at 10:04 Ben Greiner wrote:
Why would you expect deprecated %python_install or %pyproject_install do that? %python_clone is standard and added by py2pack automatically. It's not optional for flavored commands.
I created the spec file for nautikos with py2pack, it threw an error due to poetry-dependencies, but it generated the spec. But there was no %python_clone in there. That's why I am asking... Kind Regards Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
Am 09.10.23 um 10:09 schrieb Johannes Kastl:
On 09.10.23 at 10:04 Ben Greiner wrote:
Why would you expect deprecated %python_install or %pyproject_install do that? %python_clone is standard and added by py2pack automatically. It's not optional for flavored commands.
I created the spec file for nautikos with py2pack, it threw an error due to poetry-dependencies, but it generated the spec. But there was no %python_clone in there.
Ah, poetry. Yes poetry is not fully supported by py2pack. [ben@skylab:~/tmp]% py2pack fetch nautikos [0] downloading package nautikos-0.3.4... from https://files.pythonhosted.org/packages/source/n/nautikos/nautikos-0.3.4.tar... [ben@skylab:~/tmp]% py2pack generate -f python-nautikos.spec nautikos [0] generating spec file for nautikos... /home/ben/src/py2pack/py2pack/__init__.py:144: UserWarning: The package defines its dependencies in the [tool.poetry.dependencies] table of pyproject.toml. Automatic parsing of the poetry format is n ot implemented yet. You must add the requirements manually. warnings.warn("The package defines its dependencies in the " Probably should add the same warning about [tool.poetry.scripts]. Or implement it. Probably easier than implementing the poetry dependency specifications.
That's why I am asking...
Kind Regards Johannes
Am 09.10.23 um 10:17 schrieb Ben Greiner:
Am 09.10.23 um 10:09 schrieb Johannes Kastl:
On 09.10.23 at 10:04 Ben Greiner wrote:
Why would you expect deprecated %python_install or %pyproject_install do that? %python_clone is standard and added by py2pack automatically. It's not optional for flavored commands.
I created the spec file for nautikos with py2pack, it threw an error due to poetry-dependencies, but it generated the spec. But there was no %python_clone in there.
Ah, poetry. Yes poetry is not fully supported by py2pack.
[ben@skylab:~/tmp]% py2pack fetch nautikos [0]
downloading package nautikos-0.3.4... from https://files.pythonhosted.org/packages/source/n/nautikos/nautikos-0.3.4.tar... [ben@skylab:~/tmp]% py2pack generate -f python-nautikos.spec nautikos [0]
generating spec file for nautikos... /home/ben/src/py2pack/py2pack/__init__.py:144: UserWarning: The package defines its dependencies in the [tool.poetry.dependencies] table of pyproject.toml. Automatic parsing of the poetry format is n ot implemented yet. You must add the requirements manually. warnings.warn("The package defines its dependencies in the "
Probably should add the same warning about [tool.poetry.scripts]. Or implement it. Probably easier than implementing the poetry dependency specifications.
There is already a PR about it: https://github.com/openSUSE/py2pack/pull/178 triggered by an earlier issue you reported.
participants (2)
-
Ben Greiner
-
Johannes Kastl