@@ -279,7 +279,7 @@ sh autogen.sh
279
279
280
280
make %{_smp_mflags}
281
281
.if python_cffi ?= 1
282
- %if %{with python_cffi}
282
+ %if %{with python_cffi} || %{with python3_cffi}
283
283
# Problem: we need pkg-config points to built and not yet installed copy of $(project.name)
284
284
# Solution: chicken-egg problem - let's make "fake" pkg-config file
285
285
sed -e "s@^libdir.*@libdir=.libs/@" \\
@@ -290,20 +290,11 @@ cd bindings/python_cffi
290
290
ln -sfr ../../include/ .
291
291
ln -sfr ../../src/.libs/ .
292
292
export PKG_CONFIG_PATH=`pwd`
293
+ %endif
294
+ %if %{with python_cffi}
293
295
python2 setup.py build
294
296
%endif
295
-
296
297
%if %{with python3_cffi}
297
- # Problem: we need pkg-config points to built and not yet installed copy of $(project.name)
298
- # Solution: chicken-egg problem - let's make "fake" pkg-config file
299
- sed -e "s@^libdir.*@libdir=.libs/@" \\
300
- -e "s@^includedir.*@includedir=include/@" \\
301
- src/$(project.libname).pc > bindings/python_cffi/$(project.libname).pc
302
- cd bindings/python_cffi
303
- # This avoids problem with "weird" character quoting between shell and python3
304
- ln -sfr ../../include/ .
305
- ln -sfr ../../src/.libs/ .
306
- export PKG_CONFIG_PATH=`pwd`
307
298
python3 setup.py build
308
299
%endif
309
300
.endif
@@ -316,17 +307,17 @@ find %{buildroot} -name '*.a' | xargs rm -f
316
307
find %{buildroot} -name '*.la' | xargs rm -f
317
308
318
309
.if python_cffi ?= 1
319
- %if %{with python_cffi}
310
+ %if %{with python_cffi} || %{with python3_cffi}
320
311
cd bindings/python_cffi
321
312
export PKG_CONFIG_PATH=`pwd`
313
+ %endif
314
+ %if %{with python_cffi}
322
315
python2 setup.py install --root=%{buildroot} --skip-build --prefix %{_prefix}
323
316
%endif
324
-
325
317
%if %{with python3_cffi}
326
- cd bindings/python_cffi
327
- export PKG_CONFIG_PATH=`pwd`
328
318
python3 setup.py install --root=%{buildroot} --skip-build --prefix %{_prefix}
329
319
%endif
320
+
330
321
.endif
331
322
.if has_main | project.has_bin
332
323
%files
0 commit comments