tox-dev / tox

Command line driven CI frontend and development task automation tool.
https://tox.wiki
MIT License
3.68k stars 522 forks source link

Tox does not work with Windows x86 embeddable zip file #1465

Closed ChadBailey closed 4 years ago

ChadBailey commented 4 years ago

Important: This may be an upstream bug in virtualenv, but I don't know enough about its usage and how it's being invoked by tox to determine this.

In Windows, tox does not work with windows x86 embeddable zip file. See Python Releases for Windows. For both examples, I will use Python 3.7.5 - Oct. 15, 2019 to demonstrate - but it is worth noting I have tried with versions 3.5, 3.6, 3.7, and 3.8.

Example of expected/working output

Download Windows x86-64 executable installer and install to C:\Python\

NOTE: basepython does not need to be explicitly stated here, but I have done that to demonstrate that it works as intended with this specified in this way

Configuration

[tox]
envlist = py37

[testenv]
basepython =
    py37: C:\Python\python.exe
setenv =
    PYTHONPATH = {toxinidir}
deps =
    -r{toxinidir}/requirements_dev.txt
commands =
    pip install -U pip
    pytest

tox command output

Kamel@DESKTOP MINGW64 ~/Documents/code/cookiecutter-pypackage (bugfix/500-setuppy-test-removal)
$ tox -rvv
using tox.ini: C:\Users\Kamel\Documents\code\cookiecutter-pypackage\tox.ini (pid 8816)
C:\python\python.exe (C:\python\python.exe) is {'executable': 'C:\\python\\python.exe', 'name': 'python', 'version_info': [3, 7, 1, 'final', 0], 'version': '3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit (Intel)]', 'is_64': False, 'sysplatform': 'win32'}
py37 uses C:\python\python.exe
using tox-3.14.0 from c:\python\lib\site-packages\tox\__init__.py (pid 8816)
GLOB start: packaging 
GLOB sdist-make: C:\Users\Kamel\Documents\code\cookiecutter-pypackage\setup.py
[11048] C:\Users\Kamel\Documents\code\cookiecutter-pypackage$ 'c:\python\python.exe' setup.py sdist --formats=zip --dist-dir 'C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\dist' >.tox\log\GLOB-0.log
running sdist
running check
c:\python\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'python_requires'
  warnings.warn(msg)
warning: sdist: manifest template 'MANIFEST.in' does not exist (using default file list)

writing manifest file 'MANIFEST'
creating cookiecutter-pypackage-0.1.0
making hard links in cookiecutter-pypackage-0.1.0...
hard linking README.rst -> cookiecutter-pypackage-0.1.0
hard linking setup.cfg -> cookiecutter-pypackage-0.1.0
hard linking setup.py -> cookiecutter-pypackage-0.1.0
creating C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\dist
creating 'C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\dist\cookiecutter-pypackage-0.1.0.zip' and adding 'cookiecutter-pypackage-0.1.0' to it
adding 'cookiecutter-pypackage-0.1.0\PKG-INFO'
adding 'cookiecutter-pypackage-0.1.0\README.rst'
adding 'cookiecutter-pypackage-0.1.0\setup.cfg'
adding 'cookiecutter-pypackage-0.1.0\setup.py'
removing 'cookiecutter-pypackage-0.1.0' (and everything under it)

