Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Scott Fan <fancp2007@gmail.com>
Cc: buildroot@buildroot.org,
	James Hilliard <james.hilliard1@gmail.com>,
	Asaf Kahlon <asafka7@gmail.com>
Subject: Re: [Buildroot] [PATCH v3] package/python-pgcopy: new package
Date: Tue, 29 Oct 2024 19:50:16 +0100	[thread overview]
Message-ID: <20241029195016.27fc140d@windsurf> (raw)
In-Reply-To: <20241029054713.786223-1-fancp2007@gmail.com>

Hello Scott,

Thanks for this new iteration! Some small comments/questions below.

James: if you could review, if would be very helpful. Thanks!

On Tue, 29 Oct 2024 13:47:11 +0800
Scott Fan <fancp2007@gmail.com> wrote:

>  package/Config.in                        |  1 +
>  package/python-pgcopy/Config.in          | 18 ++++++++++++++++
>  package/python-pgcopy/python-pgcopy.hash |  5 +++++
>  package/python-pgcopy/python-pgcopy.mk   | 27 ++++++++++++++++++++++++
>  4 files changed, 51 insertions(+)

An entry in the DEVELOPERS file should be added.


> diff --git a/package/python-pgcopy/Config.in b/package/python-pgcopy/Config.in
> new file mode 100644
> index 0000000000..b5bde7c3b0
> --- /dev/null
> +++ b/package/python-pgcopy/Config.in
> @@ -0,0 +1,18 @@
> +config BR2_PACKAGE_PYTHON_PGCOPY
> +	bool "python-pgcopy"
> +	depends on BR2_USE_WCHAR # postgresql
> +	depends on !BR2_OPTIMIZE_FAST # postgresql

You also need BR2_USE_MMU from postgresql, and !BR2_STATIC_LIBS from
postgresql.


> diff --git a/package/python-pgcopy/python-pgcopy.mk b/package/python-pgcopy/python-pgcopy.mk
> new file mode 100644
> index 0000000000..09fd7ea584
> --- /dev/null
> +++ b/package/python-pgcopy/python-pgcopy.mk
> @@ -0,0 +1,27 @@
> +################################################################################
> +#
> +# python-pgcopy
> +#
> +################################################################################
> +
> +PYTHON_PGCOPY_VERSION = 1.6.0
> +PYTHON_PGCOPY_SOURCE = pgcopy-$(PYTHON_PGCOPY_VERSION).tar.gz
> +PYTHON_PGCOPY_SITE = https://files.pythonhosted.org/packages/b0/7d/a5c833f921b20cdb1e8538e72a6065bcc67bbb270fa7a35e98f2d397ce0c
> +PYTHON_PGCOPY_SETUP_TYPE = setuptools
> +PYTHON_PGCOPY_LICENSE = MIT
> +PYTHON_PGCOPY_LICENSE_FILES = LICENSE.txt
> +PYTHON_PGCOPY_DEPENDENCIES = postgresql python-psycopg2 python-pytz

Are you sure python-psycopg2 and python-pytz are build-time
dependencies? I.e are they needed during the build, or only at runtime?

> +define PYTHON_PGCOPY_CLEAN_PY2_SCRIPT
> +	$(RM) $(@D)/pgcopy/errors/py2.py
> +endef
> +PYTHON_PGCOPY_POST_EXTRACT_HOOKS += PYTHON_PGCOPY_CLEAN_PY2_SCRIPT

What is this hook needed? A small comment would be useful.

> +
> +# Force pgcopy to use the Buildroot provided postgresql version
> +# instead of the one from the host machine
> +define PYTHON_PGCOPY_CREATE_SETUP_CFG
> +	printf "[build_ext]\ndefine=\npg_config=$(STAGING_DIR)/usr/bin/pg_config\n" > $(@D)/setup.cfg
> +endef
> +PYTHON_PGCOPY_PRE_CONFIGURE_HOOKS += PYTHON_PGCOPY_CREATE_SETUP_CFG
> +
> +$(eval $(python-package))

Otherwise, sounds reasonable to me.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-10-29 18:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14  1:40 [Buildroot] [PATCH] package/python-pgcopy: new package Scott Fan
2024-10-24  0:28 ` [Buildroot] [PATCH v2] " Scott Fan
2024-10-29  5:47   ` [Buildroot] [PATCH v3] " Scott Fan
2024-10-29 18:50     ` Thomas Petazzoni via buildroot [this message]
2024-10-30 13:28       ` Scott Fan
2024-10-30 13:35         ` Thomas Petazzoni via buildroot
2024-10-30 13:43     ` [Buildroot] [PATCH v4] " Scott Fan
2024-10-30 14:59       ` [Buildroot] [PATCH v5 1/2] package/python-psycopg2: add config dependencies from postgresql Scott Fan
2024-10-30 14:59         ` [Buildroot] [PATCH v5 2/2] package/python-pgcopy: new package Scott Fan
2024-10-30 15:11         ` [Buildroot] [PATCH v2] package/python-psycopg2: add config dependencies from postgresql Scott Fan
2024-12-04 20:12           ` Arnout Vandecappelle via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241029195016.27fc140d@windsurf \
    --to=buildroot@buildroot.org \
    --cc=asafka7@gmail.com \
    --cc=fancp2007@gmail.com \
    --cc=james.hilliard1@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox