pew: 1.1.2 -> 1.2.0, fix build

This commit is contained in:
Jonathan Ringer 2020-04-07 10:19:49 -07:00 committed by Jon
parent f09e5f1bf2
commit 9df14757c9

View File

@ -1,7 +1,10 @@
{ stdenv, python3Packages }: { stdenv, python3 }:
with python3Packages; buildPythonApplication rec {
with python3.pkgs;
buildPythonApplication rec {
pname = "pew"; pname = "pew";
version = "1.1.2"; version = "1.2.0";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
@ -10,25 +13,18 @@ with python3Packages; buildPythonApplication rec {
propagatedBuildInputs = [ virtualenv virtualenv-clone setuptools ]; propagatedBuildInputs = [ virtualenv virtualenv-clone setuptools ];
LC_ALL = "en_US.UTF-8"; # no tests are packaged
checkPhase = ''
postFixup = '' $out/bin/pew > /dev/null
set -euo pipefail
PEW_SITE="$out/lib/${python.libPrefix}/site-packages"
SETUPTOOLS="${setuptools}/lib/${python.libPrefix}/site-packages"
SETUPTOOLS_SITE=$SETUPTOOLS/$(cat $SETUPTOOLS/setuptools.pth)
CLONEVENV_SITE="${virtualenv-clone}/lib/${python.libPrefix}/site-packages"
SITE_PACKAGES="[\'$PEW_SITE\',\'$SETUPTOOLS_SITE\',\'$CLONEVENV_SITE\']"
substituteInPlace $PEW_SITE/pew/pew.py \
--replace "from pew.pew" "import sys; sys.path.extend($SITE_PACKAGES); from pew.pew" \
--replace 'sys.executable, "-m", "virtualenv"' "'${virtualenv}/bin/virtualenv'"
''; '';
pythonImportsCheck = [ "pew" ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://github.com/berdario/pew; homepage = "https://github.com/berdario/pew";
description = "Tools to manage multiple virtualenvs written in pure python"; description = "Tools to manage multiple virtualenvs written in pure python";
license = licenses.mit; license = licenses.mit;
platforms = platforms.all; platforms = platforms.all;
maintainers = with maintainers; [ berdario ]; maintainers = with maintainers; [ berdario ];
}; };
} }