Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
debian/rules: Fix invalid sed expression syntax to calculate PYTHON_L…
…IBRARY

debian/rules contains sed invocation for calculation of PYTHON_LIBRARY
path. At debian sid, sed fails here with message:

  sed: -e expression #1, char 11: unknown option to `s'

This causes by invalid escaping of '#' symbol in sed expression
(expression is defined in quotes, not in double-quotes):

PYTHON_LIBRARY=$(shell python3-config --ldflags --embed | sed -e 's\#-L\(.*\) -L/usr/lib -l\([^ ]*\) .*$$\#\1/lib\2.so\#')

Removing of escape symbols before '#' fixes this. Maybe this solution should be
checked with older versions of 'make'.
  • Loading branch information
jekhor authored and nyalldawson committed Jun 10, 2020
1 parent dcd017a commit 28e02f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions debian/rules
Expand Up @@ -74,9 +74,9 @@ TESTMAKE=ninja $(NINJA_OPTS)
endif

ifeq (,$(findstring $(DISTRIBUTION),"focal sid"))
PYTHON_LIBRARY=$(shell python3-config --ldflags | sed -e 's\#-L\(.*\) -L/usr/lib -l\([^ ]*\) .*$$\#\1/lib\2.so\#')
PYTHON_LIBRARY=$(shell python3-config --ldflags | sed -e 's#-L\(.*\) -L/usr/lib -l\([^ ]*\) .*$$#\1/lib\2.so#')
else
PYTHON_LIBRARY=$(shell python3-config --ldflags --embed | sed -e 's\#-L\(.*\) -L/usr/lib -l\([^ ]*\) .*$$\#\1/lib\2.so\#')
PYTHON_LIBRARY=$(shell python3-config --ldflags --embed | sed -e 's#-L\(.*\) -L/usr/lib -l\([^ ]*\) .*$$#\1/lib\2.so#')
endif

CMAKE_OPTS := \
Expand Down

0 comments on commit 28e02f8

Please sign in to comment.