first commit: base 2024.08

Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
This commit is contained in:
tao89959
2025-02-12 17:59:29 +08:00
committed by maoxiaochuan
commit f3217a7708
14356 changed files with 572894 additions and 0 deletions
@@ -0,0 +1,55 @@
From e2372bbecdf46a100b09126f2951431c1929637b Mon Sep 17 00:00:00 2001
From: Adam Duskett <adam.duskett@amarulasolutions.com>
Date: Tue, 24 Oct 2023 08:59:21 +0200
Subject: [PATCH] Replace imp
The imp module has been removed in python 3.12.0.
This change has also been tested with Python 3.9.2 on Debian 11.
From: https://docs.python.org/3.12/whatsnew/3.12.html#removed, follow the
instructions to add the load_source method back into setup.py.
Upstream: https://github.com/gorakhargosh/pathtools/pull/14
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
setup.py | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/setup.py b/setup.py
index 4718885..1be0315 100644
--- a/setup.py
+++ b/setup.py
@@ -22,12 +22,25 @@
# THE SOFTWARE.
import os
-import imp
+import importlib.util
+import importlib.machinery
from setuptools import setup
PKG_DIR = 'pathtools'
-version = imp.load_source('version',
- os.path.join(PKG_DIR, 'version.py'))
+
+# From: https://docs.python.org/3.12/whatsnew/3.12.html#removed
+def load_source(modname, filename):
+ loader = importlib.machinery.SourceFileLoader(modname, filename)
+ spec = importlib.util.spec_from_file_location(modname, filename, loader=loader)
+ module = importlib.util.module_from_spec(spec)
+ # The module is always executed and not cached in sys.modules.
+ # Uncomment the following line to cache the module.
+ # sys.modules[module.__name__] = module
+ loader.exec_module(module)
+ return module
+
+version = load_source('version',
+ os.path.join(PKG_DIR, 'version.py'))
def read_file(filename):
"""
--
2.41.0
+6
View File
@@ -0,0 +1,6 @@
config BR2_PACKAGE_PYTHON_PATHTOOLS
bool "python-pathtools"
help
File system general utilities.
http://github.com/gorakhargosh/pathtools
@@ -0,0 +1,6 @@
# md5 from https://pypi.python.org/pypi/pathtools/json
md5 9a1af5c605768ea5804b03b734ff0f82 pathtools-0.1.2.tar.gz
# sha256 calculated by scanpypi
sha256 7c35c5421a39bb82e58018febd90e3b6e5db34c5443aaaf742b3f33d4655f1c0 pathtools-0.1.2.tar.gz
# Locally computed
sha256 b52d83fba08f61bd1e603fee1b44cbc7ead9fcb512a5ceb8c53fec90ba415ac4 LICENSE
@@ -0,0 +1,14 @@
################################################################################
#
# python-pathtools
#
################################################################################
PYTHON_PATHTOOLS_VERSION = 0.1.2
PYTHON_PATHTOOLS_SOURCE = pathtools-$(PYTHON_PATHTOOLS_VERSION).tar.gz
PYTHON_PATHTOOLS_SITE = https://pypi.python.org/packages/e7/7f/470d6fcdf23f9f3518f6b0b76be9df16dcc8630ad409947f8be2eb0ed13a
PYTHON_PATHTOOLS_SETUP_TYPE = setuptools
PYTHON_PATHTOOLS_LICENSE = MIT
PYTHON_PATHTOOLS_LICENSE_FILES = LICENSE
$(eval $(python-package))