mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
python/esptool: Updated for version 4.8.1.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
f7a69b67c6
commit
3b5147a1cd
3 changed files with 137 additions and 4 deletions
|
@ -30,11 +30,13 @@
|
|||
# I am reliant on those that requested it doing any testing. :-)
|
||||
# 2023/12/06 added some extra deps. bumped build number
|
||||
# 2024/01/17 update to 4.7.0
|
||||
# 2024/09/25 update to 4.8.0 add patch to revert commit d34486b to restore setup.py functionality
|
||||
# 2024/09/26 update to 4.8.1 (keep patch)
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=esptool
|
||||
VERSION=${VERSION:-4.7.0}
|
||||
VERSION=${VERSION:-4.8.1}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
@ -71,6 +73,8 @@ find -L . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
#revert recent move away from setup.py (commit d34486b) so we can use it
|
||||
patch setup.py $CWD/setup.py.patch
|
||||
python3 setup.py install --root=$PKG
|
||||
|
||||
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
PRGNAM="esptool"
|
||||
VERSION="4.7.0"
|
||||
VERSION="4.8.1"
|
||||
HOMEPAGE="https://github.com/espressif/esptool"
|
||||
DOWNLOAD="https://files.pythonhosted.org/packages/1b/8b/f0d1e75879dee053874a4f955ed1e9ad97275485f51cb4bc2cb4e9b24479/esptool-4.7.0.tar.gz"
|
||||
MD5SUM="e7f2012cf31cd23f60049b179fb3b53a"
|
||||
DOWNLOAD="https://files.pythonhosted.org/packages/5c/6b/3ce9bb7f36bdef3d6ae71646a1d3b7d59826a478f3ed8a783a93a2f8f537/esptool-4.8.1.tar.gz"
|
||||
MD5SUM="c7d41d4c89ffa0fa0a9d490439358b27"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES="pyserial ecdsa python-bitstring reedsolo"
|
||||
|
|
129
python/esptool/setup.py.patch
Normal file
129
python/esptool/setup.py.patch
Normal file
|
@ -0,0 +1,129 @@
|
|||
--- setup.py.orig 2024-09-18 14:35:46.000000000 +0100
|
||||
+++ setup.py 2024-09-25 14:36:56.623686000 +0100
|
||||
@@ -1,5 +1,40 @@
|
||||
+# SPDX-FileCopyrightText: 2014-2023 Fredrik Ahlberg, Angus Gratton,
|
||||
+# Espressif Systems (Shanghai) CO LTD, other contributors as noted.
|
||||
+#
|
||||
+# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
+
|
||||
+import io
|
||||
import os
|
||||
-from setuptools import setup
|
||||
+import re
|
||||
+import sys
|
||||
+
|
||||
+try:
|
||||
+ from setuptools import find_packages, setup
|
||||
+except ImportError:
|
||||
+ print(
|
||||
+ "Package setuptools is missing from your Python installation. "
|
||||
+ "Please see the installation section in the esptool documentation"
|
||||
+ " for instructions on how to install it."
|
||||
+ )
|
||||
+ sys.exit(1)
|
||||
+
|
||||
+
|
||||
+# Example code to pull version from esptool module with regex, taken from
|
||||
+# https://packaging.python.org/en/latest/guides/single-sourcing-package-version/
|
||||
+def read(*names, **kwargs):
|
||||
+ with io.open(
|
||||
+ os.path.join(os.path.dirname(__file__), *names),
|
||||
+ encoding=kwargs.get("encoding", "utf8"),
|
||||
+ ) as fp:
|
||||
+ return fp.read()
|
||||
+
|
||||
+
|
||||
+def find_version(*file_paths):
|
||||
+ version_file = read(*file_paths)
|
||||
+ version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
|
||||
+ if version_match:
|
||||
+ return version_match.group(1)
|
||||
+ raise RuntimeError("Unable to find version string.")
|
||||
|
||||
if os.name != "nt":
|
||||
scripts = ["esptool.py", "espefuse.py", "espsecure.py", "esp_rfc2217_server.py"]
|
||||
@@ -15,7 +50,83 @@
|
||||
],
|
||||
}
|
||||
|
||||
+long_description = """
|
||||
+==========
|
||||
+esptool.py
|
||||
+==========
|
||||
+A Python-based, open-source, platform-independent utility to communicate with \
|
||||
+the ROM bootloader in Espressif chips.
|
||||
+The esptool.py project is `hosted on github <https://github.com/espressif/esptool>`_.
|
||||
+Documentation
|
||||
+-------------
|
||||
+Visit online `esptool documentation <https://docs.espressif.com/projects/esptool/>`_ \
|
||||
+or run ``esptool.py -h``.
|
||||
+Contributing
|
||||
+------------
|
||||
+Please see the `contributions guide \
|
||||
+<https://docs.espressif.com/projects/esptool/en/latest/contributing.html>`_.
|
||||
+"""
|
||||
+
|
||||
setup(
|
||||
- scripts=scripts,
|
||||
+ name="esptool",
|
||||
+ version=find_version("esptool/__init__.py"),
|
||||
+ description="A serial utility to communicate & flash code to Espressif chips.",
|
||||
+ long_description=long_description,
|
||||
+ url="https://github.com/espressif/esptool/",
|
||||
+ project_urls={
|
||||
+ "Documentation": "https://docs.espressif.com/projects/esptool/",
|
||||
+ "Source": "https://github.com/espressif/esptool/",
|
||||
+ "Tracker": "https://github.com/espressif/esptool/issues/",
|
||||
+ },
|
||||
+ author="Fredrik Ahlberg (themadinventor) & Angus Gratton (projectgus) "
|
||||
+ "& Espressif Systems",
|
||||
+ author_email="",
|
||||
+ license="GPLv2+",
|
||||
+ classifiers=[
|
||||
+ "Development Status :: 5 - Production/Stable",
|
||||
+ "Intended Audience :: Developers",
|
||||
+ "Natural Language :: English",
|
||||
+ "Operating System :: POSIX",
|
||||
+ "Operating System :: Microsoft :: Windows",
|
||||
+ "Operating System :: MacOS :: MacOS X",
|
||||
+ "Topic :: Software Development :: Embedded Systems",
|
||||
+ "Environment :: Console",
|
||||
+ "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
|
||||
+ "Programming Language :: Python :: 3.7",
|
||||
+ "Programming Language :: Python :: 3.8",
|
||||
+ "Programming Language :: Python :: 3.9",
|
||||
+ "Programming Language :: Python :: 3.10",
|
||||
+ "Programming Language :: Python :: 3.11",
|
||||
+ "Programming Language :: Python :: 3.12",
|
||||
+ ],
|
||||
+ python_requires=">=3.7",
|
||||
+ setup_requires=(["wheel"] if "bdist_wheel" in sys.argv else []),
|
||||
+ extras_require={
|
||||
+ "dev": [
|
||||
+ "pyelftools",
|
||||
+ "coverage~=6.0",
|
||||
+ "pre-commit",
|
||||
+ "pytest",
|
||||
+ "pytest-rerunfailures",
|
||||
+ "requests",
|
||||
+ "commitizen",
|
||||
+ ],
|
||||
+ "hsm": [
|
||||
+ "python-pkcs11",
|
||||
+ ],
|
||||
+ },
|
||||
+ install_requires=[
|
||||
+ "bitstring>=3.1.6",
|
||||
+ "cryptography>=2.1.4",
|
||||
+ "ecdsa>=0.16.0",
|
||||
+ "pyserial>=3.3",
|
||||
+ "reedsolo>=1.5.3,<1.8",
|
||||
+ "PyYAML>=5.1",
|
||||
+ "intelhex",
|
||||
+ ],
|
||||
+ packages=find_packages(),
|
||||
+ include_package_data=True,
|
||||
+ package_data={"": ["esptool/targets/stub_flasher/*.json"]},
|
||||
entry_points=entry_points,
|
||||
+ scripts=scripts,
|
||||
)
|
Loading…
Reference in a new issue