update python to use virtualenv
This commit is contained in:
parent
91ce528f61
commit
e21e5cbee9
1 changed files with 7 additions and 7 deletions
|
|
@ -3,16 +3,16 @@ with import <nixpkgs> {};
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "myPythonEnv";
|
name = "myPythonEnv";
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
python36Full
|
python37Full
|
||||||
python36Packages.virtualenv
|
python37Packages.virtualenv
|
||||||
python36Packages.pip
|
|
||||||
];
|
];
|
||||||
src = null;
|
src = null;
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
# set SOURCE_DATE_EPOCH so that we can use python wheels
|
if [ ! -d .venv ]; then
|
||||||
SOURCE_DATE_EPOCH=$(date +%s)
|
python -m venv .venv
|
||||||
virtualenv --no-setuptools venv
|
fi
|
||||||
export PATH=$PWD/venv/bin:$PATH
|
source .venv/bin/activate
|
||||||
|
pip install --upgrade pip
|
||||||
if [ -s requirements.txt ]; then
|
if [ -s requirements.txt ]; then
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue