Page 2 of 2

Re: Upgrade Help ... sabctools ... OSMC

Posted: June 16th, 2023, 7:47 am
by chewiesw
apologies I haven't had time to look at this yet. Wify keeps asking "Whatca doing...? at this point it is easier to say I am watching Taylor Swift videos. I will have a go this weekend.

Re: Upgrade Help ... sabctools ... OSMC

Posted: June 16th, 2023, 7:52 am
by sander
chewiesw wrote: June 16th, 2023, 7:47 am apologies I haven't had time to look at this yet. Wify keeps asking "Whatca doing...? at this point it is easier to say I am watching Taylor Swift videos. I will have a go this weekend.
Taylor Swift videos? That's more interesting indeed! ;)

... Taylor Swift makes videos? Or do you mean music video's?

Re: Upgrade Help ... sabctools ... OSMC

Posted: June 16th, 2023, 10:37 am
by chewiesw
sander wrote: June 14th, 2023, 3:16 pm OK, I tried on my Ubuntu on ARM, with jcfp's PPA set up, and it works automagically:

Code: Select all

Get:1 https://ppa.launchpadcontent.net/jcfp/nobetas/ubuntu jammy/main arm64 python3-sabctools arm64 7.0.1-0ubuntu1~jcfp1~22.04 [28.7 kB]
Get:2 https://ppa.launchpadcontent.net/jcfp/nobetas/ubuntu jammy/main arm64 sabnzbdplus all 4.0.2-0ubuntu1~jcfp1~22.04 [740 kB]
And

Code: Select all

2023-06-14 22:15:39,750::INFO::[sabnzbdplus:1173] sabnzbdplus-4.0.2
...
2023-06-14 22:15:40,457::INFO::[sabnzbdplus:426] SABCTools module (v7.0.1)... found!
2023-06-14 22:15:40,459::INFO::[sabnzbdplus:427] SABCTools module is using SIMD set: NEON
2023-06-14 22:15:40,460::INFO::[sabnzbdplus:428] SABCTools module is linked to OpenSSL: True

So most easy is to setup jcfp's PPA.

If / as that does not work for you, see my next post.
Ok so I have updated my jcfp ppa and I seem to get a little further

