mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-01-08 03:43:25 +00:00
bump(main/libtorrent-rasterbar): 2.0.11
Remove 7649.patch file which was added in upstream.
31003b7c8d
This commit is contained in:
@@ -1,124 +0,0 @@
|
||||
From 5970ff3d5eb26e35cf08397f55c2d11311f4f7bd Mon Sep 17 00:00:00 2001
|
||||
From: arvidn <arvid@libtorrent.org>
|
||||
Date: Mon, 11 Mar 2024 14:45:52 +0100
|
||||
Subject: [PATCH] fix setup.py to not use distutils (as it has been removed in
|
||||
python 3.12)
|
||||
|
||||
---
|
||||
bindings/python/setup.py | 47 +++++++++---------------------------
|
||||
2 files changed, 13 insertions(+), 36 deletions(-)
|
||||
|
||||
diff --git a/bindings/python/setup.py b/bindings/python/setup.py
|
||||
index 0eb07c2b5c6..d720c475beb 100644
|
||||
--- a/bindings/python/setup.py
|
||||
+++ b/bindings/python/setup.py
|
||||
@@ -1,14 +1,9 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import contextlib
|
||||
-from distutils import log
|
||||
-import distutils.cmd
|
||||
-import distutils.command.install_data as install_data_lib
|
||||
-import distutils.debug
|
||||
-import distutils.errors
|
||||
-import distutils.sysconfig
|
||||
import functools
|
||||
import itertools
|
||||
+import logging as log
|
||||
import os
|
||||
import pathlib
|
||||
import re
|
||||
@@ -75,11 +70,11 @@ def b2_version() -> Tuple[int, ...]:
|
||||
class B2Distribution(setuptools.Distribution):
|
||||
def reinitialize_command(
|
||||
self, command: str, reinit_subcommands: int = 0
|
||||
- ) -> distutils.cmd.Command:
|
||||
+ ) -> setuptools.Command:
|
||||
if command == "build_ext":
|
||||
- return cast(distutils.cmd.Command, self.get_command_obj("build_ext"))
|
||||
+ return cast(setuptools.Command, self.get_command_obj("build_ext"))
|
||||
return cast(
|
||||
- distutils.cmd.Command,
|
||||
+ setuptools.Command,
|
||||
super().reinitialize_command(
|
||||
command, reinit_subcommands=reinit_subcommands
|
||||
),
|
||||
@@ -155,13 +150,11 @@ def write_b2_python_config(
|
||||
# other words we apply debian's override everywhere, and hope no other
|
||||
# overrides ever disagree with us.
|
||||
|
||||
- # Note that sysconfig and distutils.sysconfig disagree here, especially on
|
||||
- # windows.
|
||||
- ext_suffix = distutils.sysconfig.get_config_var("EXT_SUFFIX")
|
||||
+ ext_suffix = sysconfig.get_config_var("EXT_SUFFIX")
|
||||
ext_suffix = str(ext_suffix or "")
|
||||
|
||||
# python.jam appends the platform-specific final suffix on its own. I can't
|
||||
- # find a consistent value from sysconfig or distutils.sysconfig for this.
|
||||
+ # find a consistent value from sysconfig for this.
|
||||
for plat_suffix in (".pyd", ".dll", ".so", ".sl"):
|
||||
if ext_suffix.endswith(plat_suffix):
|
||||
ext_suffix = ext_suffix[: -len(plat_suffix)]
|
||||
@@ -271,7 +264,7 @@ def finalize_options(self) -> None:
|
||||
super().finalize_options()
|
||||
|
||||
if self.config_mode not in self.CONFIG_MODES:
|
||||
- raise distutils.errors.DistutilsOptionError(
|
||||
+ raise setuptools.errors.DistutilsOptionError(
|
||||
f"--config-mode must be one of {self.CONFIG_MODES}"
|
||||
)
|
||||
|
||||
@@ -382,10 +375,10 @@ def _configure_b2_with_distutils(self) -> Iterator[None]:
|
||||
if os.name == "nt":
|
||||
self._maybe_add_arg("--abbreviate-paths")
|
||||
|
||||
- if distutils.debug.DEBUG:
|
||||
- self._maybe_add_arg("--debug-configuration")
|
||||
- self._maybe_add_arg("--debug-building")
|
||||
- self._maybe_add_arg("--debug-generators")
|
||||
+ # if distutils.debug.DEBUG:
|
||||
+ # self._maybe_add_arg("--debug-configuration")
|
||||
+ # self._maybe_add_arg("--debug-building")
|
||||
+ # self._maybe_add_arg("--debug-generators")
|
||||
|
||||
if sys.platform == "darwin":
|
||||
# boost.build defaults to toolset=clang on mac. However python.jam
|
||||
@@ -411,7 +404,7 @@ def _configure_b2_with_distutils(self) -> Iterator[None]:
|
||||
# macOS uses multi-arch binaries. Attempt to match the
|
||||
# configuration of the running python by translating distutils
|
||||
# platform modes to b2 architecture modes
|
||||
- machine = distutils.util.get_platform().split("-")[-1]
|
||||
+ machine = sysconfig.get_platform().split("-")[-1]
|
||||
if machine == "arm64":
|
||||
self._maybe_add_arg("architecture=arm")
|
||||
elif machine in ("ppc", "ppc64"):
|
||||
@@ -500,21 +493,6 @@ def _find_project_config(self) -> Optional[pathlib.Path]:
|
||||
return None
|
||||
|
||||
|
||||
-class InstallDataToLibDir(install_data_lib.install_data):
|
||||
- def finalize_options(self) -> None:
|
||||
- # install_data installs to the *base* directory, which is useless.
|
||||
- # Nothing ever gets installed there, no tools search there. You could
|
||||
- # only make use of it by manually picking the right install paths.
|
||||
- # This instead defaults the "install_dir" option to be "install_lib",
|
||||
- # which is "where packages are normally installed".
|
||||
- self.set_undefined_options(
|
||||
- "install",
|
||||
- ("install_lib", "install_dir"), # note "install_lib"
|
||||
- ("root", "root"),
|
||||
- ("force", "force"),
|
||||
- )
|
||||
-
|
||||
-
|
||||
def find_all_files(path: str) -> Iterator[str]:
|
||||
for dirpath, _, filenames in os.walk(path):
|
||||
for filename in filenames:
|
||||
@@ -532,7 +510,6 @@ def find_all_files(path: str) -> Iterator[str]:
|
||||
ext_modules=[StubExtension("libtorrent.__init__")],
|
||||
cmdclass={
|
||||
"build_ext": LibtorrentBuildExt,
|
||||
- "install_data": InstallDataToLibDir,
|
||||
},
|
||||
distclass=B2Distribution,
|
||||
data_files=[
|
||||
@@ -2,15 +2,13 @@ TERMUX_PKG_HOMEPAGE=https://libtorrent.org/
|
||||
TERMUX_PKG_DESCRIPTION="A feature complete C++ bittorrent implementation focusing on efficiency and scalability"
|
||||
TERMUX_PKG_LICENSE="BSD 3-Clause"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION="2.0.10"
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_VERSION="2.0.11"
|
||||
TERMUX_PKG_SRCURL=https://github.com/arvidn/libtorrent/releases/download/v${TERMUX_PKG_VERSION}/libtorrent-rasterbar-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=fc935b8c1daca5c0a4d304bff59e64e532be16bb877c012aea4bda73d9ca885d
|
||||
TERMUX_PKG_SHA256=f0db58580f4f29ade6cc40fa4ba80e2c9a70c90265cd77332d3cdec37ecf1e6d
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
TERMUX_PKG_DEPENDS="boost, libc++, openssl, python"
|
||||
TERMUX_PKG_BUILD_DEPENDS="boost-headers"
|
||||
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel"
|
||||
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
-Dboost-python-module-name=python
|
||||
-Dpython-bindings=ON
|
||||
|
||||
Reference in New Issue
Block a user