You are not logged in.
I am trying to create a PKGBUILD to submit to the AUR for the following package:
https://github.com/mps-youtube/yewtube
While I can get the package to build and install fine, the program won't run. Inspecting the error messages has led me to discover yewtube requires a version of python-rfc3986 earlier than 2.0, which is the version that's in the Arch repos.
What's my best course of action here? Is there anything I can do on my end to create a fully working PKGBUILD, or should I message the developer and hope they update their program to use the latest version?
Last edited by mbc (2023-03-06 15:49:46)
Offline
Please post the PKGBUILD plus the commands you used to produce the issue and its output. I can not see any reference to rfc3986 in a git checkout of yewtube.
Offline
Please post the PKGBUILD plus the commands you used to produce the issue and its output. I can not see any reference to rfc3986 in a git checkout of yewtube.
Here's the PKGBUILD I wrote, minus the Maintainer line:
pkgname=yewtube
pkgver=2.9.4
pkgrel=1
pkgdesc="terminal-based YouTube player and downloader. No YouTube API key required."
arch=('any')
url="https://github.com/mps-youtube/yewtube"
license=('GPLv3')
depends=('python>=3.6' 'python-httpx' 'python-brotli' 'python-pycryptodomex' 'python-charset-normalizer' 'python-websockets' 'python-pyperclip' 'dbus-python>=1.2.18' 'python-gobject>=3.42.0' 'youtube-search-python>=1.6.5' 'yt-dlp')
source=("$pkgname-$pkgver.tar.gz::https://github.com/mps-youtube/yewtube/archive/refs/tags/v$pkgver.tar.gz")
makedepends=('python-setuptools')
sha256sums=('f31d43b6ea3a44234e7e0a5c31822e40fbae66362234fdaca0cf492f773bdee0')
build() {
cd "${pkgname}-${pkgver}"
python setup.py build
}
package() {
cd "${pkgname}-${pkgver}"
python setup.py install --root="$pkgdir" --optimize=1 --skip-build
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
When I run the binary /usr/bin/yt, here is what I think is the relevant line :
pip._vendor.pkg_resources.DistributionNotFound: The 'rfc3986[idna2008]<2,>=1.3' distribution was not found and is required by httpx
Here's the full traceback:
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py", line 583, in _build_master
ws.require(__requires__)
File "/usr/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py", line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pip._vendor.pkg_resources.ContextualVersionConflict: (rfc3986 2.0.0 (/usr/lib/python3.10/site-packages), Requirement.parse('rfc3986[idna2008]<2,>=1.3'), {'httpx'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/yt", line 33, in <module>
sys.exit(load_entry_point('yewtube==2.9.4', 'console_scripts', 'yt')())
File "/usr/bin/yt", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3.10/site-packages/mps_youtube/__init__.py", line 1, in <module>
from pip._vendor import pkg_resources
File "/usr/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3252, in <module>
def _initialize_master_working_set():
File "/usr/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3235, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py", line 585, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py", line 598, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python3.10/site-packages/pip/_vendor/pkg_resources/__init__.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pip._vendor.pkg_resources.DistributionNotFound: The 'rfc3986[idna2008]<2,>=1.3' distribution was not found and is required by httpx
Also, to test, I installed yewtube via pip in a clean virtual environment, and was able to run it successfully.
Last edited by mbc (2023-03-05 23:22:23)
Offline
The requirement is coming from python-httpx. You could raise a bug on the Arch bug tracker about the issue. Or you could wait for a new release which includes https://github.com/encode/httpx/commit/ … 01c93d31f3
Edit:
I had to add python-pip python-requests python-mutagen to the depends in order to reproduce the issue.
Last edited by loqs (2023-03-05 23:56:34)
Offline
thanks, I'll open up an issue, but it looks like I'll probably just have to wait for a new release of python-httpx.
Offline
Try rebuilding python-httpx with the diff below applied and see if it fixes the issue, if it does it might help get the bug report resolved
diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD
index 76c1a7d..0ca0a76 100644
--- a/trunk/PKGBUILD
+++ b/trunk/PKGBUILD
@@ -37,6 +37,9 @@ prepare() {
# disable -Werror, which often causes failures due to newer dependencies in Arch
sed -i '/\berror\b/d' setup.cfg
+
+ #remove upper bounds on module requirements
+ sed -i -e 's/>=0.15.0,<0.17.0/>=0.15.0/' -e 's/>=1.3,<2/>=1.3/' pyproject.toml
}
build() {
Offline
applied the diff, but now I'm getting a different error:
Traceback (most recent call last):
File "/usr/bin/yt", line 33, in <module>
sys.exit(load_entry_point('yewtube==2.9.4', 'console_scripts', 'yt')())
File "/usr/bin/yt", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 173, in load
return functools.reduce(getattr, attrs, module)
AttributeError: module 'mps_youtube' has no attribute 'main'
Offline
I would start a new issue for the AttributeError.
Offline