[issue24960] Can't use pip or easy_install with embeddable zip file.

2016-07-03 Thread fourplusone

fourplusone added the comment:

The problem is indeed that lib2to3 fails to load the Grammar.txt file if it is 
located inside a .zip archive.

I think one way to fix it is using of the "get_data" function of the loader  
https://docs.python.org/3/library/importlib.html#importlib.abc.ResourceLoader.get_data

However, this would make caching the Grammar more difficult, as one cannot 
write back the pickled dict to a zip file

Alternatively one could generate an importable *.pyc file from the grammar 
during the build process

--
nosy: +fourplusone

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24960] Can't use pip or easy_install with embeddable zip file.

2015-11-26 Thread Florian Hassanen

Florian Hassanen added the comment:

got this traceback:

Traceback (most recent call last):
  File "setup.py", line 169, in 
dist = setuptools.setup(**setup_params)
  File "distutils\core.py", line 134, in setup
  File "...\setuptools\setuptools\dist.py", line 299, in parse_command_line
result = _Distribution.parse_command_line(self)
  File "distutils\dist.py", line 469, in parse_command_line
  File "...\setuptools\setuptools\dist.py", line 679, in handle_display_options
return _Distribution.handle_display_options(self, option_order)
  File "distutils\dist.py", line 672, in handle_display_options
  File "...\setuptools\setuptools\dist.py", line 439, in print_commands
cmdclass = ep.resolve()
  File "...\setuptools\pkg_resources\__init__.py", line 2383, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "...\setuptools\setuptools\command\build_py.py", line 10, in 
from setuptools.lib2to3_ex import Mixin2to3
  File "...\setuptools\setuptools\lib2to3_ex.py", line 12, in 
from lib2to3.refactor import RefactoringTool, get_fixers_from_package
  File "", line 969, in _find_and_load
  File "", line 958, in _find_and_load_unlocked
  File "", line 664, in _load_unlocked
  File "", line 634, in _load_backward_compatible
  File "lib2to3\refactor.py", line 27, in 
  File "", line 969, in _find_and_load
  File "", line 958, in _find_and_load_unlocked
  File "", line 664, in _load_unlocked
  File "", line 634, in _load_backward_compatible
  File "lib2to3\fixer_util.py", line 9, in 
  File "", line 969, in _find_and_load
  File "", line 958, in _find_and_load_unlocked
  File "", line 664, in _load_unlocked
  File "", line 634, in _load_backward_compatible
  File "lib2to3\pygram.py", line 32, in 
  File "lib2to3\pgen2\driver.py", line 121, in load_grammar
  File "lib2to3\pgen2\pgen.py", line 385, in generate_grammar
  File "lib2to3\pgen2\pgen.py", line 15, in __init__
FileNotFoundError: [Errno 2] No such file or directory: 
'...\\python-3.5.0-embed-amd64\\python35.zip\\lib2to3\\Grammar.txt'


triggered e.g. by "python setup.py --help-commands" (when building setuptools)

workaround is to extract "...\python-3.5.0-embed-amd64\python35.zip" into a 
__directory__ named exactly the same (hence a directory named "python35.zip" 
which replaces the original zip file)

--
nosy: +Florian Hassanen

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24960] Can't use pip or easy_install with embeddable zip file.

2015-09-04 Thread Donald Stufft

Donald Stufft added the comment:

This looks more like lib2to3 doesn't support running from a .zip archive.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24960] Can't use pip or easy_install with embeddable zip file.

2015-09-04 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +Marcus.Smith, dstufft, ncoghlan, paul.moore

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24960] Can't use pip or easy_install with embeddable zip file.

2015-08-29 Thread Oleg N

New submission from Oleg N:

Error: [Errno 2] No such file or directory: 
'...\\python35.zip\\lib2to3\\Grammar.txt'. Python35.zip from this archive: 
https://www.python.org/ftp/python/3.5.0/python-3.5.0rc2-embed-amd64.zip. Path 
is correct.

--
components: Library (Lib)
messages: 249329
nosy: Oleg N
priority: normal
severity: normal
status: open
title: Can't use pip or easy_install with embeddable zip file.
type: resource usage
versions: Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24960
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com