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 {
|
||||
name = "myPythonEnv";
|
||||
buildInputs = with pkgs; [
|
||||
python36Full
|
||||
python36Packages.virtualenv
|
||||
python36Packages.pip
|
||||
python37Full
|
||||
python37Packages.virtualenv
|
||||
];
|
||||
src = null;
|
||||
shellHook = ''
|
||||
# set SOURCE_DATE_EPOCH so that we can use python wheels
|
||||
SOURCE_DATE_EPOCH=$(date +%s)
|
||||
virtualenv --no-setuptools venv
|
||||
export PATH=$PWD/venv/bin:$PATH
|
||||
if [ ! -d .venv ]; then
|
||||
python -m venv .venv
|
||||
fi
|
||||
source .venv/bin/activate
|
||||
pip install --upgrade pip
|
||||
if [ -s requirements.txt ]; then
|
||||
pip install -r requirements.txt
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue