kumquat-buildroot/package/python-psycopg2/python-psycopg2.mk
James Hilliard 8937db8dd5 package/pkg-python.mk: migrate setuptools to pep517
Now that setuptools and its dependencies are using pep517 we can
migrate the setuptools infrastructure itself to use the pep517
build frontend.

As part of this we need to migrate the all python packages using
_BUILD_OPTS to the new config settings format used by the pep517
build frontend.

We need to use a setup.cfg file to pass the pg_config path when
building python-psycopg2 as this package needs the pg_config
path for all internal build stages while -C--build-option= only
passes the flag to the internal bdist_wheel stage.

Use new setup type variables to define setup type specific
dependencies instead of using the conditional block.

In python-m2crypto, the --openssl option is a build_ext option
so we need to add -C--build-option build_ext in front of it.

We also need to set --skip-dependency-check for the following
packages which specify build dependencies that are not actually
required:
 - python-lxml
 - python-matplotlib
 - python-msgpack
 - python-pymupdf
 - python-uvloop
 - python-wsaccel

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>
[Arnout: fix indentation in python-pyzmq]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-04-01 22:12:57 +02:00

23 lines
923 B
Makefile

################################################################################
#
# python-psycopg2
#
################################################################################
PYTHON_PSYCOPG2_VERSION = 2.9.9
PYTHON_PSYCOPG2_SOURCE = psycopg2-$(PYTHON_PSYCOPG2_VERSION).tar.gz
PYTHON_PSYCOPG2_SITE = https://files.pythonhosted.org/packages/c9/5e/dc6acaf46d78979d6b03458b7a1618a68e152a6776fce95daac5e0f0301b
PYTHON_PSYCOPG2_SETUP_TYPE = setuptools
PYTHON_PSYCOPG2_LICENSE = LGPL-3.0+
PYTHON_PSYCOPG2_LICENSE_FILES = LICENSE
PYTHON_PSYCOPG2_DEPENDENCIES = postgresql
# Force psycopg2 to use the Buildroot provided postgresql version
# instead of the one from the host machine
define PYTHON_PSYCOPG2_CREATE_SETUP_CFG
printf "[build_ext]\ndefine=\npg_config=$(STAGING_DIR)/usr/bin/pg_config\n" > $(@D)/setup.cfg
endef
PYTHON_PSYCOPG2_PRE_CONFIGURE_HOOKS += PYTHON_PSYCOPG2_CREATE_SETUP_CFG
$(eval $(python-package))