Package Details: python-magic-git 0.4.27.r22.g54d86fd-3

Git Clone URL: https://aur.archlinux.org/python-magic-git.git (read-only, click to copy)
Package Base: python-magic-git
Description: File type identification library; compatible with official file/libmagic Python wrapper (git)
Upstream URL: https://pypi.org/project/python-magic
Keywords: bindings file file-type filetype libmagic library
Licenses: MIT
Conflicts: python-file-magic, python-magic
Provides: python-magic
Submitter: None
Maintainer: None
Last Packager: MarsSeed
Votes: 1
Popularity: 0.000000
First Submitted: 2015-09-29 15:50 (UTC)
Last Updated: 2023-12-08 10:30 (UTC)

Required by (77)

Sources (1)

Pinned Comments

MarsSeed commented on 2023-12-02 19:09 (UTC) (edited on 2023-12-02 19:14 (UTC) by MarsSeed)

TLDR 1 for users: you can use either python-magic or python-magic-git for the same purpose, for any package that needs to import the 'magic' Python module.

TLDR 2 for packagers: please kindly make your package depend on python-magic, which will allow users to choose either the stable repo package, or the '-git' build from AUR.

MarsSeed commented on 2023-12-02 15:25 (UTC)

Updated this (python-magic-git) to align with extra/python-magic.

There's no more incompatibility between the two.

Last year, repo switched to use the same third-party PyPI/python-magic bindings module as the '-git' package has always been for.

This third-party wrapper is compatible with core/file's own wrapper (PyPI/file-magic), so there is no need to package that one as well for Arch/AUR.

All Python packages requiring either the official or the third-party wrapper should work without issues with the third-party one - please see the latter's COMPAT.md file for details.

Latest Comments

MarsSeed commented on 2023-12-02 19:09 (UTC) (edited on 2023-12-02 19:14 (UTC) by MarsSeed)

TLDR 1 for users: you can use either python-magic or python-magic-git for the same purpose, for any package that needs to import the 'magic' Python module.

TLDR 2 for packagers: please kindly make your package depend on python-magic, which will allow users to choose either the stable repo package, or the '-git' build from AUR.

MarsSeed commented on 2023-12-02 15:25 (UTC)

Updated this (python-magic-git) to align with extra/python-magic.

There's no more incompatibility between the two.

Last year, repo switched to use the same third-party PyPI/python-magic bindings module as the '-git' package has always been for.

This third-party wrapper is compatible with core/file's own wrapper (PyPI/file-magic), so there is no need to package that one as well for Arch/AUR.

All Python packages requiring either the official or the third-party wrapper should work without issues with the third-party one - please see the latter's COMPAT.md file for details.

marcool04 commented on 2021-04-06 12:51 (UTC)

@schard

Thank you for you fast reply and for clearing up the situation a bit for me. You are right, it is the distinction between conflicts and provides that had me somewhat confused (although I do understand how they differ, it's very clearly explained in the wiki).

I guess what is confusing to me (and has nothing to do with you!) is that the PyPi package is "python-magic" but that it then provides a python library called "magic", contrary to what I'm used to seeing: Arch package "python-X" provides PyPi package "X" which, once installed, is python module (or whatever) "X"… You're absolutely right, there would be no benefit in calling this "python-python-magic-git".

Thanks for your time. Keep up the good work :)

schard commented on 2021-04-06 11:17 (UTC) (edited on 2021-04-06 11:21 (UTC) by schard)

@marcool04

  • Indeed it is as both projects provide a python package named "magic" with entirely different implementations and APIs, as you already discovered. You might be confusing conflicts with provides here. As you can see, this package purposefully does not provide the other library's package, since it ships a package with a different API.
  • Why would I use such a verbose name, which also can be consiered "ugly" as you already stated? What benefit would that have? It is a python library, providing a package magic, which is built from the rolling upstream git repository, hence python-magic-git.

marcool04 commented on 2021-04-06 11:06 (UTC)

Hi, I have a few questions:

  • Is this package really in conflict with python-magic [1] package from community? They seem to have wildly different version numbers, and as far as I can tell the source isn't even remotely related.
  • Shouldn't the package in fact (in an ugly way, I'll admit) be named python-python-magic-git, since the original package on PyPi is called "python-magic"?

Thanks in advance for any information you can provide. Regards, Mark.

[1] https://archlinux.org/packages/community/any/python-magic/

<deleted-account> commented on 2015-11-16 17:32 (UTC)

Can you please add some error information so I can reproduce any possible problems that you encountered with the PKGBUILD?

moyamo commented on 2015-11-14 19:34 (UTC)

I was having problems with this PKGBUILD. This patch fixes things. diff -u b/PKGBUILD a/PKGBUILD --- b/PKGBUILD 2015-11-14 21:28:57.000000000 +0200 +++ a/PKGBUILD 2015-11-14 21:33:11.958220785 +0200 @@ -1,25 +1,33 @@ # Maintainer: Richard Neumann aka. rne <r dot neumann at homeinfo fullstop de> pkgname='python-magic-git' -pkgver='0.4.6' -pkgrel=5 +pkgver=latest +pkgrel=2 pkgdesc="Python 3 packages for alternative (github) implementation of python-magic" arch=('any') url='https://github.com/ahupp/python-magic' license=('MIT') depends=('python') -makedepends=('git' 'sed' 'python') +makedepends=('git' 'sed' 'python' 'python-setuptools') +provides=('python-magic=$pkgver') conflicts=('python-magic') source=("${pkgname}::git+https://github.com/ahupp/python-magic") md5sums=('SKIP') pkgdir='pkg' srcdir='src' +pkgver() { + cd "${srcdir}/${pkgname}" + # Try to pull the version from setup.py + grep "version" setup.py | cut -d\' -f2 +} + package() { local PYTHON="/usr/bin/env python3" local USR_PATH="${pkgdir}/usr" local LICENSE_DIR="${USR_PATH}/share/licenses/${pkgname}" + # Set up directories install -d -m 755 ${USR_PATH} @@ -31,11 +39,11 @@ cd "${srcdir}/${pkgname}" # Fix setup.py for distutils.core - sed -i 's/\(from setuptools.*\)/#\1/' setup.py - sed -i 's/#\(from distutils.*\)/\1/' setup.py +# sed -i 's/\(from setuptools.*\)/#\1/' setup.py +# sed -i 's/#\(from distutils.*\)/\1/' setup.py # Install python packages to $pkgdir - ${PYTHON} setup.py install --prefix ${USR_PATH} + ${PYTHON} setup.py install --prefix "/usr" --root "$pkgdir" # Install license file install -m 644 LICENSE ${LICENSE_DIR}