惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
云风的 BLOG
云风的 BLOG
IT之家
IT之家
C
Check Point Blog
T
The Blog of Author Tim Ferriss
S
SegmentFault 最新的问题
人人都是产品经理
人人都是产品经理
H
Hackread – Cybersecurity News, Data Breaches, AI and More
美团技术团队
M
MIT News - Artificial intelligence
Jina AI
Jina AI
Blog — PlanetScale
Blog — PlanetScale
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
F
Fortinet All Blogs
V
Visual Studio Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
MyScale Blog
MyScale Blog
爱范儿
爱范儿
The Cloudflare Blog
博客园 - 三生石上(FineUI控件)

AUR Newest Packages

AUR (en) - linuxqq-clipsync-git AUR (en) - libtslitex-git AUR (en) - libtslitex-git AUR (en) - carton-appimage AUR (en) - veila-git AUR (en) - veila-bin AUR (en) - vigil-baseline AUR (en) - byedroid AUR (en) - neovim-base16-git AUR (en) - pirata AUR (en) - rpi-imager-git-non-root AUR (en) - python-fastapi-sso AUR (en) - tmux-ai-titles AUR (en) - zeed-bin AUR (en) - bclone-bin AUR (en) - dwl-git-azerty AUR (en) - auggie-bin AUR (en) - libspatialaudio-git AUR (en) - libspatialaudio AUR (en) - miniupnpd-iptables-legacy AUR (en) - miniupnpd-nft AUR (en) - jeeves-bin AUR (en) - opennow AUR (en) - rotki AUR (en) - kapi-bin AUR (en) - classfi-bin AUR (en) - classfi-git AUR (en) - classfi AUR (en) - giff-git AUR (en) - budget-tracker-bin
AUR (en) - python-gradio
2026-06-15 · via AUR Newest Packages

snigurmd commented on 2025-12-29 08:54 (UTC) (edited on 2025-12-29 09:51 (UTC) by snigurmd)

Python-gradio and python-gradio-client have circular dependency. Unable to install from scratch.

Maziar commented on 2025-12-27 16:17 (UTC)

can use it instead use pnpm & current seems work

# Maintainer: Mohamed Amine Zghal (medaminezghal) <medaminezghal at outlook dot com>

_name=gradio
pkgname=python-$_name
pkgver=6.0.2
pkgrel=1
pkgdesc='Python library for easily interacting with trained machine learning models.'
arch=('any')
url='https://github.com/gradio-app/gradio'
license=('Apache-2.0')
depends=('python' 'python-aiofiles' 'python-anyio' 'python-brotli' 'python-fastapi' 'python-ffmpy' 'python-groovy' 'python-gradio-client' 'python-httpx' 'python-huggingface-hub' 'python-jinja' 'python-markupsafe' 'python-numpy' 'python-orjson' 'python-packaging' 'python-pandas' 'python-pillow' 'python-pydantic' 'python-python-multipart' 'python-pydub' 'python-pyyaml' 'python-safehttpx' 'python-semantic-version' 'python-starlette' 'python-tomlkit' 'python-typer' 'python-typing_extensions' 'uvicorn')
makedepends=('python-hatchling' 'python-hatch-requirements-txt' 'python-hatch-fancy-pypi-readme' 'python-build' 'python-installer' 'python-wheel' 'pnpm')
checkdepends=('ipython' 'python-altair' 'python-boto3' 'python-gradio-pdf' 'python-matplotlib' 'python-hypothesis' 'jupyter-nbformat' 'python-openai' 'python-polars' 'python-email-validator' 'python-pytest' 'python-pytest-asyncio' 'python-pytest-rerunfailures' 'python-respx' 'python-scikit-image' 'python-pytorch' 'python-tqdm' 'python-transformers' 'python-vega_datasets' 'python-diffusers' 'python-mcp' 'python-tf-keras' 'python-itsdangerous')
optdepends=('python-authlib: oauth' 'python-itsdangerous: oauth' 'python-mcp: mcp' 'python-pydantic: mcp' 'ruff: needed for custom component docs generation')
source=("$url/archive/refs/tags/$_name@$pkgver.tar.gz")
sha256sums=('2162b735193be26637ecb4aa830fc73cabc0f8b92822a260a1a10b18752d2620')

