Hi Jan,
now, that %py3_incdir is gone for Factory, how are packages like python3- persistent supposed to be build?
persistent wants to install its header files in a python version specific include location, where the C parts of Btrees picks them up later on...
except from python3-persistent.spec:
%files devel %defattr(-,root,root,-) %if 0%{?suse_version} < 1230 %{_includedir} %else %dir /%py3_incdir/persistent /%py3_incdir/persistent/*.h %endif %python3_sitearch/persistent/*.h
Build log: https://build.opensuse.org/package/live_build_log/devel:languages:python3/py...
Cheers, Pete
hello,
On 27.2.2017 01:01, Hans-Peter Jansen wrote:
Hi Jan,
now, that %py3_incdir is gone for Factory, how are packages like python3- persistent supposed to be build?
if you only need %py3_incdir for filelist, simply use a wildcard:
%dir %{_includedir}/python%{python_version}*/persistent %{_includedir}/python%{python_version}*/persistent/*.h
in your case, %python3_version. %python_version would be right for singlespec.
If you need the include dir for a script (e.g. as an argument to %configure), use python sysconfig to retrieve it:
py3_incdir=`python3 -c "import sysconfig as s; print(s.get_path('include'))"`
./configure --pyincdir=$py3_incdir
Come to think about it, this particular thing would be great to have as a macro! %{python_sysconfig_var INCLUDEPY} %{python_sysconfig_path include} I'll look into adding this to the next version of python-rpm-macros.
regards m.
%endif %python3_sitearch/persistent/*.h
Build log: https://build.opensuse.org/package/live_build_log/devel:languages:python3/py...
Cheers, Pete