Package Details: python-ffsubsync-venv 0.4.29-1

Git Clone URL: https://aur.archlinux.org/python-ffsubsync-venv.git (read-only, click to copy)
Package Base: python-ffsubsync-venv
Description: Language-agnostic automatic synchronization of subtitles with video. (Installed inside a Python virtual environment)
Upstream URL: https://github.com/smacke/ffsubsync
Licenses: MIT
Conflicts: python-ffsubsync
Submitter: kugland
Maintainer: kugland (vej.kse)
Last Packager: vej.kse
Votes: 0
Popularity: 0.000000
First Submitted: 2022-09-10 02:23 (UTC)
Last Updated: 2025-02-22 17:27 (UTC)

Latest Comments

vej.kse commented on 2025-02-16 10:38 (UTC) (edited on 2025-02-16 10:39 (UTC) by vej.kse)

I removed python-future as a dependency. Being in requirements.txt, it is still installed in the virtual environment, but then it is uninstalled. The resulting package is identical with the one generated by the previous version of the PKGBUILD and works just as fine.

micwoj92 commented on 2025-02-15 21:15 (UTC)

There are no future imports in this package's code. This is indirect dependency of this old bundled auditok, however it is not required, please see: https://github.com/amsehili/auditok/blob/793e580aeec653906c540a0f65ac205b4d610738/auditok/cmdline.py#L31

vej.kse commented on 2025-02-15 19:43 (UTC)

@dreieck: I updated the package to 0.4.26, but upstream has not yet removed python-future as a dependency (even in unreleased commits), so it’s still a dependency of this package. But as far as I can tell, it works fine with Python 3.13.

dreieck commented on 2025-01-11 16:02 (UTC)

If possible, please remove the dependency on python-furure/ make the package working without python-future:

WARNING: python-future package is not compatible with Python 3.13

The python-future project was created in 2013 to attempt to save Python from the schism of version incompatibility that was threatening to tear apart the language (as Perl 6 contributed to the death of Perl).

That time is now past. Thanks to a huge porting effort across the Python community, Python 3 eventually thrived. Python 2 reached its end of life in 2020 and the python-future package should no longer be necessary. Use it to help with porting legacy code to Python 3 but don’t depend on it for new code.

If you use packages that depend on it, please contact maintainers and/or upstream of these packages and try to work out whether this dependency is really needed.

Regards and thanks for this package!

vej.kse commented on 2024-01-16 15:01 (UTC)

The latest version of this PKGBUILD now uses as much system packages as possible. Only auditok and ffsubsync are in the virtual environment.

vej.kse commented on 2024-01-09 13:54 (UTC) (edited on 2024-01-09 18:04 (UTC) by vej.kse)

I wanted to try this but https://aur.archlinux.org/packages/python-ffsubsync wouldn’t run due to wrong dependency versions and I couldn’t make this one. I managed to modify this PKGBUILD into a working one, inspired by this other one: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=octoprint

# Maintainer: André Kugland <kugland at gmail dot com>

#  This package is provided as a workaround because ffsubsync
#  doesn't work correctly with the most recent version of its
#  libraries. In this package, it is installed, together with
#  its dependencies as a Python virtual environment inside the
#  directory /usr/share/ffsubsync-venv.

_pkgname=ffsubsync-venv
pkgname=python-$_pkgname
pkgver=0.4.25
pkgrel=1
pkgdesc="Language-agnostic automatic synchronization of subtitles with video. (Installed inside a Python virtual environment)"
arch=(any)
url="https://github.com/smacke/ffsubsync"
license=('MIT')
source=('ffs.sh')
sha256sums=('547f73f58ab3d7217b0ea211517d7ea7d0c76cbc49a1655ccd7be774ab57b396')
depends=(
  'python'
  'python-chardet'
  'python-charset-normalizer'
  'python-faust-cchardet'
  'python-ffmpeg-python'
  'python-future'
  'python-numpy'
  'python-pysubs2'
  'python-rich'
  'python-six'
  'python-srt'
  'python-tqdm'
  'python-typing_extensions'
  'python-webrtcvad'
)
conflicts=('python-ffsubsync')
install=ffsubsync-venv.install

package() {
  mkdir -p "$pkgdir"/usr/{bin,share/ffsubsync-venv}
  install -m 755 -o 0 -g 0 ffs.sh "$pkgdir"/usr/bin/ffs
  install -m 755 -o 0 -g 0 ffs.sh "$pkgdir"/usr/bin/ffsubsync
  install -m 755 -o 0 -g 0 ffs.sh "$pkgdir"/usr/bin/subsync

  venv="$pkgdir/usr/share/ffsubsync-venv"
  python -m venv --system-site-packages --symlinks "$venv"
  . "$venv/bin/activate"

  pip install "ffsubsync==$pkgver"

  # Remove Python packages only needed to make this package, not to run it
  pip uninstall --yes pip setuptools
  # Remove $pkgdir path from the package (it is important to exclude binary
  # files otherwise .pyc files will be corrupted and ffs will crash)
  find "$venv" -type f \
    -exec grep --quiet --binary-files=without-match "$pkgdir" {} \; \
    -exec sed --in-place "s,$pkgdir,,g" {} \;
}

I’m not sure all changes are needed or good. (There is something that I didn’t fix: the sed command should not use $pkgdir as is, in case it contains regex reserved characters. This PKGBUILD could fail if the path of the build directory contains such characters.)