[opensuse-packaging] Python macros
Hello List, I'm just trying to put together a package containing python code. https://en.opensuse.org/openSUSE:Packaging_Python says I can use %{python_sitearch} (except for very old Suse releases), but when I build for tumbleweed, that just expands to the empty string. I have BuildRequires: python-rpm-macros and rpm --showrc spews out pages including -13: python_sitearch %{_python_sysconfig_path %python_flavor platlib} What am I missing? Thanks, A. -- Ansgar Esztermann Sysadmin http://www.mpibpc.mpg.de/grubmueller/esztermann
For which distro does this happen? Link to specfile? On 10/1/18 4:13 PM, Ansgar Esztermann-Kirchner wrote:
Hello List,
I'm just trying to put together a package containing python code. https://en.opensuse.org/openSUSE:Packaging_Python says I can use %{python_sitearch} (except for very old Suse releases), but when I build for tumbleweed, that just expands to the empty string. I have BuildRequires: python-rpm-macros and rpm --showrc spews out pages including -13: python_sitearch %{_python_sysconfig_path %python_flavor platlib}
What am I missing?
Thanks,
A.
-- python programming - mail server - photo - video - https://sebix.at cryptographic key at https://sebix.at/DC9B463B.asc and on public keyservers
On Mon, Oct 01, 2018 at 06:53:13PM +0200, Sebastian wrote:
For which distro does this happen?
Tumbleweed. The host system hopefully does not play into this, but anyway it's Leap 15.0.
Link to specfile?
https://build.opensuse.org/package/view_file/home:aeszter:branches:home:cows... A. -- Ansgar Esztermann Sysadmin http://www.mpibpc.mpg.de/grubmueller/esztermann
Okay, I found the reason. It is not related to the distro AFAIK.
osc chroot rpmspec -E '%{python3_sitearch}' /usr/lib64/python3.6/site-packages rpmspec -E '%{python2_sitearch}' sh: python2: command not found rpmspec -E '%{python_sitearch}' sh: python2: command not found
As you can see, the python version needs to be installed, if you want to query it's sitearch directory. Add a BuildRequires for python if you need python_sitearch. Sebastian On 02/10/2018 11.09, Ansgar Esztermann-Kirchner wrote:
On Mon, Oct 01, 2018 at 06:53:13PM +0200, Sebastian wrote:
For which distro does this happen? Tumbleweed. The host system hopefully does not play into this, but anyway it's Leap 15.0.
Link to specfile? https://build.opensuse.org/package/view_file/home:aeszter:branches:home:cows...
A.
participants (2)
-
Ansgar Esztermann-Kirchner
-
Sebastian