package/python-pgcopy: new package
PATCH 1/1 package/python-pgcopy: new package
--- package/python-pgcopy/Config.in | 17 +++++++++++++++ package/python-pgcopy/python-pgcopy.hash | 5 +++++ package/python-pgcopy/python-pgcopy.mk | 27 ++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 package/python-pgcopy/Config.in create mode 100644 package/python-pgcopy/python-pgcopy.hash create mode 100644 package/python-pgcopy/python-pgcopy.mk
package/python-pgcopy/Config.in new file +17 -0
@@ -0,0 +1,17 @@ +config BR2_PACKAGE_PYTHON_PGCOPY + bool "python-pgcopy" + depends on BR2_USE_WCHAR # postgresql + depends on !BR2_OPTIMIZE_FAST # postgresql + select BR2_PACKAGE_POSTGRESQL + select BR2_PACKAGE_PYTHON_PSYCOPG2 + select BR2_PACKAGE_PYTHON_PYTZ + help + Use pgcopy for fast data loading into PostgreSQL with binary copy. + + https://github.com/altaurog/pgcopy + +comment "python-pgcopy needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + +comment "python-pgcopy can't be built with Optimize for fast" + depends on BR2_OPTIMIZE_FAST
package/python-pgcopy/python-pgcopy.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/pgcopy/json +md5 bb7940ed821f54f32705c462f7582458 pgcopy-1.6.0.tar.gz +sha256 0da9235eea4ee9ceb4f52b97523bc89db9a6f8e80f897b49214e814ea13d04b0 pgcopy-1.6.0.tar.gz +# Locally computed sha256 checksums +sha256 969191428cb0729e689468bdcd152291a4e168875755c97745cd2df6de5520c1 LICENSE.txt
package/python-pgcopy/python-pgcopy.mk new file +27 -0
@@ -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 + +define PYTHON_PGCOPY_CLEAN_PY2_SCRIPT + $(RM) $(@D)/pgcopy/errors/py2.py +endef +PYTHON_PGCOPY_POST_EXTRACT_HOOKS += PYTHON_PGCOPY_CLEAN_PY2_SCRIPT + +# 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))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 1/1 package/python-pgcopy: new package
---
Changes v1 -> v2:
- add missing config menu entry in Config.in
--- package/Config.in | 1 + package/python-pgcopy/Config.in | 17 +++++++++++++++ package/python-pgcopy/python-pgcopy.hash | 5 +++++ package/python-pgcopy/python-pgcopy.mk | 27 ++++++++++++++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 package/python-pgcopy/Config.in create mode 100644 package/python-pgcopy/python-pgcopy.hash create mode 100644 package/python-pgcopy/python-pgcopy.mk
package/Config.in +1 -0
@@ -1254,6 +1254,7 @@ menu "External python modules" source "package/python-pathvalidate/Config.in" source "package/python-periphery/Config.in" source "package/python-pexpect/Config.in" + source "package/python-pgcopy/Config.in" source "package/python-pickleshare/Config.in" source "package/python-piexif/Config.in" source "package/python-pigpio/Config.in"
package/python-pgcopy/Config.in new file +17 -0
@@ -0,0 +1,17 @@ +config BR2_PACKAGE_PYTHON_PGCOPY + bool "python-pgcopy" + depends on BR2_USE_WCHAR # postgresql + depends on !BR2_OPTIMIZE_FAST # postgresql + select BR2_PACKAGE_POSTGRESQL + select BR2_PACKAGE_PYTHON_PSYCOPG2 + select BR2_PACKAGE_PYTHON_PYTZ + help + Use pgcopy for fast data loading into PostgreSQL with binary copy. + + https://github.com/altaurog/pgcopy + +comment "python-pgcopy needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + +comment "python-pgcopy can't be built with Optimize for fast" + depends on BR2_OPTIMIZE_FAST
package/python-pgcopy/python-pgcopy.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/pgcopy/json +md5 bb7940ed821f54f32705c462f7582458 pgcopy-1.6.0.tar.gz +sha256 0da9235eea4ee9ceb4f52b97523bc89db9a6f8e80f897b49214e814ea13d04b0 pgcopy-1.6.0.tar.gz +# Locally computed sha256 checksums +sha256 969191428cb0729e689468bdcd152291a4e168875755c97745cd2df6de5520c1 LICENSE.txt
package/python-pgcopy/python-pgcopy.mk new file +27 -0
@@ -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 + +define PYTHON_PGCOPY_CLEAN_PY2_SCRIPT + $(RM) $(@D)/pgcopy/errors/py2.py +endef +PYTHON_PGCOPY_POST_EXTRACT_HOOKS += PYTHON_PGCOPY_CLEAN_PY2_SCRIPT + +# 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))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v3 1/1 package/python-pgcopy: new package
---
Changes v1 -> v2:
- add missing config menu entry in Config.in
Changes v2 -> v3:
- fix help text indent in Config.in
--- 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(+) create mode 100644 package/python-pgcopy/Config.in create mode 100644 package/python-pgcopy/python-pgcopy.hash create mode 100644 package/python-pgcopy/python-pgcopy.mk
package/Config.in +1 -0
@@ -1258,6 +1258,7 @@ menu "External python modules" source "package/python-pathvalidate/Config.in" source "package/python-periphery/Config.in" source "package/python-pexpect/Config.in" + source "package/python-pgcopy/Config.in" source "package/python-pickleshare/Config.in" source "package/python-piexif/Config.in" source "package/python-pigpio/Config.in"
package/python-pgcopy/Config.in new file +18 -0
@@ -0,0 +1,18 @@ +config BR2_PACKAGE_PYTHON_PGCOPY + bool "python-pgcopy" + depends on BR2_USE_WCHAR # postgresql + depends on !BR2_OPTIMIZE_FAST # postgresql + select BR2_PACKAGE_POSTGRESQL + select BR2_PACKAGE_PYTHON_PSYCOPG2 + select BR2_PACKAGE_PYTHON_PYTZ + help + Use pgcopy for fast data loading into PostgreSQL with + binary copy. + + https://github.com/altaurog/pgcopy + +comment "python-pgcopy needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + +comment "python-pgcopy can't be built with Optimize for fast" + depends on BR2_OPTIMIZE_FAST
package/python-pgcopy/python-pgcopy.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/pgcopy/json +md5 bb7940ed821f54f32705c462f7582458 pgcopy-1.6.0.tar.gz +sha256 0da9235eea4ee9ceb4f52b97523bc89db9a6f8e80f897b49214e814ea13d04b0 pgcopy-1.6.0.tar.gz +# Locally computed sha256 checksums +sha256 969191428cb0729e689468bdcd152291a4e168875755c97745cd2df6de5520c1 LICENSE.txt
package/python-pgcopy/python-pgcopy.mk new file +27 -0
@@ -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 + +define PYTHON_PGCOPY_CLEAN_PY2_SCRIPT + $(RM) $(@D)/pgcopy/errors/py2.py +endef +PYTHON_PGCOPY_POST_EXTRACT_HOOKS += PYTHON_PGCOPY_CLEAN_PY2_SCRIPT + +# 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))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Scott,
Thanks for this new iteration! Some small comments/questions below.
James: if you could review, if would be very helpful. Thanks!
Quoted 5 lines · On Tue, 29 Oct 2024 13:47:11 +0800 Scott Fan <[email protected]> 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.
package/python-pgcopy/Config.in line 4
Quoted 10 lines
package/python-pgcopy/Config.in new file +4
-0@@ -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.
Quoted 9 lines
package/python-pgcopy/python-pgcopy.mk new file +3
-0@@ -0,0 +1,27 @@ +################################################################################ +# +# python-pgcopy
package/python-pgcopy/python-pgcopy.mk line 13
Quoted 10 lines
package/python-pgcopy/python-pgcopy.mk new file +10
-0+# +################################################################################ + +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?
package/python-pgcopy/python-pgcopy.mk line 18
Quoted 4 lines
package/python-pgcopy/python-pgcopy.mk new file +4
-0+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.
package/python-pgcopy/python-pgcopy.mk line 27
Quoted 9 lines
package/python-pgcopy/python-pgcopy.mk new file +9
-0+ +# 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
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Thomas,
Thanks for your review.
Quoted 10 lines · Thomas Petazzoni
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 <[email protected]> wrote:
Quoted 7 lines
Quoted 5 lines
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.
I'll add one entry for me later.
Quoted 15 lines
package/python-pgcopy/Config.in line 4
Quoted 12 lines
package/python-pgcopy/Config.in new file +4
-0@@ -0,0 +1,18 @@ +config BR2_PACKAGE_PYTHON_PGCOPY + bool "python-pgcopy" + depends on BR2_USE_WCHAR # postgresql + depends on !BR2_OPTIMIZE_FAST # postgresqlYou also need
BR2_USE_MMUfrom postgresql, and !BR2_STATIC_LIBS from postgresql.
I'll fix it later. Thanks for your reminder.
Quoted 16 lines
Quoted 16 lines
package/python-pgcopy/python-pgcopy.mk new file +8
-0@@ -0,0 +1,27 @@ +################################################################################ +# +# python-pgcopy +# +################################################################################ + +PYTHON_PGCOPY_VERSION = 1.6.0 +PYTHON_PGCOPY_SOURCE = pgcopy-$(PYTHON_PGCOPY_VERSION).tar.gz
Quoted 8 lines
package/python-pgcopy/python-pgcopy.mk line 13
Quoted 5 lines
package/python-pgcopy/python-pgcopy.mk new file +5
-0+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-pytzAre you sure python-psycopg2 and python-pytz are build-time dependencies? I.e are they needed during the build, or only at runtime?
In pgcopy's setup.py file, has the next line:
install_requires=["psycopg2", "pytz"]
So I understand, those are build-time dependencies. Meanwhile, the psycopg2 module depends on postgres. Do I need to remove postgres dependency from this package?
Quoted 7 lines
package/python-pgcopy/python-pgcopy.mk line 18
Quoted 5 lines
package/python-pgcopy/python-pgcopy.mk new file +4
-0+define PYTHON_PGCOPY_CLEAN_PY2_SCRIPT + $(RM) $(@D)/pgcopy/errors/py2.py +endef +PYTHON_PGCOPY_POST_EXTRACT_HOOKS += PYTHON_PGCOPY_CLEAN_PY2_SCRIPTWhat is this hook needed? A small comment would be useful.
The py2.py file is just for Python 2, it will cause compilation errors in Buildroot:
File "/usr/lib/python3.12/site-packages/pgcopy/errors/py2.py", line 19
raise newexc, None, sys.exc_info()[2]
^
SyntaxError: invalid syntax
I'll add a comment before the hook definition.
Quoted 8 lines
package/python-pgcopy/python-pgcopy.mk line 25
Quoted 8 lines
package/python-pgcopy/python-pgcopy.mk new file +7
-0+ +# 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
This hook will be removed, i copied it from package/python-psycopg2, It is redundant.
Quoted 4 lines
package/python-pgcopy/python-pgcopy.mk line 26
Quoted 2 lines
package/python-pgcopy/python-pgcopy.mk new file +2
-0+ +$(eval $(python-package))Otherwise, sounds reasonable to me.
Scott Fan
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Scott,
James: question for you below.
Quoted 7 lines · On Wed, 30 Oct 2024 21:28:24 +0800 Scott Fan <[email protected]> wrote:
Quoted 2 lines
Are you sure python-psycopg2 and python-pytz are build-time dependencies? I.e are they needed during the build, or only at runtime?
In pgcopy's
setup.pyfile, has the next line:
install_requires=["psycopg2", "pytz"]So I understand, those are build-time dependencies.
I'll let James comment on this, but I believe install_requires are run-time dependencies, not build-time dependencies.
Quoted 2 lines
Meanwhile, the psycopg2 module depends on postgres. Do I need to remove postgres dependency from this package?
If you select BR2_PACKAGE_PYTHON_PSYCOPG2, it will automatically select BR2_PACKAGE_POSTGRESQL.
Now whether you need postgresql as a build-time dependency or not depends on whether your package is building native code that links against Postgresql libraries.
Quoted 10 lines
Quoted 1 line
What is this hook needed? A small comment would be useful.
The
py2.pyfile is just for Python 2, it will cause compilation errors in Buildroot:
File "/usr/lib/python3.12/site-packages/pgcopy/errors/py2.py", line 19
raise newexc, None, sys.exc_info()[2]
^
SyntaxError: invalid syntaxI'll add a comment before the hook definition.
Yes, good.
Quoted 2 lines
This hook will be removed, i copied it from package/python-psycopg2, It is redundant.
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v4 1/1 package/python-pgcopy: new package
In reply to Scott Fan---
Changes v1 -> v2:
- add missing config menu entry in Config.in
Changes v2 -> v3:
- fix help text indent in Config.in
Changes v3 -> v4:
- add missing dependencies in the Config.in file
- add a comment for the hook PYTHON_PGCOPY_CLEAN_PY2_SCRIPT
- remove the pre configure hook PYTHON_PGCOPY_CREATE_SETUP_CFG
--- DEVELOPERS | 3 +++ package/Config.in | 1 + package/python-pgcopy/Config.in | 21 +++++++++++++++++++++ package/python-pgcopy/python-pgcopy.hash | 5 +++++ package/python-pgcopy/python-pgcopy.mk | 21 +++++++++++++++++++++ 5 files changed, 51 insertions(+) create mode 100644 package/python-pgcopy/Config.in create mode 100644 package/python-pgcopy/python-pgcopy.hash create mode 100644 package/python-pgcopy/python-pgcopy.mk
DEVELOPERS +3 -0
@@ -2923,6 +2923,9 @@ F: package/lrzip/ N: Sam Voss <[email protected]> F: package/ripgrep/ +N: Scott Fan <[email protected]> +F: package/python-pgcopy/ + N: Sébastien Szymanski <[email protected]> F: board/armadeus/ F: configs/armadeus*
package/Config.in +1 -0
@@ -1259,6 +1259,7 @@ menu "External python modules" source "package/python-pathvalidate/Config.in" source "package/python-periphery/Config.in" source "package/python-pexpect/Config.in" + source "package/python-pgcopy/Config.in" source "package/python-pickleshare/Config.in" source "package/python-piexif/Config.in" source "package/python-pigpio/Config.in"
package/python-pgcopy/Config.in new file +21 -0
@@ -0,0 +1,21 @@ +config BR2_PACKAGE_PYTHON_PGCOPY + bool "python-pgcopy" + depends on BR2_USE_MMU # postgresql + depends on BR2_USE_WCHAR # postgresql + depends on !BR2_STATIC_LIBS # postgresql + depends on !BR2_OPTIMIZE_FAST # postgresql + select BR2_PACKAGE_POSTGRESQL + select BR2_PACKAGE_PYTHON_PSYCOPG2 + select BR2_PACKAGE_PYTHON_PYTZ + help + Use pgcopy for fast data loading into PostgreSQL with + binary copy. + + https://github.com/altaurog/pgcopy + +comment "python-pgcopy needs a toolchain w/ dynamic library, wchar" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR + +comment "python-pgcopy can't be built with Optimize for fast" + depends on BR2_OPTIMIZE_FAST
package/python-pgcopy/python-pgcopy.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/pgcopy/json +md5 bb7940ed821f54f32705c462f7582458 pgcopy-1.6.0.tar.gz +sha256 0da9235eea4ee9ceb4f52b97523bc89db9a6f8e80f897b49214e814ea13d04b0 pgcopy-1.6.0.tar.gz +# Locally computed sha256 checksums +sha256 969191428cb0729e689468bdcd152291a4e168875755c97745cd2df6de5520c1 LICENSE.txt
package/python-pgcopy/python-pgcopy.mk new file +21 -0
@@ -0,0 +1,21 @@ +################################################################################ +# +# 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 + +# Remove the file only for Python 2, it will cause compilation errors +define PYTHON_PGCOPY_CLEAN_PY2_SCRIPT + $(RM) $(@D)/pgcopy/errors/py2.py +endef +PYTHON_PGCOPY_POST_EXTRACT_HOOKS += PYTHON_PGCOPY_CLEAN_PY2_SCRIPT + +$(eval $(python-package))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v5 1/2 package/python-psycopg2: add config dependencies from postgresql
Also update site url to https://www.psycopg.org/
--- package/python-psycopg2/Config.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
package/python-psycopg2/Config.in +6 -3
@@ -1,6 +1,8 @@ config BR2_PACKAGE_PYTHON_PSYCOPG2 bool "python-psycopg2" + depends on BR2_USE_MMU # postgresql depends on BR2_USE_WCHAR # postgresql + depends on !BR2_STATIC_LIBS # postgresql depends on !BR2_OPTIMIZE_FAST # postgresql select BR2_PACKAGE_POSTGRESQL help
@@ -21,10 +23,11 @@ config BR2_PACKAGE_PYTHON_PSYCOPG2 customized thanks to a flexible objects adaptation system. Psycopg 2 is both Unicode and Python 3 friendly. - http://initd.org/psycopg/ + https://www.psycopg.org/ -comment "python-psycopg2 needs a toolchain w/ wchar" - depends on !BR2_USE_WCHAR +comment "python-psycopg2 needs a toolchain w/ dynamic library, wchar" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR comment "python-psycopg2 can't be built with Optimize for fast" depends on BR2_OPTIMIZE_FAST
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v5 2/2 package/python-pgcopy: new package
---
Changes v1 -> v2:
- add missing config menu entry in Config.in
Changes v2 -> v3:
- fix help text indent in Config.in
Changes v3 -> v4:
- add missing dependencies in the Config.in file
- add a comment for the hook PYTHON_PGCOPY_CLEAN_PY2_SCRIPT
- remove the pre configure hook PYTHON_PGCOPY_CREATE_SETUP_CFG
Changes v4 -> v5:
- remove the postgresql dependency, python-psycopg2 has select it
--- DEVELOPERS | 3 +++ package/Config.in | 1 + package/python-pgcopy/Config.in | 20 ++++++++++++++++++++ package/python-pgcopy/python-pgcopy.hash | 5 +++++ package/python-pgcopy/python-pgcopy.mk | 21 +++++++++++++++++++++ 5 files changed, 50 insertions(+) create mode 100644 package/python-pgcopy/Config.in create mode 100644 package/python-pgcopy/python-pgcopy.hash create mode 100644 package/python-pgcopy/python-pgcopy.mk
DEVELOPERS +3 -0
@@ -2923,6 +2923,9 @@ F: package/lrzip/ N: Sam Voss <[email protected]> F: package/ripgrep/ +N: Scott Fan <[email protected]> +F: package/python-pgcopy/ + N: Sébastien Szymanski <[email protected]> F: board/armadeus/ F: configs/armadeus*
package/Config.in +1 -0
@@ -1259,6 +1259,7 @@ menu "External python modules" source "package/python-pathvalidate/Config.in" source "package/python-periphery/Config.in" source "package/python-pexpect/Config.in" + source "package/python-pgcopy/Config.in" source "package/python-pickleshare/Config.in" source "package/python-piexif/Config.in" source "package/python-pigpio/Config.in"
package/python-pgcopy/Config.in new file +20 -0
@@ -0,0 +1,20 @@ +config BR2_PACKAGE_PYTHON_PGCOPY + bool "python-pgcopy" + depends on BR2_USE_MMU # python-psycopg2 + depends on BR2_USE_WCHAR # python-psycopg2 + depends on !BR2_STATIC_LIBS # python-psycopg2 + depends on !BR2_OPTIMIZE_FAST # python-psycopg2 + select BR2_PACKAGE_PYTHON_PSYCOPG2 + select BR2_PACKAGE_PYTHON_PYTZ + help + Use pgcopy for fast data loading into PostgreSQL with + binary copy. + + https://github.com/altaurog/pgcopy + +comment "python-pgcopy needs a toolchain w/ dynamic library, wchar" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR + +comment "python-pgcopy can't be built with Optimize for fast" + depends on BR2_OPTIMIZE_FAST
package/python-pgcopy/python-pgcopy.hash new file +5 -0
@@ -0,0 +1,5 @@ +# md5, sha256 from https://pypi.org/pypi/pgcopy/json +md5 bb7940ed821f54f32705c462f7582458 pgcopy-1.6.0.tar.gz +sha256 0da9235eea4ee9ceb4f52b97523bc89db9a6f8e80f897b49214e814ea13d04b0 pgcopy-1.6.0.tar.gz +# Locally computed sha256 checksums +sha256 969191428cb0729e689468bdcd152291a4e168875755c97745cd2df6de5520c1 LICENSE.txt
package/python-pgcopy/python-pgcopy.mk new file +21 -0
@@ -0,0 +1,21 @@ +################################################################################ +# +# 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 = python-psycopg2 python-pytz + +# Remove the file only for Python 2, it will cause compilation errors +define PYTHON_PGCOPY_CLEAN_PY2_SCRIPT + $(RM) $(@D)/pgcopy/errors/py2.py +endef +PYTHON_PGCOPY_POST_EXTRACT_HOOKS += PYTHON_PGCOPY_CLEAN_PY2_SCRIPT + +$(eval $(python-package))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 1/1 package/python-psycopg2: add config dependencies from postgresql
In reply to Scott FanAlso update site url to https://github.com/psycopg/psycopg2/
---
Changes v1 -> v2:
- update site url in the Config.in file
--- package/python-psycopg2/Config.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
package/python-psycopg2/Config.in +6 -3
@@ -1,6 +1,8 @@ config BR2_PACKAGE_PYTHON_PSYCOPG2 bool "python-psycopg2" + depends on BR2_USE_MMU # postgresql depends on BR2_USE_WCHAR # postgresql + depends on !BR2_STATIC_LIBS # postgresql depends on !BR2_OPTIMIZE_FAST # postgresql select BR2_PACKAGE_POSTGRESQL help
@@ -21,10 +23,11 @@ config BR2_PACKAGE_PYTHON_PSYCOPG2 customized thanks to a flexible objects adaptation system. Psycopg 2 is both Unicode and Python 3 friendly. - http://initd.org/psycopg/ + https://github.com/psycopg/psycopg2/ -comment "python-psycopg2 needs a toolchain w/ wchar" - depends on !BR2_USE_WCHAR +comment "python-psycopg2 needs a toolchain w/ dynamic library, wchar" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR comment "python-psycopg2 can't be built with Optimize for fast" depends on BR2_OPTIMIZE_FAST
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2] package/python-psycopg2: add config dependencies from postgresql
Quoted 3 lines · Scott Fan
Also update site url to https://github.com/psycopg/psycopg2/
Signed-off-by Scott Fan <[email protected]>
Applied to master, thanks.
Regards,
Arnout
Quoted 26 lines
---
Changes v1 -> v2:
- update site url in the Config.in file--- package/python-psycopg2/Config.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)package/python-psycopg2/Config.in +2
-1@@ -1,6 +1,8 @@ config BR2_PACKAGE_PYTHON_PSYCOPG2 bool "python-psycopg2" + depends on BR2_USE_MMU # postgresql depends on BR2_USE_WCHAR # postgresql + depends on !BR2_STATIC_LIBS # postgresql depends on !BR2_OPTIMIZE_FAST # postgresql select BR2_PACKAGE_POSTGRESQL help@@ -21,10 +23,11 @@ config BR2_PACKAGE_PYTHON_PSYCOPG2 customized thanks to a flexible objects adaptation system. Psycopg 2 is both Unicode and Python 3 friendly. - http://initd.org/psycopg/
package/python-psycopg2/Config.in config BR2_PACKAGE_PYTHON_PSYCOPG2 · line 33
Quoted 10 lines
package/python-psycopg2/Config.in +4
-2+ https://github.com/psycopg/psycopg2/ -comment "python-psycopg2 needs a toolchain w/ wchar" - depends on !BR2_USE_WCHAR +comment "python-psycopg2 needs a toolchain w/ dynamic library, wchar" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR comment "python-psycopg2 can't be built with Optimize for fast" depends on BR2_OPTIMIZE_FAST
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot