Skip to contentSkip to conversation

package/python-docutils: add upstream patch to build without setuptools

PATCH New Asaf Kahlon 4 participants 12 messages Oct 25, 2019 – Jan 5, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/python-docutils: add upstream patch to build without setuptools

An upstream patch to enable building without setuptools is added. The original commit is adjusted slightly to fit the current version.

Fixes:
- http://autobuild.buildroot.net/results/8f3c01f0e286c6b15c8c973f91dd69ee816a58b9

---
 .../0001-Update-setup.py.patch                | 64 +++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 package/python-docutils/0001-Update-setup.py.patch
package/python-docutils/0001-Update-setup.py.patch new file +64 -0
new file mode 100644
index 0000000000..3fb34a9763
@@ -0,0 +1,64 @@
+From 583e59ccf72a02c2a6f0399f29f622c7f2f4a932 Mon Sep 17 00:00:00 2001
+From: milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>
+Date: Sun, 1 Sep 2019 19:39:36 +0000
+Subject: [PATCH] Update setup.py
+
+Python 3.4 no longer supported,
+more languages supported (and Lithuanian accepted by PyPi).
+
+git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk at 8383 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
+
+[Asaf: adjust upstream patch to 0.15.2]
+Signed-off-by: Asaf Kahlon <[email protected]>
+---
+ setup.py | 14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index f801ea2..5c1ebfd 100755
+--- a/setup.py
++++ b/setup.py
+@@ -7,6 +7,10 @@ import os
+ import glob
+ try:
+     import setuptools
++except ImportError:
++    print('Warning: Could not load package `setuptools`.')
++    print('Actions requiring `setuptools` instead of `distutils` will fail')
++try:
+     from distutils.core import setup, Command
+     from distutils.command.build import build
+     from distutils.command.build_py import build_py
+@@ -123,7 +127,7 @@ what-you-see-is-what-you-get plaintext markup syntax.""", # wrap at col 60
+     'maintainer_email': 'docutils-develop at lists.sourceforge.net',
+     'license': 'public domain, Python, 2-Clause BSD, GPL 3 (see COPYING.txt)',
+     'platforms': 'OS-independent',
+-    'python_requires': '>=2.6, !=3.0.*, !=3.1.*, !=3.2.*',
++    'python_requires': '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
+     'package_dir': {'docutils': 'docutils',
+                     'docutils.tools': 'tools'},
+     'packages': ['docutils',
+@@ -213,14 +219,20 @@ classifiers = [
+     'Natural Language :: Chinese (Simplified)',
+     'Natural Language :: Chinese (Traditional)',
+     'Natural Language :: Czech',
++    'Natural Language :: Danish',
+     'Natural Language :: Dutch',
+     'Natural Language :: Esperanto',
+     'Natural Language :: Finnish',
+     'Natural Language :: French',
+     'Natural Language :: Galician',
+     'Natural Language :: German',
++    'Natural Language :: Hebrew',
+     'Natural Language :: Italian',
+     'Natural Language :: Japanese',
++    'Natural Language :: Korean',
++    'Natural Language :: Latvian',
++    'Natural Language :: Lithuanian',
++    'Natural Language :: Persian',
+     'Natural Language :: Polish',
+     'Natural Language :: Portuguese (Brazilian)',
+     'Natural Language :: Russian',
+-- 
+2.20.1
+k
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 package/python-ipython: bump to version 7.9.0

And fix indentation in hash file.

---
 package/python-ipython/python-ipython.hash | 6 +++---
 package/python-ipython/python-ipython.mk   | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
package/python-ipython/python-ipython.hash +3 -3
index 81544a6bf1..37768a835d 100644
@@ -1,6 +1,6 @@
 # md5, sha256 from https://pypi.org/pypi/ipython/json
-md5	4cf3010770ce20f3227c38f117c4b311  ipython-7.8.0.tar.gz
-sha256	dd76831f065f17bddd7eaa5c781f5ea32de5ef217592cf019e34043b56895aa1  ipython-7.8.0.tar.gz
+md5	68542bca2ebf39af7d9d0557e7fb5708  ipython-7.9.0.tar.gz
+sha256	dfd303b270b7b5232b3d08bd30ec6fd685d8a58cabd54055e3d69d8f029f7280  ipython-7.9.0.tar.gz
 # Locally computed sha256 checksums
-sha256	341afcbd729887b7046fe7b98fc4f4edff3aed8d38f06eefd9b30670f043df17 COPYING.rst
+sha256	341afcbd729887b7046fe7b98fc4f4edff3aed8d38f06eefd9b30670f043df17  COPYING.rst
 sha256	e0e390748ed440ab893ca1f135a88a920aaf5409dbb90a5b427c75c5e51268fb  LICENSE
package/python-ipython/python-ipython.mk +2 -2
index 3d8d9e868a..f340e9b013 100644
@@ -4,9 +4,9 @@
 #
 ################################################################################
 
-PYTHON_IPYTHON_VERSION = 7.8.0
+PYTHON_IPYTHON_VERSION = 7.9.0
 PYTHON_IPYTHON_SOURCE = ipython-$(PYTHON_IPYTHON_VERSION).tar.gz
-PYTHON_IPYTHON_SITE = https://files.pythonhosted.org/packages/89/60/acb98588d8eba96558e69d90fa54f9908b4e48f6492ff378697f0c2216e2
+PYTHON_IPYTHON_SITE = https://files.pythonhosted.org/packages/c0/e5/ba19ae58e9bdd80832332873cb4e11a90cf2049df052c1aadeabc2cdadeb
 PYTHON_IPYTHON_LICENSE = BSD-3-Clause
 PYTHON_IPYTHON_LICENSE_FILES = COPYING.rst LICENSE
 PYTHON_IPYTHON_SETUP_TYPE = distutils
Signature · 1 line
2.20.1
#2 lore raw

PATCH 1/1 package/python-ipython: bump to version 7.9.0

Quoted 7 lines · On Fri, 25 Oct 2019 21:54:44 +0300 Asaf Kahlon <[email protected]> wrote:

And fix indentation in hash file.

---
 package/python-ipython/python-ipython.hash | 6 +++---
 package/python-ipython/python-ipython.mk   | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 1/1 package/python-uvloop: force re-cythonize on build

In reply to Asaf Kahlon

The generated loop.c provided with the tarball was generated with Cython 0.29.10 and it doesn't compile against the new Python 3.8 headers. Upstream is now working on a new uvloop release which will use the newest Cython (0.29.13). Until then, we will remove the current loop.c and force regenration of it.

Fixes:
- http://autobuild.buildroot.net/results/bffe1b2ee7b674f870e15398680ce5b5b22fd296

---
 package/python-uvloop/python-uvloop.mk | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
package/python-uvloop/python-uvloop.mk +9 -3
index d9932b931d..13880ec7e1 100644
@@ -10,8 +10,14 @@ PYTHON_UVLOOP_SITE = https://files.pythonhosted.org/packages/e3/15/dc3276384f436
 PYTHON_UVLOOP_SETUP_TYPE = setuptools
 PYTHON_UVLOOP_LICENSE = Apache-2.0, MIT
 PYTHON_UVLOOP_LICENSE_FILES = LICENSE-APACHE LICENSE-MIT
-PYTHON_UVLOOP_BUILD_OPTS = build_ext --inplace --use-system-libuv
-PYTHON_UVLOOP_INSTALL_TARGET_OPTS = build_ext --inplace --use-system-libuv
-PYTHON_UVLOOP_DEPENDENCIES = libuv
+PYTHON_UVLOOP_BUILD_OPTS = build_ext --inplace --cython-always --use-system-libuv
+PYTHON_UVLOOP_INSTALL_TARGET_OPTS = build_ext --inplace --cython-always --use-system-libuv
+PYTHON_UVLOOP_DEPENDENCIES = libuv host-python-cython
+
+define PYTHON_UVLOOP_HOOK
+	$(RM) $(@D)/uvloop/loop.c
+endef
+
+PYTHON_UVLOOP_PRE_BUILD_HOOKS += PYTHON_UVLOOP_HOOK
 
 $(eval $(python-package))
Signature · 1 line
2.20.1
#4 lore raw

PATCH 1/1 package/python-uvloop: force re-cythonize on build

Quoted 1 line · On Fri, 25 Oct 2019 21:54:45 +0300 Asaf Kahlon <[email protected]> wrote:

+define PYTHON_UVLOOP_HOOK

This hook name was not so good, so I changed to a more descriptive one. I've also added a comment in the .mk file about the fact that this stuff can be removed at the next uvloop version bump. Applied with those changes.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

PATCH 1/1 package/scons: bump to version 3.1.0

In reply to Asaf Kahlon
---
 package/scons/scons.hash | 2 +-
 package/scons/scons.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/scons/scons.hash +1 -1
index ed31301562..14be1250de 100644
@@ -1,3 +1,3 @@
 # Locally computed:
-sha256  df676f23dc6d4bfa384fc389d95dcd21ab907e6349d4c848958ba4befb73c73e  scons-3.0.5.tar.gz
+sha256  f3f548d738d4a2179123ecd744271ec413b2d55735ea7625a59b1b59e6cd132f  scons-3.1.0.tar.gz
 sha256  c4248451b6a4cd09870de4fb82a857feb9f98174167b07500c19ed0263fd4db7  LICENSE.txt
package/scons/scons.mk +1 -1
index 6533811db7..d7cc427add 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-SCONS_VERSION = 3.0.5
+SCONS_VERSION = 3.1.0
 SCONS_SITE = http://downloads.sourceforge.net/project/scons/scons/$(SCONS_VERSION)
 SCONS_LICENSE = MIT
 SCONS_LICENSE_FILES = LICENSE.txt
Signature · 1 line
2.20.1
#6 lore raw

PATCH 1/1 package/scons: bump to version 3.1.0

Quoted 5 lines · On Fri, 25 Oct 2019 21:54:46 +0300 Asaf Kahlon <[email protected]> wrote:
---
 package/scons/scons.hash | 2 +-
 package/scons/scons.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#7 lore raw

PATCH 1/1 package/uvw: new package

In reply to Asaf Kahlon

A header-only libuv wrapper in C++.

A patch is added to enable in-tree build, which is checked and prevented by the package and fails the build.

---
 package/Config.in                             |  1 +
 ...-CMakeLists.txt-allow-in-place-build.patch | 32 +++++++++++++++++++
 package/uvw/Config.in                         | 16 ++++++++++
 package/uvw/uvw.hash                          |  3 ++
 package/uvw/uvw.mk                            | 15 +++++++++
 5 files changed, 67 insertions(+)
 create mode 100644 package/uvw/0001-CMakeLists.txt-allow-in-place-build.patch
 create mode 100644 package/uvw/Config.in
 create mode 100644 package/uvw/uvw.hash
 create mode 100644 package/uvw/uvw.mk
package/Config.in +1 -0
index d78b4c444b..901c25fe02 100644
@@ -1805,6 +1805,7 @@ endif
 	source "package/tinycbor/Config.in"
 	source "package/tz/Config.in"
 	source "package/tzdata/Config.in"
+	source "package/uvw/Config.in"
 	source "package/xapian/Config.in"
 endmenu
 
package/uvw/0001-CMakeLists.txt-allow-in-place-build.patch new file +32 -0
new file mode 100644
index 0000000000..01068d0427
@@ -0,0 +1,32 @@
+From 1d784a0067b7123971c834c77f4f137acca56ae6 Mon Sep 17 00:00:00 2001
+From: Asaf Kahlon <[email protected]>
+Date: Fri, 25 Oct 2019 19:09:14 +0300
+Subject: [PATCH 1/1] CMakeLists.txt: allow in-tree build
+
+Signed-off-by: Asaf Kahlon <[email protected]>
+---
+ CMakeLists.txt | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9fc5538..4aaabf7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -4,14 +4,6 @@
+ 
+ cmake_minimum_required(VERSION 3.2)
+ 
+-#
+-# Building in-tree is not allowed (we take care of your craziness).
+-#
+-
+-if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
+-    message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the source code and call cmake from there. Thank you.")
+-endif()
+-
+ #
+ # Project configuration
+ #
+-- 
+2.20.1
+
package/uvw/Config.in new file +16 -0
new file mode 100644
index 0000000000..58e68392af
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_UVW
+	bool "uvw"
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv
+	depends on BR2_USE_MMU # libuv
+	depends on !BR2_STATIC_LIBS # libuv
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libuv
+	help
+	  Header-only, event based, tiny and easy to use
+	  libuv wrapper in modern C++.
+
+	  https://github.com/skypjack/uvw
+
+comment "uvw needs a toolchain w/ NPTL, dynamic library"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
+	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4
package/uvw/uvw.hash new file +3 -0
new file mode 100644
index 0000000000..e6129e559d
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  266a354f0c64a8e85f29b10f20f4d08a35bc1e8caa7cc94a8afecf9ca43f4442  uvw-2.2.0_libuv-v1.33.tar.gz
+sha256  ea786619b4d1b2ba0a188e923111122dfefea1d01c86e37f9e8c80bdbc3ea400  LICENSE
package/uvw/uvw.mk new file +15 -0
new file mode 100644
index 0000000000..6b3621e55d
@@ -0,0 +1,15 @@
+################################################################################
+#
+# uvw
+#
+################################################################################
+
+UVW_VERSION = 2.2.0_libuv-v1.33
+UVW_SITE = $(call github,skypjack,uvw,v$(UVW_VERSION))
+UVW_INSTALL_STAGING = YES
+UVW_INSTALL_TARGET = NO
+UVW_DEPENDENCIES = libuv
+UVW_LICENSE = MIT
+UVW_LICENSE_FILES = LICENSE
+
+$(eval $(cmake-package))
Signature · 1 line
2.20.1
#8 lore raw

PATCH v2 1/1 package/python-reentry: add host variant

In reply to Asaf Kahlon

Packages which use reentry will have setup_requires=['reentry'] and reentry_register=True in their setup.py.
A host variant is needed in order to invoke reentry when building the package and register the entrypoints.

---
 package/python-click/python-click.mk       | 1 +
 package/python-pathlib2/python-pathlib2.mk | 1 +
 package/python-reentry/python-reentry.mk   | 5 +++++
 3 files changed, 7 insertions(+)
package/python-click/python-click.mk +1 -0
index 12539f557b..1c8c28449a 100644
@@ -12,3 +12,4 @@ PYTHON_CLICK_LICENSE_FILES = LICENSE.rst
 PYTHON_CLICK_SETUP_TYPE = setuptools
 
 $(eval $(python-package))
+$(eval $(host-python-package))
package/python-pathlib2/python-pathlib2.mk +1 -0
index d813b77d7e..5fa885235b 100644
@@ -12,3 +12,4 @@ PYTHON_PATHLIB2_LICENSE_FILES = LICENSE.rst
 PYTHON_PATHLIB2_SETUP_TYPE = setuptools
 
 $(eval $(python-package))
+$(eval $(host-python-package))
package/python-reentry/python-reentry.mk +5 -0
index 428dbf2b1b..b4bd33d846 100644
@@ -10,5 +10,10 @@ PYTHON_REENTRY_SITE = https://files.pythonhosted.org/packages/ee/3f/a90789e01c4d
 PYTHON_REENTRY_SETUP_TYPE = setuptools
 PYTHON_REENTRY_LICENSE = MIT
 PYTHON_REENTRY_LICENSE_FILES = LICENSE
+HOST_PYTHON_REENTRY_DEPENDENCIES = \
+	host-python-six
+	host-python-click
+	$(if $(BR2_PACKAGE_PYTHON),host-python-pathlib2,)
 
 $(eval $(python-package))
+$(eval $(host-python-package))
Signature · 1 line
2.20.1
#9 lore raw

PATCH v2 1/1 package/python-reentry: add host variant

Am Fri, 25 Oct 2019 21:54:48 +0300 schrieb Asaf Kahlon:

Quoted 4 lines

Packages which use reentry will have setup_requires=['reentry'] and reentry_register=True in their setup.py.
A host variant is needed in order to invoke reentry when building the package and register the entrypoints.

Hi,

as you pointed out in http://patchwork.ozlabs.org/project/buildroot/patch/
20191020190142.18672-2-asafka7 at gmail.com/

"I don't see any Buildroot package which uses reentry..."

I think that your patch should not be applied to buildroot atm.

Regards, Bernd

#10 lore raw

PATCH v2 1/1 package/python-reentry: add host variant

Asaf, All,

On 2020-09-23 07:08 +0200, Bernd Kuhls spake thusly:

Quoted 11 lines

Am Fri, 25 Oct 2019 21:54:48 +0300 schrieb Asaf Kahlon:

Quoted 4 lines

Packages which use reentry will have setup_requires=['reentry'] and reentry_register=True in their setup.py.
A host variant is needed in order to invoke reentry when building the package and register the entrypoints.

as you pointed out in http://patchwork.ozlabs.org/project/buildroot/patch/
20191020190142.18672-2-asafka7 at gmail.com/

"I don't see any Buildroot package which uses reentry..."

I think that your patch should not be applied to buildroot atm.

I concur, so I have now marked that patch as rejected in patchwork.

If in the future we introduce a package that needs it, then will be the time to eventually add the host variant for reentry.

Thanks!

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#11 lore raw

PATCH 1/1 package/python-docutils: add upstream patch to build without setuptools

In reply to Asaf Kahlon
Quoted 11 lines · On Fri, 25 Oct 2019 21:54:43 +0300 Asaf Kahlon <[email protected]> wrote:

An upstream patch to enable building without setuptools is added. The original commit is adjusted slightly to fit the current version.

Fixes:
- http://autobuild.buildroot.net/results/8f3c01f0e286c6b15c8c973f91dd69ee816a58b9

---
 .../0001-Update-setup.py.patch                | 64 +++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 package/python-docutils/0001-Update-setup.py.patch

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com