python-slugify: refactor

This commit is contained in:
Rahul Gopinath 2017-05-02 21:17:48 -07:00
parent 0ef0a4ab5e
commit 14d951c46f
2 changed files with 25 additions and 21 deletions

View File

@ -0,0 +1,24 @@
{ stdenv, fetchPypi, buildPythonPackage, unidecode, regex, isPy3k }:
buildPythonPackage rec {
name = "${pname}-${version}";
pname = "python-slugify";
version = "1.2.4";
src = fetchPypi {
inherit pname version;
sha256 = "097qllxys22kghcv2a5jcc1zdlr9zzqayvk6ywavsv8wgbgqb8sp";
};
doCheck = !isPy3k;
# (only) on python3 unittest loader (loadTestsFromModule) fails
propagatedBuildInputs = [ unidecode regex ];
meta = with stdenv.lib; {
homepage = https://github.com/un33k/python-slugify;
description = "A Python Slugify application that handles Unicode";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ vrthra ];
};
}

View File

@ -1488,27 +1488,7 @@ in {
};
}));
python-slugify = buildPythonPackage rec {
name = "python-slugify-${version}";
version = "1.2.4";
src = pkgs.fetchurl {
url = "mirror://pypi/p/python-slugify/${name}.tar.gz";
sha256 = "097qllxys22kghcv2a5jcc1zdlr9zzqayvk6ywavsv8wgbgqb8sp";
};
doCheck = false;
# (only) on python3 unittest loader (loadTestsFromModule) fails
propagatedBuildInputs = with self; [ unidecode regex ];
meta = with stdenv.lib; {
homepage = https://github.com/un33k/python-slugify;
description = "A Python Slugify application that handles Unicode";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ vrthra ];
};
};
python-slugify = callPackage ../development/python-modules/python-slugify { };
awesome-slugify = buildPythonPackage rec {
name = "awesome-slugify-${version}";