GLOB finish: packaging  after 0.20 seconds
copying new sdistfile to 'C:\\Users\\Kamel\\.tox\\distshare\\cookiecutter-pypackage-0.1.0.zip'
package .tmp\package\1\cookiecutter-pypackage-0.1.0.zip links to dist\cookiecutter-pypackage-0.1.0.zip (C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox)
py37 start: getenv C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37
py37 cannot reuse: -r flag
py37 create: C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37
setting PATH=C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37\Scripts;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Kamel\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Oculus\Support\oculus-runtime;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\Dixper\bin\Win32;C:\Program Files\Dixper\bin\x64;C:\Program Files\nodejs\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\GnuWin32\bin;C:\Users\Kamel\.poetry\bin;C:\Python\Scripts\;C:\Python\;C:\Users\Kamel\AppData\Local\Microsoft\WindowsApps;C:\Users\Kamel\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Kamel\AppData\Roaming\npm
[3660] C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox$ 'c:\python\python.exe' -m virtualenv --no-download --python 'C:\python\python.exe' py37
Running virtualenv with interpreter C:\python\python.exe
Already using interpreter C:\python\python.exe
Using base prefix 'C:\\python'
New python executable in C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37\Scripts\python.exe
Installing setuptools, pip, wheel...
done.
py37 installdeps: -rC:\Users\Kamel\Documents\code\cookiecutter-pypackage/requirements_dev.txt
setting PATH=C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37\Scripts;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Kamel\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Oculus\Support\oculus-runtime;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\Dixper\bin\Win32;C:\Program Files\Dixper\bin\x64;C:\Program Files\nodejs\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\GnuWin32\bin;C:\Users\Kamel\.poetry\bin;C:\Python\Scripts\;C:\Python\;C:\Users\Kamel\AppData\Local\Microsoft\WindowsApps;C:\Users\Kamel\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Kamel\AppData\Roaming\npm
[13772] C:\Users\Kamel\Documents\code\cookiecutter-pypackage$ 'C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37\Scripts\python.EXE' -m pip install '-rC:\Users\Kamel\Documents\code\cookiecutter-pypackage/requirements_dev.txt'
Collecting pytest==4.6.5
  Using cached https://files.pythonhosted.org/packages/97/72/d4d6d22ad216f149685f2e93ce9280df9f36cbbc87fa546641ac92f22766/pytest-4.6.5-py2.py3-none-any.whl
Collecting tox==3.14.0
  Using cached https://files.pythonhosted.org/packages/a7/0c/ed234b83d2c4fcef1cfccf97371183d51dafae62e64334de34d0a6333114/tox-3.14.0-py2.py3-none-any.whl
Collecting cookiecutter>=1.4.0
  Using cached https://files.pythonhosted.org/packages/16/99/1ca3a75978270288354f419e9166666801cf7e7d8df984de44a7d5d8b8d0/cookiecutter-1.6.0-py2.py3-none-any.whl
Collecting pytest-cookies==0.4.0
  Using cached https://files.pythonhosted.org/packages/0a/48/bd48e883f40e1defcae70ea69682de41a544e906cc4c913414692948bf01/pytest_cookies-0.4.0-py2.py3-none-any.whl
Collecting alabaster==0.7.12
  Using cached https://files.pythonhosted.org/packages/10/ad/00b090d23a222943eb0eda509720a404f531a439e803f6538f35136cae9e/alabaster-0.7.12-py2.py3-none-any.whl
Processing c:\users\kamel\appdata\local\pip\cache\wheels\61\1d\d0\04cfe495619be2095eb8d89a31c42adb4e42b76495bc8f784c\watchdog-0.9.0-cp37-none-any.whl
Collecting atomicwrites>=1.0
  Using cached https://files.pythonhosted.org/packages/52/90/6155aa926f43f2b2a22b01be7241be3bfd1ceaf7d0b3267213e8127d41f4/atomicwrites-1.3.0-py2.py3-none-any.whl
Collecting attrs>=17.4.0
  Using cached https://files.pythonhosted.org/packages/a2/db/4313ab3be961f7a763066401fb77f7748373b6094076ae2bda2806988af6/attrs-19.3.0-py2.py3-none-any.whl
Collecting importlib-metadata>=0.12
  Using cached https://files.pythonhosted.org/packages/f6/d2/40b3fa882147719744e6aa50ac39cf7a22a913cbcba86a0371176c425a3b/importlib_metadata-0.23-py2.py3-none-any.whl
Collecting packaging
  Using cached https://files.pythonhosted.org/packages/cf/94/9672c2d4b126e74c4496c6b3c58a8b51d6419267be9e70660ba23374c875/packaging-19.2-py2.py3-none-any.whl
Collecting colorama; sys_platform == "win32"
  Using cached https://files.pythonhosted.org/packages/4f/a6/728666f39bfff1719fc94c481890b2106837da9318031f71a8424b662e12/colorama-0.4.1-py2.py3-none-any.whl
Collecting more-itertools>=4.0.0; python_version > "2.7"
  Using cached https://files.pythonhosted.org/packages/45/dc/3241eef99eb45f1def35cf93af35d1cf9ef4c0991792583b8f33ea41b092/more_itertools-7.2.0-py3-none-any.whl
