mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 00:31:56 -06:00
Check for Python.h during build of py_default_encoding extension
For rare cases when Python development package is not installed, check that Python.h is available and bail out if not. Fixes: https://fedorahosted.org/freeipa/ticket/1838
This commit is contained in:
parent
151001ac48
commit
ebdc752b66
@ -18,6 +18,13 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from distutils.core import setup, Extension
|
||||
from distutils.sysconfig import get_python_inc
|
||||
import sys
|
||||
import os
|
||||
|
||||
python_header = os.path.join(get_python_inc(plat_specific=1), 'Python.h')
|
||||
if not os.path.exists(python_header):
|
||||
sys.exit("Cannot find Python development packages that provide Python.h")
|
||||
|
||||
default_encoding_utf8 = Extension('default_encoding_utf8', ['default_encoding_utf8.c'])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user