osmc@HDPVR:~$ sudo apt-get install sabnzbdplus
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
sabnzbdplus : Depends: python3-puremagic but it is not installable
Depends: python3-sabctools (>= 7.0.0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
osmc@HDPVR:~$ python3 -m pip install puremagic
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: puremagic in ./.local/lib/python3.9/site-packages (1.15)
osmc@HDPVR:~$

Re: Upgrade Help ... sabctools ... OSMC

Posted: June 16th, 2023, 11:08 am
by sander
Dependency hell.

Go the venv route

Re: Upgrade Help ... sabctools ... OSMC

Posted: June 16th, 2023, 12:16 pm
by chewiesw
Sander thanks for your help but it didn't work. loads of red when ( I have had to remove some of the output)

(venv-sabnzbd) osmc@HDPVR:~$ python3 -m pip install -r /home/osmc/SABnzbd-4.0.1/requirements.txt
Ignoring pywin32: markers 'sys_platform == "win32"' don't match your environment
Ignoring pyobjc: markers 'sys_platform == "darwin"' don't match your environment
Collecting sabctools==7.0.2
Using cached sabctools-7.0.2.tar.gz (234 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting cheetah3==3.2.6.post1
Using cached Cheetah3-3.2.6.post1.tar.gz (295 kB)
Collecting cffi==1.15.1
Using cached cffi-1.15.1.tar.gz (508 kB)
Collecting pycparser==2.21
Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting feedparser==6.0.10
Using cached feedparser-6.0.10-py3-none-any.whl (81 kB)
Collecting configobj==5.0.8
Using cached configobj-5.0.8-py2.py3-none-any.whl (36 kB)
Collecting cheroot==9.0.0
Using cached cheroot-9.0.0-py2.py3-none-any.whl (100 kB)
Collecting six==1.16.0
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting cherrypy==18.8.0
Using cached CherryPy-18.8.0-py2.py3-none-any.whl (348 kB)
Collecting jaraco.functools==3.6.0
Using cached jaraco.functools-3.6.0-py3-none-any.whl (7.9 kB)
Collecting jaraco.collections==4.1.0
Using cached jaraco.collections-4.1.0-py3-none-any.whl (11 kB)
Collecting jaraco.text==3.8.1
Using cached jaraco.text-3.8.1-py3-none-any.whl (10 kB)
Collecting jaraco.classes==3.2.3
Using cached jaraco.classes-3.2.3-py3-none-any.whl (6.0 kB)
Collecting jaraco.context==4.3.0
Using cached jaraco.context-4.3.0-py3-none-any.whl (5.3 kB)
Collecting more-itertools==9.1.0
Using cached more_itertools-9.1.0-py3-none-any.whl (54 kB)
Collecting zc.lockfile==3.0.post1
Using cached zc.lockfile-3.0.post1-py3-none-any.whl (9.8 kB)
Collecting python-dateutil==2.8.2
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting tempora==5.2.2
Using cached tempora-5.2.2-py3-none-any.whl (13 kB)
Collecting pytz==2023.3
Using cached pytz-2023.3-py2.py3-none-any.whl (502 kB)
Collecting sgmllib3k==1.0.0
Using cached sgmllib3k-1.0.0-py3-none-any.whl
Collecting portend==3.1.0
Using cached portend-3.1.0-py3-none-any.whl (5.3 kB)
Collecting chardet==5.1.0
Using cached chardet-5.1.0-py3-none-any.whl (199 kB)
Collecting PySocks==1.7.1
Using cached PySocks-1.7.1-py3-none-any.whl (16 kB)
Collecting puremagic==1.15
Using cached puremagic-1.15-py3-none-any.whl (32 kB)
Collecting guessit==3.7.1
Using cached guessit-3.7.1-py3-none-any.whl (170 kB)
Collecting babelfish==0.6.0
Using cached babelfish-0.6.0-py3-none-any.whl (93 kB)
Collecting rebulk==3.2.0
Using cached rebulk-3.2.0-py3-none-any.whl (56 kB)
Collecting cryptography==40.0.2
Using cached cryptography-40.0.2.tar.gz (625 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting ujson==5.7.0
Using cached ujson-5.7.0.tar.gz (7.2 MB)
Installing build dependencies ... done
WARNING: Missing build requirements in pyproject.toml for ujson==5.7.0 from https://files.pythonhosted.org/packages ... f2bcf37b23 (from -r /home/osmc/SABnzbd-4.0.1/requirements.txt (line 37)).
WARNING: The project does not specify a build backend, and pip cannot fall back to setuptools without 'wheel'.
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing wheel metadata ... done
Collecting notify2==0.3.1
Using cached notify2-0.3.1-py2.py3-none-any.whl (8.0 kB)
Requirement already satisfied: setuptools in ./venv-sabnzbd/lib/python3.9/site-packages (from zc.lockfile==3.0.post1->-r /home/osmc/SABnzbd-4.0.1/requirements.txt (line 18)) (44.1.1)
Using legacy 'setup.py install' for cffi, since package 'wheel' is not installed.
Using legacy 'setup.py install' for cheetah3, since package 'wheel' is not installed.
Building wheels for collected packages: cryptography, sabctools, ujson
Building wheel for cryptography (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /home/osmc/venv-sabnzbd/bin/python3 /tmp/tmp4f8ircn2_in_process.py build_wheel /tmp/tmpggzfyauw
cwd: /tmp/pip-install-ytutni0l/cryptography_520943f365f9422facf491559b2da12d
Complete output (248 lines):


running egg_info
writing src/cryptography.egg-info/PKG-INFO
writing dependency_links to src/cryptography.egg-info/dependency_links.txt
writing requirements to src/cryptography.egg-info/requires.txt
writing top-level names to src/cryptography.egg-info/top_level.txt
reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files found matching 'vectors'
warning: no previously-included files matching '*' found under directory 'vectors'
warning: no previously-included files matching '*' found under directory '.github'
warning: no previously-included files found matching 'release.py'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'ci-constraints-requirements.txt'
warning: no previously-included files found matching 'mypy.ini'
adding license file 'LICENSE'
adding license file 'LICENSE.APACHE'
adding license file 'LICENSE.BSD'
adding license file 'LICENSE.PSF'
writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
/tmp/pip-build-env-fh95kfl2/overlay/lib/python3.9/site-packages/setuptools/command/build_py.py:201: _Warning: Package 'cryptography.hazmat.bindings._rust' is absent from the `packages` configuration.
!!

********************************************************************************
############################
# Package would be ignored #
############################
Python recognizes 'cryptography.hazmat.bindings._rust' as an importable package[^1],
but it is absent from setuptools' `packages` configuration.

This leads to an ambiguous overall configuration. If you want to distribute this
package, please make sure that 'cryptography.hazmat.bindings._rust' is explicitly added
to the `packages` configuration field.

Alternatively, you can also rely on setuptools' discovery methods
(for example by using `find_namespace_packages(...)`/`find_namespace:`
instead of `find_packages(...)`/`find:`).

You can read more about "package discovery" on setuptools documentation page:

- https://setuptools.pypa.io/en/latest/us ... overy.html

If you don't want 'cryptography.hazmat.bindings._rust' to be distributed and are
already explicitly excluding 'cryptography.hazmat.bindings._rust' via
`find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
you can try to use `exclude_package_data`, or `include-package-data=False` in
combination with a more fine grained `package-data` configuration.

You can read more about "package data files" on setuptools documentation page:

- https://setuptools.pypa.io/en/latest/us ... files.html


[^1]: For Python, any directory (with suitable naming) can be imported,
even if it does not contain any `.py` files.
On the other hand, currently there is no concept of package data
directory, all directories are treated like packages.
********************************************************************************

!!
check.warn(importable)
/tmp/pip-build-env-fh95kfl2/overlay/lib/python3.9/site-packages/setuptools/command/build_py.py:201: _Warning: Package 'cryptography.hazmat.bindings._rust.openssl' is absent from the `packages` configuration.
!!

********************************************************************************
############################
# Package would be ignored #
############################
Python recognizes 'cryptography.hazmat.bindings._rust.openssl' as an importable package[^1],
but it is absent from setuptools' `packages` configuration.

This leads to an ambiguous overall configuration. If you want to distribute this
package, please make sure that 'cryptography.hazmat.bindings._rust.openssl' is explicitly added
to the `packages` configuration field.

Alternatively, you can also rely on setuptools' discovery methods
(for example by using `find_namespace_packages(...)`/`find_namespace:`
instead of `find_packages(...)`/`find:`).

You can read more about "package discovery" on setuptools documentation page:

- https://setuptools.pypa.io/en/latest/us ... overy.html

If you don't want 'cryptography.hazmat.bindings._rust.openssl' to be distributed and are
already explicitly excluding 'cryptography.hazmat.bindings._rust.openssl' via
`find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
you can try to use `exclude_package_data`, or `include-package-data=False` in
combination with a more fine grained `package-data` configuration.

You can read more about "package data files" on setuptools documentation page:

- https://setuptools.pypa.io/en/latest/us ... files.html


[^1]: For Python, any directory (with suitable naming) can be imported,
even if it does not contain any `.py` files.
On the other hand, currently there is no concept of package data
directory, all directories are treated like packages.
********************************************************************************

!!
check.warn(importable)
copying src/cryptography/py.typed -> build/lib.linux-aarch64-cpython-39/cryptography
creating build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings/_rust
copying src/cryptography/hazmat/bindings/_rust/__init__.pyi -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings/_rust
copying src/cryptography/hazmat/bindings/_rust/_openssl.pyi -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings/_rust
copying src/cryptography/hazmat/bindings/_rust/asn1.pyi -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings/_rust
copying src/cryptography/hazmat/bindings/_rust/ocsp.pyi -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings/_rust
copying src/cryptography/hazmat/bindings/_rust/pkcs7.pyi -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings/_rust
copying src/cryptography/hazmat/bindings/_rust/x509.pyi -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings/_rust
creating build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings/_rust/openssl
copying src/cryptography/hazmat/bindings/_rust/openssl/__init__.pyi -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings/_rust/openssl
copying src/cryptography/hazmat/bindings/_rust/openssl/x25519.pyi -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings/_rust/openssl
running build_ext
running build_rust
error: command failed: 'rustc': No such file or directory (os error 2)

=============================DEBUG ASSISTANCE=============================
If you are seeing a compilation error please try the following steps to
successfully install cryptography:
1) Upgrade to the latest pip and try again. This will fix errors for most
users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
2) Read https://cryptography.io/en/latest/installation/ for specific
instructions for your platform.
3) Check our frequently asked questions for more information:
https://cryptography.io/en/latest/faq/
4) Ensure you have a recent Rust toolchain installed:
https://cryptography.io/en/latest/installation/#rust