Collecting wcwidth
  Using cached https://files.pythonhosted.org/packages/7e/9f/526a6947247599b084ee5232e4f9190a38f398d7300d866af3ab571a5bfe/wcwidth-0.1.7-py2.py3-none-any.whl
Collecting py>=1.5.0
  Using cached https://files.pythonhosted.org/packages/76/bc/394ad449851729244a97857ee14d7cba61ddb268dce3db538ba2f2ba1f0f/py-1.8.0-py2.py3-none-any.whl
Collecting pluggy<1.0,>=0.12
  Using cached https://files.pythonhosted.org/packages/a0/28/85c7aa31b80d150b772fbe4a229487bc6644da9ccb7e427dd8cc60cb8a62/pluggy-0.13.1-py2.py3-none-any.whl
Collecting six>=1.10.0
  Using cached https://files.pythonhosted.org/packages/65/26/32b8464df2a97e6dd1b656ed26b2c194606c16fe163c695a992b36c11cdf/six-1.13.0-py2.py3-none-any.whl
Collecting toml>=0.9.4
  Using cached https://files.pythonhosted.org/packages/a2/12/ced7105d2de62fa7c8fb5fce92cc4ce66b57c95fb875e9318dba7f8c5db0/toml-0.10.0-py2.py3-none-any.whl
Collecting virtualenv>=14.0.0
  Using cached https://files.pythonhosted.org/packages/62/77/6a86ef945ad39aae34aed4cc1ae4a2f941b9870917a974ed7c5b6f137188/virtualenv-16.7.8-py2.py3-none-any.whl
Collecting filelock<4,>=3.0.0
  Using cached https://files.pythonhosted.org/packages/93/83/71a2ee6158bb9f39a90c0dea1637f81d5eef866e188e1971a1b1ab01a35a/filelock-3.0.12-py3-none-any.whl
Collecting click>=5.0
  Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
Collecting jinja2-time>=0.1.0
  Using cached https://files.pythonhosted.org/packages/6a/a1/d44fa38306ffa34a7e1af09632b158e13ec89670ce491f8a15af3ebcb4e4/jinja2_time-0.2.0-py2.py3-none-any.whl
Collecting jinja2>=2.7
  Using cached https://files.pythonhosted.org/packages/65/e0/eb35e762802015cab1ccee04e8a277b03f1d8e53da3ec3106882ec42558b/Jinja2-2.10.3-py2.py3-none-any.whl
Collecting whichcraft>=0.4.0
  Using cached https://files.pythonhosted.org/packages/b5/a2/81887a0dae2e4d2adc70d9a3557fdda969f863ced51cd3c47b587d25bce5/whichcraft-0.6.1-py2.py3-none-any.whl
Collecting requests>=2.18.0
  Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl
Collecting binaryornot>=0.2.0
  Using cached https://files.pythonhosted.org/packages/24/7e/f7b6f453e6481d1e233540262ccbfcf89adcd43606f44a028d7f5fae5eb2/binaryornot-0.4.4-py2.py3-none-any.whl
Processing c:\users\kamel\appdata\local\pip\cache\wheels\8b\99\a0\81daf51dcd359a9377b110a8a886b3895921802d2fc1b2397e\future-0.18.2-cp37-none-any.whl
Collecting poyo>=0.1.0
  Using cached https://files.pythonhosted.org/packages/42/50/0b0820601bde2eda403f47b9a4a1f270098ed0dd4c00c443d883164bdccc/poyo-0.5.0-py2.py3-none-any.whl
Collecting arrow<0.14.0
  Using cached https://files.pythonhosted.org/packages/28/2f/1be1d6914409d27a3eefc621676a50951edafca30f74bd731c8fb5ecdc24/arrow-0.13.2-py2.py3-none-any.whl
Collecting PyYAML>=3.10
  Using cached https://files.pythonhosted.org/packages/d3/4f/c65af393e53483cf0a0db7aac48f02684b09207c9b77242d35d747e63221/PyYAML-5.1.2-cp37-cp37m-win32.whl
Processing c:\users\kamel\appdata\local\pip\cache\wheels\0b\04\79\c3b0c3a0266a3cb4376da31e5bfe8bba0c489246968a68e843\pathtools-0.1.2-cp37-none-any.whl
Collecting argh>=0.24.1
  Using cached https://files.pythonhosted.org/packages/06/1c/e667a7126f0b84aaa1c56844337bf0ac12445d1beb9c8a6199a7314944bf/argh-0.26.2-py2.py3-none-any.whl
