mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-02-11 04:10:52 +00:00
- debpython is the commands `py3compile` and `py3clean` from Debian. I
am calling them that because a large chunk of their source code is
found inside a folder inside Debian's source code named "debpython"
- 5348f70466
- rather than packaging `.pyc` files into packages, `py3compile` and
`py3clean` can be called from `postinst` and `prerm` scripts to
generate all `.pyc` for the `.py` files in the package immediately
after the package is installed, and remove all `.pyc` files immediately
before uninstalling the package, respectively
- fixes the error `trying to overwrite '/data/data/com.termux/files/usr/lib/python3.12/__pycache__/cProfile.cpython-312.pyc'` when packages were built on-device, but at the same time, also:
- prevents the warnings `dpkg: warning: while removing python, directory '/data/data/com.termux/files/usr/lib/python3.12/site-packages' not empty so not removed` as long as no packages were installed using `pip`
- The `termux_step_create_python_debscripts.sh` can configure work on debpython (i.e. its `py3copile` and `py3clean` commands) from the glibc package `python-glibc`, if some glibc package is being compiled.
- New variables have been implemented:
- `TERMUX_PYTHON_CROSSENV_BUILDHOME` - location of crossenv's python build libraries.
- `TERMUX_PKG_PYTHON_RUNTIME_DEPS` - configures the installation of the python modules via pip3 in the pkg's debscripts. If not configured in the package, it will use the value from `TERMUX_PKG_PYTHON_TARGET_DEPS`. If the variable is set to `false`, then the customization of installing python modules will be disabled, even if the `TERMUX_PKG_PYTHON_TARGET_DEPS` variable is set in the package.
- `TERMUX_SUBPKG_PYTHON_RUNTIME_DEPS` - configures the installation of the python modules via pip3 in the subpkg's debscripts.
- Implemented reconfiguration of prefixes in python module `sysconfig` and setting in `TERMUX_PYTHON_CROSSENV_BUILDHOME`, so that python modules from crossenv building can specify system paths of termux for correct compilation.
- Added automatic addition of `python-glibc{-glibc}` dependency when using the `TERMUX_PKG_PYTHON_RUNTIME_DEPS` (for pkg; will be disabled, i.e. will not be added, if the variable is set to `false`) or `TERMUX_SUBPKG_PYTHON_RUNTIME_DEPS` (for subpkg) value.
> How to add a new Python package after this?
Everything is the same, except, now, this block is no longer necessary in `build.sh`.
```bash
termux_step_create_debscripts() {
cat <<- EOF > ./postinst
#!$TERMUX_PREFIX/bin/sh
echo "Installing dependencies through pip..."
pip3 install ${TERMUX_PKG_PYTHON_TARGET_DEPS//, / }
EOF
}
```
- Instead, `scripts/build/termux_step_create_python_debscripts.sh` can now detect the presence of `pip` package lists in `$TERMUX_PKG_PYTHON_TARGET_DEPS`, `$TERMUX_SUBPKG_PYTHON_TARGET_DEPS`, and the `METADATA` file of the Python package if it exists, and automatically insert them as a block into the `postinst` script for all relevant packages.
- `$TERMUX_PKG_PYTHON_TARGET_DEPS` is used for `pip` dependencies that are both on-device build-time and on-device run-time dependencies, and `$TERMUX_PKG_PYTHON_RUNTIME_DEPS` is used for runtime-only `pip` dependencies. `$TERMUX_PKG_PYTHON_RUNTIME_DEPS` overrides `$TERMUX_PKG_PYTHON_TARGET_DEPS` for runtime dependencies,
- i.e. if `TERMUX_PKG_PYTHON_RUNTIME_DEPS` is not specified, but `TERMUX_PKG_PYTHON_TARGET_DEPS` is, then `TERMUX_PKG_PYTHON_TARGET_DEPS` will be used as both on-device build and on-device runtime dependencies,
- but if `TERMUX_PKG_PYTHON_RUNTIME_DEPS` is specified, then `TERMUX_PKG_PYTHON_TARGET_DEPS`, if specified, is used only for on-device build-time dependencies.
- If `python-pip` is not already in the dependencies of any package that needs it, the build will fail with an error instructing maintainers to add `python-pip` to the dependencies of the package that needs it.
Co-authored-by: Maxython <mixython@gmail.com>
142 lines
3.2 KiB
Diff
142 lines
3.2 KiB
Diff
This reverts f70215d4e6af2a1b5a0cc232460e2f86125b055d
|
|
|
|
--- a/cmake/external/abseil-cpp.cmake
|
|
+++ b/cmake/external/abseil-cpp.cmake
|
|
@@ -36,7 +36,7 @@ onnxruntime_fetchcontent_declare(
|
|
URL_HASH SHA1=${DEP_SHA1_abseil_cpp}
|
|
EXCLUDE_FROM_ALL
|
|
PATCH_COMMAND ${ABSL_PATCH_COMMAND}
|
|
- FIND_PACKAGE_ARGS 20250512 NAMES absl
|
|
+ FIND_PACKAGE_ARGS NAMES absl
|
|
)
|
|
|
|
onnxruntime_fetchcontent_makeavailable(abseil_cpp)
|
|
@@ -57,96 +57,45 @@
|
|
# TODO: since multiple ORT's dependencies depend on Abseil, the list below would vary from version to version.
|
|
# We'd better to not manually manage the list.
|
|
set(ABSEIL_LIBS
|
|
-absl::absl_log
|
|
-absl::log_internal_log_impl
|
|
-absl::log_internal_strip
|
|
-absl::log_internal_message
|
|
-absl::log_internal_format
|
|
-absl::synchronization
|
|
-absl::str_format
|
|
-absl::flags
|
|
-absl::log_internal_globals
|
|
-absl::kernel_timeout_internal
|
|
-absl::str_format_internal
|
|
-absl::hash
|
|
-absl::log_internal_append_truncated
|
|
-absl::absl_vlog_is_on
|
|
-absl::flags_commandlineflag
|
|
-absl::time
|
|
-absl::symbolize
|
|
-absl::graphcycles_internal
|
|
-absl::log_internal_conditions
|
|
-absl::strings
|
|
-absl::malloc_internal
|
|
-absl::demangle_internal
|
|
-absl::optional
|
|
-absl::stacktrace
|
|
absl::base
|
|
-absl::demangle_rust
|
|
-absl::bad_optional_access
|
|
-absl::strings_internal
|
|
+absl::bits
|
|
+absl::city
|
|
+absl::civil_time
|
|
+absl::config
|
|
+absl::core_headers
|
|
absl::debugging_internal
|
|
-absl::int128
|
|
-absl::spinlock_wait
|
|
-absl::decode_rust_punycode
|
|
-absl::raw_logging_internal
|
|
-absl::flat_hash_set
|
|
+absl::demangle_internal
|
|
+absl::fixed_array
|
|
+absl::flags
|
|
absl::flat_hash_map
|
|
+absl::flat_hash_set
|
|
+absl::graphcycles_internal
|
|
+absl::hash
|
|
+absl::inlined_vector
|
|
+absl::int128
|
|
+absl::kernel_timeout_internal
|
|
+absl::log_severity
|
|
+absl::malloc_internal
|
|
absl::node_hash_map
|
|
absl::node_hash_set
|
|
-absl::compare
|
|
-absl::base_internal
|
|
absl::nullability
|
|
-absl::bounded_utf8_length_sequence
|
|
-absl::log_severity
|
|
-absl::type_traits
|
|
-absl::atomic_hook
|
|
-absl::bits
|
|
-absl::flags_commandlineflag_internal
|
|
-absl::hash_container_defaults
|
|
absl::numeric_representation
|
|
-absl::node_slot_policy
|
|
-absl::core_headers
|
|
-absl::dynamic_annotations
|
|
-absl::utf8_for_code_point
|
|
-absl::errno_saver
|
|
-absl::absl_check
|
|
-absl::hash_function_defaults
|
|
-absl::function_ref
|
|
-absl::city
|
|
-absl::low_level_hash
|
|
-absl::fixed_array
|
|
-absl::variant
|
|
-absl::meta
|
|
-absl::log_internal_voidify
|
|
-absl::log_sink
|
|
-absl::log_internal_log_sink_set
|
|
-absl::log_sink_registry
|
|
-absl::log_entry
|
|
-absl::log_globals
|
|
-absl::log_internal_nullguard
|
|
-absl::examine_stack
|
|
-absl::inlined_vector
|
|
-absl::log_internal_proto
|
|
-absl::strerror
|
|
-absl::log_internal_config
|
|
-absl::raw_hash_map
|
|
+absl::optional
|
|
absl::raw_hash_set
|
|
-absl::container_memory
|
|
-absl::algorithm_container
|
|
+absl::raw_logging_internal
|
|
absl::span
|
|
-absl::log_internal_nullstream
|
|
-absl::vlog_config_internal
|
|
-absl::flags_reflection
|
|
-absl::flags_internal
|
|
-absl::flags_config
|
|
-absl::fast_type_id
|
|
-absl::utility
|
|
-absl::time_zone
|
|
-absl::civil_time
|
|
+absl::spinlock_wait
|
|
+absl::stacktrace
|
|
+absl::str_format
|
|
+absl::str_format_internal
|
|
+absl::string_view
|
|
absl::string_view
|
|
+absl::strings
|
|
+absl::strings_internal
|
|
+absl::symbolize
|
|
+absl::synchronization
|
|
absl::throw_delegate
|
|
-absl::memory
|
|
-absl::charset
|
|
-absl::endian
|
|
-absl::config)
|
|
+absl::time
|
|
+absl::time_zone
|
|
+absl::type_traits
|
|
+absl::utility)
|