prepare(){
  cd "$srcdir"/$_name-$_name-$pkgver
  rm -rf test/test_docker # Remove tests that need docker
}

build() {
  cd "$srcdir"/$_name-$_name-$pkgver
  export PNPM_HOME="$srcdir/pnpm"
  export PATH="$PNPM_HOME:$PATH"
  pnpm config set store-dir "$srcdir/pnpm-store"
  pnpm i --frozen-lockfile --ignore-scripts
  NODE_OPTIONS="--max-old-space-size=8192" pnpm build
  PYTHONPATH=$PWD python -c "import gradio"
  python -m build --wheel --no-isolation
}

check() {
  local pytest_options=(
    -vv
    --disable-warnings
    # Need HuggingFace token
    --deselect test/test_buttons.py::TestOAuthButtons::test_login_button_warns_when_not_on_spaces
    --deselect test/test_external.py
    # Need to be fixed by developers
    --deselect test/test_pipelines.py
  )
  cd "$srcdir"/$_name-$_name-$pkgver
  ulimit -n 16384
  PYTHONPATH=$PWD:$PWD/client/python pytest "${pytest_options[@]}" test
}

package() {
  cd "$srcdir"/$_name-$_name-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
}

vcalv commented on 2025-06-28 19:07 (UTC)

Much better but I believe the function you should be using is also pre_upgrade and not only post_remove.

But it's all good, the upgrade will fail.

The conflicting files will the part of the output and the user just has to delete them manually.

Next version upgrade you can just delete the entire install script.

Thank you for your work.

medaminezghal commented on 2025-06-28 08:32 (UTC)

@vcalv What about the changes in new version?

medaminezghal commented on 2025-06-22 10:44 (UTC)

@vcalv I toltally agree.

I will do what you suggest and I'm gonnat let the post-delete delete the hash_seed.txt file.

vcalv commented on 2025-06-21 19:49 (UTC)

I'm sorry but polluting the filesystem with a bunch of files generated at install time where python is essentially run as root is not OK, especially when such files can be created at build time.

In fact, these files are not even necessary, they are a nice to have!

I can't stress this enough, this is a serious breach of trust even if there is obviously no malicious intent.

If it fails for other people then it's up to them to suggest changes that don't involve this.

I believe you are talking about @Pulec and @Ragnor.

They are wrong!

You can make use of this module at build time by running:

export PYTHONPATH="${srcdir}/${_name}-${_name}-${pkgver}:$PYTHONPATH"

in the build section (or other) before you use python.

The import gradio will work regardless because python searches the CWD by default.

The themes (I have no idea what's happening there) will need this, but it's not being run now anyway!

There is nothing really wrong with this.

There is however something very wrong with how things are currently done.

I just tested with a clean chroot build and it worked, took forever, but it worked.

SO please, change the PKGBUILD to not import the module at post install.

medaminezghal commented on 2025-06-21 16:32 (UTC)

@vclav I've done this for previous versiosn and it works for me but for some reason it didn't for other peoples. You can check it in previous comments. That's why I use the post-install to fix it.

vcalv commented on 2025-06-21 15:35 (UTC) (edited on 2025-06-21 15:42 (UTC) by vcalv)

I solved the generation of the *.pyi files on build and it wasn't even very difficult or strange

Right before the python build line:

python -m build --wheel --no-isolation

You have to run:

python -c "import gradio"

It has to be before.

That's it. It works.

After that there are 2 problems:

  • There's a bunch in files in the filesystem that don't belong to any packages because you created them at install time and are now going to be overwritten by this package. You have to modify the install script and add a pre_upgrade function where you delete them, just like you currently do in post_remove

  • One file is not currently generated at build, it's /usr/lib/python3.13/site-packages/gradio/hash_seed.txt and I have no idea what to do about this.

After a while you can just remove the install script entirely.

You could remove it immediately but then users would need to do some manual intervention.

Please, consider going down this road.

medaminezghal commented on 2025-06-21 06:07 (UTC)

@vcalv I've searched for solution but I found that those files are created only when you import gradio.