Collecting zipp>=0.5
  Using cached https://files.pythonhosted.org/packages/74/3d/1ee25a26411ba0401b43c6376d2316a71addcc72ef8690b101b4ea56d76a/zipp-0.6.0-py2.py3-none-any.whl
Collecting pyparsing>=2.0.2
  Using cached https://files.pythonhosted.org/packages/c0/0c/fc2e007d9a992d997f04a80125b0f183da7fb554f1de701bbb70a8e7d479/pyparsing-2.4.5-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23
  Using cached https://files.pythonhosted.org/packages/5b/d4/1deb3c5dc3714fb160c7e2116fc6dff36a063d9156a9328cce54ef35cc52/MarkupSafe-1.1.1-cp37-cp37m-win32.whl
Collecting certifi>=2017.4.17
  Using cached https://files.pythonhosted.org/packages/18/b0/8146a4f8dd402f60744fa380bc73ca47303cccf8b9190fd16a827281eac2/certifi-2019.9.11-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
  Using cached https://files.pythonhosted.org/packages/b4/40/a9837291310ee1ccc242ceb6ebfd9eb21539649f193a7c8c86ba15b98539/urllib3-1.25.7-py2.py3-none-any.whl
Collecting idna<2.9,>=2.5
  Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
Collecting python-dateutil
  Using cached https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl
Installing collected packages: atomicwrites, attrs, more-itertools, zipp, importlib-metadata, six, pyparsing, packaging, colorama, wcwidth, py, pluggy, pytest, toml, virtualenv, filelock, tox, click, MarkupSafe, jinja2, python-dateutil, arrow, jinja2-time, whichcraft, certifi, chardet, urllib3, idna, requests, binaryornot, future, poyo, cookiecutter, pytest-cookies, alabaster, PyYAML, pathtools, argh, watchdog
Successfully installed MarkupSafe-1.1.1 PyYAML-5.1.2 alabaster-0.7.12 argh-0.26.2 arrow-0.13.2 atomicwrites-1.3.0 attrs-19.3.0 binaryornot-0.4.4 certifi-2019.9.11 chardet-3.0.4 click-7.0 colorama-0.4.1 cookiecutter-1.6.0 filelock-3.0.12 future-0.18.2 idna-2.8 importlib-metadata-0.23 jinja2-2.10.3 jinja2-time-0.2.0 more-itertools-7.2.0 packaging-19.2 pathtools-0.1.2 pluggy-0.13.1 poyo-0.5.0 py-1.8.0 pyparsing-2.4.5 pytest-4.6.5 pytest-cookies-0.4.0 python-dateutil-2.8.1 requests-2.22.0 six-1.13.0 toml-0.10.0 tox-3.14.0 urllib3-1.25.7 virtualenv-16.7.8 watchdog-0.9.0 wcwidth-0.1.7 whichcraft-0.6.1 zipp-0.6.0
py37 finish: getenv C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37 after 30.06 seconds
py37 start: installpkg C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\.tmp\package\1\cookiecutter-pypackage-0.1.0.zip
py37 inst: C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\.tmp\package\1\cookiecutter-pypackage-0.1.0.zip
write config to C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37\.tox-config1 as '3bdc1d55a54bbd03ad3354580b2bf8ada547dcd813c983a2447458c677bc6788 C:\\python\\python.exe\n3.14.0 0 0 0\n00000000000000000000000000000000 -rC:\\Users\\Kamel\\Documents\\code\\cookiecutter-pypackage/requirements_dev.txt'
setting PATH=C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37\Scripts;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Kamel\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Oculus\Support\oculus-runtime;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\Dixper\bin\Win32;C:\Program Files\Dixper\bin\x64;C:\Program Files\nodejs\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\GnuWin32\bin;C:\Users\Kamel\.poetry\bin;C:\Python\Scripts\;C:\Python\;C:\Users\Kamel\AppData\Local\Microsoft\WindowsApps;C:\Users\Kamel\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Kamel\AppData\Roaming\npm
[5156] C:\Users\Kamel\Documents\code\cookiecutter-pypackage$ 'C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37\Scripts\python.EXE' -m pip install --exists-action w '.tox\.tmp\package\1\cookiecutter-pypackage-0.1.0.zip'
Processing c:\users\kamel\documents\code\cookiecutter-pypackage\.tox\.tmp\package\1\cookiecutter-pypackage-0.1.0.zip
Building wheels for collected packages: cookiecutter-pypackage
  Building wheel for cookiecutter-pypackage (setup.py) ... done
  Created wheel for cookiecutter-pypackage: filename=cookiecutter_pypackage-0.1.0-cp37-none-any.whl size=1446 sha256=d9d5fe96a1373ce45c29309f49fdc7ae420ab5bdc0e91f7fcced80c2e0988e4b
  Stored in directory: C:\Users\Kamel\AppData\Local\pip\Cache\wheels\e7\31\1c\49ab5c66d811eee5bddf603a63fab5aa8bea08b98cce8d3a12