Python: 3.9.2
platform: Linux-5.15.83-2-osmc-aarch64-with-glibc2.31
pip: n/a
setuptools: 67.8.0
setuptools_rust: 1.6.0
rustc: n/a
=============================DEBUG ASSISTANCE=============================

error: can't find Rust compiler

If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.

To update pip, run:

pip install --upgrade pip

and then retry package installation.

If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.

This package requires Rust >=1.48.0.
----------------------------------------
ERROR: Failed building wheel for cryptography
Building wheel for sabctools (PEP 517) ... done
Created wheel for sabctools: filename=sabctools-7.0.2-cp39-cp39-linux_aarch64.whl size=190171 sha256=120f878337271a79d479fb888187e0a4b58ef0eeb0144c985ec314f48b599aba
Stored in directory: /home/osmc/.cache/pip/wheels/75/06/10/44ed56c53ab16ac9ef8b076c177835ab804febd93953f9ea3d
Building wheel for ujson (PEP 517) ... done
Created wheel for ujson: filename=ujson-5.7.0-cp39-cp39-linux_aarch64.whl size=42574 sha256=eb3f02e8bacc950ce1455cf7d7354a8bc512e9735a4cb5e10a3115309813b521
Stored in directory: /home/osmc/.cache/pip/wheels/6f/02/55/459e764a06847deba8cee4a5f64da4e931a9abfa8589bbde64
Successfully built sabctools ujson
Failed to build cryptography
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

Re: Upgrade Help ... sabctools ... OSMC

Posted: June 16th, 2023, 2:27 pm
by sander
This is the problem: "error: command failed: 'rustc': No such file or directory (os error 2)". You need a rust compiler for the module cryptography.

But: I give up. I thought that the python modules (also the binary ones) would be readily available for Linux on ARM (without compiling), as tested on my Linux on ARM64. Apparently not.