Closed bnavigator closed 3 years ago
Wrong %python3_site(arch|lib)
https://github.com/openSUSE/python-rpm-macros/pull/64#issuecomment-715373348
Python subpackages of other packages (see also #15, #73, #75, #76)
BuildRequire
the right packages and package the results :grinning:!With #79, most of these packages need another iteration.
%python_expand
macro (#64) does not like to substitute "$python"
with the executable because of the "
. --> #67%python3_only
and %ifpython3
BuildRequires: python3-foo
where it is not enough to have one by the default provider (#69) but you need it for the specific flavor
%python_exec is broken with multiple python3 flavours #72
Wrong shebang replacement
@mcepl, how do we deal with this one? The fix will require the new $python expansion, so I cannot just submit it to d:l:p when python-rpm-macros is stuck in Staging:N
@mcepl inline reply: For now a private definition of the macro in the package itself, possibly conditional, i.e. something like:
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
We can always remove it later.
Edit: Could you please post a separate reply rather than editing my post?
Conflicting files outside of %python_site(lib|arch)
%python_subpackages
without proper %files
headers) -- sr#853407 --> sr#853598Conflicting files outside of
%python_site(lib|arch)
* [ ] [python-tqdm](https://build.opensuse.org/package/show/openSUSE:Factory:Staging:N/python-tqdm)
I think this clearly calls for alternatives, however (and I guess Sphinx as well).
Why not just split bash completion file into subpkg, that would be the most proper solution.
I found a way that works with the old and new python_expand: sr#845689
I found a way that works with the old and new python_expand: sr#845689
??? This is not python-tqdm. ???
No it is psutil. Granted the history of https://github.com/openSUSE/python-rpm-macros/issues/66#issuecomment-721016747 makes it confusing :)
tqdm is in the making.
python-tqdm-bash-completion: Approach for the Supplements:
tag in sr#845737 is a bit hacky. Maybe we need to enhance %python_module
or create a new macro for this kind of rich dependency specification.
(and I guess Sphinx as well).
python-Sphinx is a case of #5.
duplicate files found by %find_lang
.. only tick off when the fix has landed in Staging:N
Duh, the new python-sip had a wrong files section header.
importlib_metadata is missing. Python38 provides the stdlib importlib.metadata, but python36 does need the extra package which is already provided in SLE and Leap.
After providing python36-importlib-metadata, pytest is usable. Some pytest runs in my branched staging:N failed because they found tests in _build.python36
--> #78
Additional provides of python3-othername is not enough:
Incorrect expansion of $python
in %python_expand
%pyqt_install_examples
macro. -- sr#850603Incorrect expansion of
$python
in%python_expand
Could you please elaborate on what’s wrong? Is the linked SR trying to fix the problem or is it a reproducer?
Incorrect expansion of
$python
in%python_expand
Could you please elaborate on what’s wrong? Is the linked SR trying to fix the problem or is it a reproducer?
It is trying to fix the problem. Without it %configure PYTHON="/usr/bin/$python"
expands to /usr/bin/usr/bin/python3.8
It is trying to fix the problem. Without it
%configure PYTHON="/usr/bin/$python"
expands to/usr/bin/usr/bin/python3.8
And how many Spec files sets $PYTHON
? Wouldn’t it be easier just to change them to %configure PYTHON="$python"
and be done with it? I see two: python-dbus-python
and gtk-doc
.
IIRC I did not test it. But my assumption was that there is a reason the variable for %configure
needs to specify the absolute filepath. Until the update for python-rpm-macros will make it out of Staging:N, $python
is replaced to python3
without the bindir. $(which $python)
will always return the correct absolute path, before and after the update.
IIRC I did not test it. But my assumption was that there is a reason the variable for
%configure
needs to specify the absolute filepath. Until the update for python-rpm-macros will make it out of Staging:N,$python
is replaced topython3
without the bindir.$(which $python)
will always return the correct absolute path, before and after the update.
I see $PYTHON
used only in contexts like `PYTHON_SITE_PKG=
$PYTHON -c "import distutils.sysconfig; print (distutils.sysconfig.get_python_lib(0,0));"``` and then full path to the binary should work just fine.
full path or basename depending on correct $PATH?
I see two:
python-dbus-python
andgtk-doc
.
gtk-doc
does not use %python_expand
. No problem there.
With %configure PYTHON="$python"
:
[ 32s] + ../configure --host=x86_64-suse-linux-gnu --build=x86_64-suse-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking PYTHON=python3
...
[ 36s] checking for python... no
[ 36s] configure: error: Cannot find python in your system path
[ 36s] error: Bad exit status from /var/tmp/rpm-tmp.wWaBES (%build)
[ 36s]
OK, so you are right. Just why to both set up the environmental variable $PYTHON
and do it once more on %configure
command line?
I don't know. It was introduced here: https://build.opensuse.org/request/show/620627. @scarabeusiv maybe just forgot to remove the export?
python-dbus-python SR updated: https://build.opensuse.org/request/show/850243
python-dbus-python SR updated: https://build.opensuse.org/request/show/850243
Oh, damn. I cannot approve that submit request.
Let's see if a maintainer from the Base:System project is willing to. This is not urgent.
Let's see if a maintainer from the Base:System project is willing to. This is not urgent.
Well, not urgent, but not whatever … Staging:N won’t be let through without it.
Yeah but there will be enough other packages to fix until this is the last blocker. I don't see it being let through anytime soon.
pytest called without macro and thus importing from non-ignored _build directory with wrong flavor
Requires python > 3.6
replace %py3_compile
with python_compileall
missing %python_expand
%python_exec .. $python/
did not expand correctly (/ not added in #67), but a version bump made the whole construct obsolete anyway-- sr#852787 --> sr#852844Failures in python 3.6 build
Use of python3 flavor
Fix by update or removal of unnecessary BuildRequirements
Requires python > 3.6
Missing dependency to libsqlite now:
I am working on this, but it is BS … nobody should ever need pysqlite2
ever (when sqlite3
is in the standard library). I will need to investigate it more on Monday. -- @mcepl
This is intended as a tracker issue for the introduction of multiple python3 flavors and better reference in changelogs. The python-rpm-macros package with enabled flavors of python36 and python38 is in Staging:N and as expected various packages fail.