Successfully built cookiecutter-pypackage
Installing collected packages: cookiecutter-pypackage
Successfully installed cookiecutter-pypackage-0.1.0
py37 finish: installpkg C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\.tmp\package\1\cookiecutter-pypackage-0.1.0.zip after 2.30 seconds
py37 start: envreport 
setting PATH=C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37\Scripts;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Kamel\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Oculus\Support\oculus-runtime;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\Dixper\bin\Win32;C:\Program Files\Dixper\bin\x64;C:\Program Files\nodejs\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\GnuWin32\bin;C:\Users\Kamel\.poetry\bin;C:\Python\Scripts\;C:\Python\;C:\Users\Kamel\AppData\Local\Microsoft\WindowsApps;C:\Users\Kamel\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Kamel\AppData\Roaming\npm
[8080] C:\Users\Kamel\Documents\code\cookiecutter-pypackage$ 'C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37\Scripts\python.EXE' -m pip freeze >.tox\py37\log\py37-0.log
py37 finish: envreport  after 0.67 seconds
py37 installed: alabaster==0.7.12,argh==0.26.2,arrow==0.13.2,atomicwrites==1.3.0,attrs==19.3.0,binaryornot==0.4.4,certifi==2019.9.11,chardet==3.0.4,Click==7.0,colorama==0.4.1,cookiecutter==1.6.0,cookiecutter-pypackage==0.1.0,filelock==3.0.12,future==0.18.2,idna==2.8,importlib-metadata==0.23,Jinja2==2.10.3,jinja2-time==0.2.0,MarkupSafe==1.1.1,more-itertools==7.2.0,packaging==19.2,pathtools==0.1.2,pluggy==0.13.1,poyo==0.5.0,py==1.8.0,pyparsing==2.4.5,pytest==4.6.5,pytest-cookies==0.4.0,python-dateutil==2.8.1,PyYAML==5.1.2,requests==2.22.0,six==1.13.0,toml==0.10.0,tox==3.14.0,urllib3==1.25.7,virtualenv==16.7.8,watchdog==0.9.0,wcwidth==0.1.7,whichcraft==0.6.1,zipp==0.6.0
py37 start: run-test-pre
py37 run-test-pre: PYTHONHASHSEED='662'
py37 finish: run-test-pre  after 0.00 seconds
py37 start: run-test
py37 run-test: commands[0] | pip install -U pip
setting PATH=C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37\Scripts;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Kamel\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Oculus\Support\oculus-runtime;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\Dixper\bin\Win32;C:\Program Files\Dixper\bin\x64;C:\Program Files\nodejs\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\GnuWin32\bin;C:\Users\Kamel\.poetry\bin;C:\Python\Scripts\;C:\Python\;C:\Users\Kamel\AppData\Local\Microsoft\WindowsApps;C:\Users\Kamel\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Kamel\AppData\Roaming\npm
[8340] C:\Users\Kamel\Documents\code\cookiecutter-pypackage$ 'C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37\Scripts\pip.EXE' install -U pip
Requirement already up-to-date: pip in c:\users\kamel\documents\code\cookiecutter-pypackage\.tox\py37\lib\site-packages (19.3.1)
py37 run-test: commands[1] | pytest
setting PATH=C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37\Scripts;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Kamel\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Oculus\Support\oculus-runtime;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\Dixper\bin\Win32;C:\Program Files\Dixper\bin\x64;C:\Program Files\nodejs\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\GnuWin32\bin;C:\Users\Kamel\.poetry\bin;C:\Python\Scripts\;C:\Python\;C:\Users\Kamel\AppData\Local\Microsoft\WindowsApps;C:\Users\Kamel\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Kamel\AppData\Roaming\npm
[15516] C:\Users\Kamel\Documents\code\cookiecutter-pypackage$ 'C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37\Scripts\pytest.EXE'
============================================================================================================= test session starts ==============================================================================================================
platform win32 -- Python 3.7.1, pytest-4.6.5, py-1.8.0, pluggy-0.13.1
cachedir: .tox\py37\.pytest_cache
rootdir: C:\Users\Kamel\Documents\code\cookiecutter-pypackage, inifile: pytest.ini, testpaths: tests/
plugins: cookies-0.4.0
collected 17 items

