Package Details: python-primp 1.1.2-1

Git Clone URL: https://aur.archlinux.org/python-primp.git (read-only, click to copy)
Package Base: python-primp
Description: HTTP client that can impersonate web browsers.
Upstream URL: https://github.com/deedy5/primp
Licenses: MIT
Submitter: Junker
Maintainer: medaminezghal
Last Packager: medaminezghal
Votes: 5
Popularity: 1.72
First Submitted: 2024-09-07 11:16 (UTC)
Last Updated: 2026-03-02 09:47 (UTC)

Latest Comments

1 2 Next › Last »

marmis commented on 2026-02-26 22:31 (UTC) (edited on 2026-02-26 22:31 (UTC) by marmis)

@medaminezghal Version 1.1.1 builds in a clean chroot without git, clang and cmake and without any issue too. Thanks!

marmis commented on 2026-02-06 21:42 (UTC)

@medaminezghal I noticed now that you removed them. Do you build the package in a way that avoid git, clang and cmake requirements? You could add these instructions to the PKGBUILD, if so. The current instructions use them while building boring-sys2 for rquest.

marmis commented on 2026-01-31 00:44 (UTC)

@medaminezghal the package cannot be built without them. You can check it with either pkgctl build:

$ git clone https://aur.archlinux.org/python-primp.git
$ pkgctl build python-primp/
...
  --- stderr

  thread 'main' (4980) panicked at /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/boring-sys2-4.15.11/build/main.rs:570:44:
  called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
...

Or with OCI:

Dockerfile
# syntax=docker/dockerfile:1
FROM docker.io/archlinux/archlinux:base-devel

# makepkg requires a non-root user with sudo
RUN --mount=type=cache,target=/var/cache/pacman,sharing=locked \
    <<EOF
set -eux
pacman -Syu --noconfirm sudo
useradd --create-home --password '<invalid>' packager
echo 'packager ALL=(ALL:ALL) NOPASSWD: ALL' >> /etc/sudoers.d/nopasswd
EOF

# download and build package
ADD --chown=packager:packager https://aur.archlinux.org/python-primp.git /src
WORKDIR /src
USER packager:packager
RUN --mount=type=cache,target=/var/cache/pacman,sharing=locked \
    makepkg -sicr --noconfirm
*Output is the same.*

medaminezghal commented on 2026-01-30 19:30 (UTC)

@marmis Why should I add them?

marmis commented on 2026-01-25 18:14 (UTC) (edited on 2026-01-25 19:10 (UTC) by marmis)

Nevermind. I was editing and building different PKGBUILDs. I'm now able to build in a clean chroot with makepends=(... 'git' 'clang' 'cmake'). @medaminezghal could you maybe add those dependencies to your PKGBUILD?

marmis commented on 2026-01-25 18:05 (UTC)

I can't build this in a clean chroot anymore:

  thread 'main' (5088) panicked at /build/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/boring-sys2-4.15.11/build/main.rs:570:44:
  called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The error is on https://github.com/0x676e67/boring2/blob/v4.15.11/boring-sys/build/main.rs#L570, caused by an unwrap on ensure_patches_applied(), which executes git internally. So I tried to add git to makedepends, but still got the same error.

I can build it outside of a chroot, that's why I think this might be missing dependencies.

megian commented on 2026-01-25 11:47 (UTC)

@arzeth your comment was misleading on my setup. Whenever I tried to force using clang I god an liker error.

I haven't used mold either.

My default compiler is GCC:

$ cc --version
cc (GCC) 15.2.1 20260103
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ c++ --version
c++ (GCC) 15.2.1 20260103
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

However without clang installed I got:

  thread 'main' (470953) panicked at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bindgen-0.70.1/lib.rs:622:27:
  Unable to find libclang: "couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-*.so', 'libclang.so.*', 'libclang-*.so.*'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"
pacman -S clang

So I guess clang should be in the dependency list.

Without mold, but with clang installed. I got it compiled and linked. However I couldn't pass the pytest.

diff --git a/PKGBUILD b/PKGBUILD
index 3184411..64c006c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,7 +10,7 @@ arch=('x86_64' 'aarch64')
 license=('MIT')
 url='https://github.com/deedy5/primp'
 depends=('python' 'glibc' 'gcc-libs')
-makedepends=('python-maturin' 'python-build' 'python-installer' 'python-wheel' 'mold')
+makedepends=('python-maturin' 'python-build' 'python-installer' 'python-wheel')
 checkdepends=('python-certifi' 'python-pytest' 'python-pytest-asyncio')
 options=(!strip lto)
 source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/${_name//-/_}-$pkgver.tar.gz")
@@ -24,7 +24,6 @@ prepare(){

 build(){
        cd "$srcdir"/$_name-$pkgver
-       export RUSTFLAGS="$RUSTFLAGS -Clink-arg=-fuse-ld=mold"
        python -m build --wheel --no-isolation
 }

@@ -35,7 +34,7 @@ check(){
        cd "$srcdir"/$_name-$pkgver
        python -m venv --system-site-packages test-env
        test-env/bin/python -m installer dist/*.whl
-       test-env/bin/python -P -m pytest "${pytest_options[@]}" tests
+       #test-env/bin/python -P -m pytest "${pytest_options[@]}" tests
 }

The pytest failed with:

$ test-env/bin/python -P -m pytest "${pytest_options[@]}" tests
=============================================================================================================================================================== test session starts ===============================================================================================================================================================
platform linux -- Python 3.14.2, pytest-8.4.2, pluggy-1.6.0
rootdir: /home/megian/crash/python-primp/src/primp-0.15.0
configfile: pyproject.toml
plugins: asyncio-1.3.0, respx-0.22.0, anyio-4.12.1
asyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collected 0 items / 4 errors                                                                                                                                                                                                                                                                                                                      

===================================================================================================================================================================== ERRORS ======================================================================================================================================================================
___________________________________________________________________________________________________________________________________________________ ERROR collecting tests/test_asyncclient.py ____________________________________________________________________________________________________________________________________________________
ImportError while importing test module '/home/megian/crash/python-primp/src/primp-0.15.0/tests/test_asyncclient.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.14/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/test_asyncclient.py:5: in <module>
    import primp
test-env/lib/python3.14/site-packages/primp/__init__.py:14: in <module>
    from .primp import RClient
E   ImportError: /home/megian/crash/python-primp/src/primp-0.15.0/test-env/lib/python3.14/site-packages/primp/primp.abi3.so: undefined symbol: CRYPTO_library_init

arzeth commented on 2026-01-13 08:15 (UTC) (edited on 2026-01-13 08:16 (UTC) by arzeth)

I had to replace that export RUSTFLAGS line with:

    export CC="clang"
    export CXX="clang++"
    export RUSTFLAGS="$RUSTFLAGS -Clink-arg=-fuse-ld=mold -Clink-arg=-flto"

because after

Building [=======================> ] 273/274: primp

I was getting

error: linking with `/usr/bin/clang` failed: exit status: 1

= note: mold: fatal: /tmp/yay-arzeth/python-primp/src/primp-0.15.0/target/release/build/serde-49c5aeb9f0780b47/build_script_build-49c5aeb9f0780b47.build_script_build.e765d7259e22f6b1-cgu.0.rcgu.o: unable to handle this LTO object file because the -plugin option was not provided. Please make sure you added -flto not only when creating object files but also when linking the final executable.

medaminezghal commented on 2025-09-23 10:57 (UTC)

@haxibami The solution didn't work for primp 0.15.0

Magi3r commented on 2025-03-19 17:54 (UTC)

Thanks! Should be fixed now.