Nadeem Vawda <[email protected]> added the comment:
> The test creates a temporary directory which is inserted at the head of
> sys.path.
> packaging.database.get_distribution should thus find Spamlib-0.1.dist-info.
> Can someone with a Windows install help me with this? Printing sys.path and
> os.listdir(sys.path[0]) would be a good start.
test_resources
(packaging.tests.test_command_install_data.InstallDataTestCase) ...
sys.path: ['c:\\users\\nadeem\\appdata\\local\\temp\\tmpi7pf1f\\tmp4gdwnp',
'',
'C:\\Users\\Nadeem\\Code\\python3\\python\\PCbuild\\python33_d.zip',
'C:\\Users\\Nadeem\\Code\\python3\\python\\DLLs',
'C:\\Users\\Nadeem\\Code\\python3\\python\\lib',
'C:\\Users\\Nadeem\\Code\\python3\\python\\PCbuild',
'C:\\Users\\Nadeem\\AppData\\Roaming\\Python\\Python33\\site-packages',
'C:\\Users\\Nadeem\\Code\\python3\\python',
'C:\\Users\\Nadeem\\Code\\python3\\python\\lib\\site-packages']
os.listdir(sys.path[0]): ['Spamlib-0.1.dist-info']
ERROR
I noticed that the test succeeds if you run only the InstallDataTestCase (with
"... -v -m InstallDataTestCase test_packaging"), but the sys.path info for this
case is the same as before (modulo the name of the temp directory):
test_resources
(packaging.tests.test_command_install_data.InstallDataTestCase) ...
sys.path: ['c:\\users\\nadeem\\appdata\\local\\temp\\tmpddi17y\\tmp1mnv9z',
'',
'C:\\Users\\Nadeem\\Code\\python3\\python\\PCbuild\\python33_d.zip',
'C:\\Users\\Nadeem\\Code\\python3\\python\\DLLs',
'C:\\Users\\Nadeem\\Code\\python3\\python\\lib',
'C:\\Users\\Nadeem\\Code\\python3\\python\\PCbuild',
'C:\\Users\\Nadeem\\AppData\\Roaming\\Python\\Python33\\site-packages',
'C:\\Users\\Nadeem\\Code\\python3\\python',
'C:\\Users\\Nadeem\\Code\\python3\\python\\lib\\site-packages']
os.listdir(sys.path[0]): ['Spamlib-0.1.dist-info']
ok
Additionally, I've been getting a similar failure on my Ubuntu machine:
======================================================================
ERROR: test_resources
(packaging.tests.test_command_install_data.InstallDataTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/nadeem/code/src/cpython/def/Lib/packaging/tests/test_command_install_data.py",
line 129, in test_resources
with packaging.database.get_file('Spamlib', 'spamd') as fp:
File "/home/nadeem/code/src/cpython/def/Lib/packaging/database.py", line
649, in get_file
return open(get_file_path(distribution_name, relative_path),
File "/home/nadeem/code/src/cpython/def/Lib/packaging/database.py", line
644, in get_file_path
raise LookupError('no distribution named %r found' % distribution_name)
LookupError: no distribution named 'Spamlib' found
Output from Ubuntu machine:
test_resources
(packaging.tests.test_command_install_data.InstallDataTestCase) ...
sys.path: ['/tmp/tmpubkdye/tmpdmdybx',
'',
'/usr/local/lib/python33.zip',
'/home/nadeem/code/src/cpython/def/Lib',
'/home/nadeem/code/src/cpython/def/Lib/plat-linux',
'/home/nadeem/code/src/cpython/def/build/lib.linux-x86_64-3.3',
'/home/nadeem/.local/lib/python3.3/site-packages',
'/usr/local/lib/python3.3/site-packages']
os.listdir(sys.path[0]): ['Spamlib-0.1.dist-info']
ERROR
----------
nosy: +nadeem.vawda
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue13193>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com