pythonPackages.pymediainfo: init at 2.3.0
This commit is contained in:
parent
852dca659b
commit
2137f5b7c0
42
pkgs/development/python-modules/pymediainfo/default.nix
Normal file
42
pkgs/development/python-modules/pymediainfo/default.nix
Normal file
@ -0,0 +1,42 @@
|
||||
{ stdenv, fetchPypi, buildPythonPackage
|
||||
, libmediainfo
|
||||
, setuptools_scm
|
||||
, pytest, glibcLocales }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pymediainfo";
|
||||
version = "2.3.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1d0mxxycacimy46b08q44xyxkyji7rrs7viwc3wkpckhqs54q24x";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pymediainfo/__init__.py \
|
||||
--replace 'CDLL(library_file)' \
|
||||
'CDLL("${libmediainfo}/lib/libmediainfo${stdenv.hostPlatform.extensions.sharedLibrary}")' \
|
||||
--replace 'CDLL("libmediainfo.0.dylib")' \
|
||||
'CDLL("${libmediainfo}/lib/libmediainfo.0${stdenv.hostPlatform.extensions.sharedLibrary}")' \
|
||||
--replace 'CDLL("libmediainfo.dylib")' \
|
||||
'CDLL("${libmediainfo}/lib/libmediainfo${stdenv.hostPlatform.extensions.sharedLibrary}")' \
|
||||
--replace 'CDLL("libmediainfo.so.0")' \
|
||||
'CDLL("${libmediainfo}/lib/libmediainfo${stdenv.hostPlatform.extensions.sharedLibrary}.0")'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ setuptools_scm ];
|
||||
|
||||
checkInputs = [ glibcLocales pytest ];
|
||||
|
||||
checkPhase = ''
|
||||
export LC_ALL=en_US.UTF-8
|
||||
py.test -k 'not test_parse_url' tests
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Python wrapper for the mediainfo library";
|
||||
homepage = https://github.com/sbraz/pymediainfo;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ jfrankenau ];
|
||||
};
|
||||
}
|
@ -4025,6 +4025,8 @@ in {
|
||||
|
||||
pylama = callPackage ../development/python-modules/pylama { };
|
||||
|
||||
pymediainfo = callPackage ../development/python-modules/pymediainfo { };
|
||||
|
||||
pyphen = callPackage ../development/python-modules/pyphen {};
|
||||
|
||||
pypoppler = buildPythonPackage rec {
|
||||
|
Loading…
Reference in New Issue
Block a user