tests\test_bake_project.py .................                                                                                                                                                                                              [100%]

========================================================================================================== 17 passed in 9.44 seconds =========================================================================================================== 
py37 finish: run-test  after 11.30 seconds
py37 start: run-test-post 
py37 finish: run-test-post  after 0.00 seconds
___________________________________________________________________________________________________________________ summary ____________________________________________________________________________________________________________________ 
  py37: commands succeeded
  congratulations :)
cleanup C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\.tmp\package\1\cookiecutter-pypackage-0.1.0.zip

Kamel@DESKTOP MINGW64 ~/Documents/code/cookiecutter-pypackage (bugfix/500-setuppy-test-removal)
$

Reproduce

Download Windows x86-64 embeddable zip file & extract the zip file to C:\python3.7. Delete .tox folder for clean working environment.

Configuration

[tox]
envlist = py37

[testenv]
basepython =
    py37: C:\python3.7\python.exe
setenv =
    PYTHONPATH = {toxinidir}
deps =
    -r{toxinidir}/requirements_dev.txt
commands =
    pip install -U pip
    pytest

tox command output

Kamel@DESKTOP MINGW64 ~/Documents/code/cookiecutter-pypackage (bugfix/500-setuppy-test-removal)
$ tox -rvv
using tox.ini: C:\Users\Kamel\Documents\code\cookiecutter-pypackage\tox.ini (pid 3464)
C:\python3.7\python.exe (C:\python3.7\python.exe) is {'executable': 'C:\\python3.7\\python.exe', 'name': 'python', 'version_info': [3, 7, 5, 'final', 0], 'version': '3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 15 2019, 00:11:34) [MSC v.1916 64 bit (AMD64)]', 'is_64': True, 'sysplatform': 'win32'}
py37 uses C:\python3.7\python.exe
using tox-3.14.0 from c:\python\lib\site-packages\tox\__init__.py (pid 3464)
GLOB start: packaging 
GLOB sdist-make: C:\Users\Kamel\Documents\code\cookiecutter-pypackage\setup.py
[7380] C:\Users\Kamel\Documents\code\cookiecutter-pypackage$ 'c:\python\python.exe' setup.py sdist --formats=zip --dist-dir 'C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\dist' >.tox\log\GLOB-0.log
running sdist
running check
c:\python\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'python_requires'
  warnings.warn(msg)
warning: sdist: manifest template 'MANIFEST.in' does not exist (using default file list)

writing manifest file 'MANIFEST'
creating cookiecutter-pypackage-0.1.0
making hard links in cookiecutter-pypackage-0.1.0...
hard linking README.rst -> cookiecutter-pypackage-0.1.0
hard linking setup.cfg -> cookiecutter-pypackage-0.1.0
hard linking setup.py -> cookiecutter-pypackage-0.1.0
creating C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\dist
creating 'C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\dist\cookiecutter-pypackage-0.1.0.zip' and adding 'cookiecutter-pypackage-0.1.0' to it
adding 'cookiecutter-pypackage-0.1.0\PKG-INFO'
adding 'cookiecutter-pypackage-0.1.0\README.rst'
adding 'cookiecutter-pypackage-0.1.0\setup.cfg'
adding 'cookiecutter-pypackage-0.1.0\setup.py'
removing 'cookiecutter-pypackage-0.1.0' (and everything under it)

GLOB finish: packaging  after 0.18 seconds
copying new sdistfile to 'C:\\Users\\Kamel\\.tox\\distshare\\cookiecutter-pypackage-0.1.0.zip'
package .tmp\package\1\cookiecutter-pypackage-0.1.0.zip links to dist\cookiecutter-pypackage-0.1.0.zip (C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox)
py37 start: getenv C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37
py37 cannot reuse: -r flag
py37 create: C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37
setting PATH=C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37\Scripts;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\Kamel\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Oculus\Support\oculus-runtime;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files\Dixper\bin\Win32;C:\Program Files\Dixper\bin\x64;C:\Program Files\nodejs\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\GnuWin32\bin;C:\Users\Kamel\.poetry\bin;C:\Python\Scripts\;C:\Python\;C:\Users\Kamel\AppData\Local\Microsoft\WindowsApps;C:\Users\Kamel\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Kamel\AppData\Roaming\npm
[15900] C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox$ 'c:\python\python.exe' -m virtualenv --no-download --python 'C:\python3.7\python.exe' py37
Running virtualenv with interpreter C:\python3.7\python.exe
Already using interpreter C:\python3.7\python.exe
Using base prefix 'C:\\python3.7'
Traceback (most recent call last):
  File "c:\python\lib\site-packages\virtualenv.py", line 2634, in <module>
    main()
  File "c:\python\lib\site-packages\virtualenv.py", line 870, in main
    symlink=options.symlink,
  File "c:\python\lib\site-packages\virtualenv.py", line 1162, in create_environment
    install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages=site_packages, clear=clear, symlink=symlink)
  File "c:\python\lib\site-packages\virtualenv.py", line 1468, in install_python
    writefile(site_filename_dst, SITE_PY)
  File "c:\python\lib\site-packages\virtualenv.py", line 432, in writefile
    with open(dest, "wb") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Kamel\\Documents\\code\\cookiecutter-pypackage\\.tox\\py37\\python37.zip\\site.py'
ERROR: invocation failed (exit code 1)
ERROR: InvocationError for command 'c:\python\python.exe' -m virtualenv --no-download --python 'C:\python3.7\python.exe' py37 (exited with code 1)
py37 finish: getenv C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\py37 after 0.27 seconds
___________________________________________________________________________________________________________________ summary ____________________________________________________________________________________________________________________ 
ERROR:   py37: InvocationError for command 'c:\python\python.exe' -m virtualenv --no-download --python 'C:\python3.7\python.exe' py37 (exited with code 1)
cleanup C:\Users\Kamel\Documents\code\cookiecutter-pypackage\.tox\.tmp\package\1\cookiecutter-pypackage-0.1.0.zip

Kamel@DESKTOP MINGW64 ~/Documents/code/cookiecutter-pypackage (bugfix/500-setuppy-test-removal)
$

Further validation

Open C:\python3.7\python.exe in the file and import site to validate the embeddable zip is working as expected

Python 3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 15 2019, 00:11:34) [MSC v.1916 64 bit (AMD64)] on win32
>>> import site
>>> site
<module 'site' from 'C:\\python3.7\\python37.zip\\site.pyc'>
>>>

Final Thoughts

Forgive my ignorance here, I feel like I may be missing something obvious... Installing multiple versions of python doesn't seem to be very straight forward to me... if this isn't the intended way to install/test using multiple versions of Python in windows then what is? I've looked over the docs but I don't see anything in there addressing this seemingly obvious concern (this applies irrespective of OS).

If I'm going to have my developers begin using tox before every PR, I'd like them test on all versions that the CICD pipeline is going to test so that they don't submit a PR that works on their machine but fails the quality gate

gaborbernat commented 4 years ago

It seems indeed we don't support embeddable zip files, or to be more precise virtualenv does not which we use underneath. So the issue should really be under https://github.com/pypa/virtualenv. For now you should use the executable installer that will register pythons into the windows registry and we'll find it by supporting PEP-514 https://www.python.org/dev/peps/pep-0514/

GitHub
pypa/virtualenv
Virtual Python Environment builder. Contribute to pypa/virtualenv development by creating an account on GitHub.
Python.org
PEP 514 -- Python registration in the Windows registry
The official home of the Python Programming Language
ChadBailey commented 4 years ago

I suspected that, was even the very first part of my post, but didn't know for sure. I couldn't find such a bug when looking. Thanks for the clarification

gaborbernat commented 4 years ago

I'll close this for now as it's a virtualenv request than tox.