[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2021-02-03 Thread Steve Dower


Steve Dower  added the comment:

Distutils is now deprecated (see PEP 632) and all tagged issues are being 
closed. From now until removal, only release blocking issues will be considered 
for distutils.

If this issue does not relate to distutils, please remove the component and 
reopen it. If you believe it still requires a fix, most likely the issue should 
be re-reported at https://github.com/pypa/setuptools

--
nosy: +steve.dower
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2014-03-12 Thread Éric Araujo

Éric Araujo added the comment:

The fix for #4931 may also fix this bug.  The patch should be changed to remove 
the code changes and adapt the tests.

--
components:  -Distutils2
versions: +Python 3.4 -3rd party, Python 3.2

___
Python tracker 

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



[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2011-09-06 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for testing the patch higery.  I wonder if another exception was raised 
but ignored by unittest.

--

___
Python tracker 

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



[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2011-09-06 Thread Éric Araujo

Changes by Éric Araujo :


Removed file: http://bugs.python.org/file23101/unnamed

___
Python tracker 

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



[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2011-09-05 Thread Éric Araujo

Éric Araujo  added the comment:

> I really don't think C error messages are portable, so you shouldn't
> test for them :)

Too bad.  I’ll have to be satisfied with a manual test from Michael then.

--

___
Python tracker 

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



[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2011-09-05 Thread higery

higery  added the comment:

I have run the 'test_install_lib' on cpython3.3(windows version), the
'test_install_error' failed.

The detail is:

*FAIL: test_install_error (__main__.InstallLibTestCase)
--
Traceback (most recent call last):
  File "D:\add-develop-command\Lib\distutils\tests\test_install_lib.py",
line 112, in test_install_error
cmd.run()
AssertionError: DistutilsFileError not raised*

The corresponding lines are:
*
with self.assertRaises(DistutilsFileError) as cm:
cmd.run()*

--
Added file: http://bugs.python.org/file23101/unnamed

___
Python tracker 

___I have run the 'test_install_lib' on cpython3.3(windows version), the 
'test_install_error' failed.The detail is: FAIL: 
test_install_error 
(__main__.InstallLibTestCase)--
Traceback (most recent call last):  File 
"D:\add-develop-command\Lib\distutils\tests\test_install_lib.py", 
line 112, in test_install_error    cmd.run()AssertionError: 
DistutilsFileError not raised
The corresponding lines are:with 
self.assertRaises(DistutilsFileError) as cm:        cmd.run()
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2011-09-03 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> The test makes sure that the error message contains the path to the
> file (which the incomplete error message you report also does, BTW),
> and an explanation of the error (to address the OP’s concern that the
> message must be helpful): it looks for the string 'denied'; if this is
> not cross-platform, I won’t commit this line. 

I really don't think C error messages are portable, so you shouldn't
test for them :)

--

___
Python tracker 

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



[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2011-09-03 Thread Éric Araujo

Éric Araujo  added the comment:

I have a patch that needs testing on Cpython Windows and if possible IPython.  
The test makes sure that the error message contains the path to the file (which 
the incomplete error message you report also does, BTW), and an explanation of 
the error (to address the OP’s concern that the message must be helpful): it 
looks for the string 'denied'; if this is not cross-platform, I won’t commit 
this line.  (Antoine, I’ve made you nosy because I think you may have expertise 
on that last point.)

(BTW, I have tracked down the source of the mysterious None (I’m getting better 
at these things, but my mental sanity takes a toll each time): core.setup 
catches the exception and wants to display exc.filename and exc.strerror.)

--
assignee: tarek -> eric.araujo
components: +Distutils, Distutils2
keywords: +needs review, patch
nosy: +alexis, higery, pitrou
stage: needs patch -> patch review
versions: +3rd party, Python 3.3 -Python 3.1
Added file: http://bugs.python.org/file23093/fix-7219.diff

___
Python tracker 

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



[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2010-11-11 Thread Éric Araujo

Éric Araujo  added the comment:

I wonder if this is IronPython-specific.  Could you temporarily make the 
site-packages directory of a py3k CPython read-only and try to install a 
distribution with that CPython?  I can try the same thing on unix.

--

___
Python tracker 

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



[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2010-08-14 Thread Michael Foord

Michael Foord  added the comment:

The "None" error message *looks* to me like the result of a failed assertion. 
That may not be correct of course...

--

___
Python tracker 

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



[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2010-08-13 Thread Éric Araujo

Éric Araujo  added the comment:

An IOError is raised but file_util._copy_file_contents only produces the 
helpful message “could not create '': ” when catching os.error.

Catching both classes is easy. We’d need a regression test first, and before 
that, agreement from Tarek that such a change would be okay.

I wonder what is this mysterious None that we get as a result.

--

___
Python tracker 

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



[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2010-08-11 Thread Michael Foord

Michael Foord  added the comment:

Output below, first without DISTUTILS_DEBUG (showing the not very useful 
default message) and second with. (The actual exception is "Access to the path 
'C:\Program Files\IronPython 2.7\Lib\site-packages\mock.py' is denied.")

This is with IronPython 2.7A1 which includes the Python 2.7 standard library.

> ipy setup.py build
running build
running build_py
warning: build_py: byte-compiling is disabled, skipping.

C:\compile\mock
> ipy setup.py install
running install
running build
running build_py
warning: build_py: byte-compiling is disabled, skipping.

running install_lib
copying build\lib\mock.py -> C:\Program Files\IronPython 2.7\Lib\site-packages
error: C:\Program Files\IronPython 2.7\Lib\site-packages\mock.py: None
C:\compile\mock
> set DISTUTILS_DEBUG=1

C:\compile\mock
> ipy setup.py install
options (after parsing config files):
options (after parsing command line):
option dict for 'install' command:
  {}
option dict for 'sdist' command:
  {'force_manifest': ('setup.cfg', '1')}
running install
Distribution.get_command_obj(): creating 'install' command object
pre-finalize_{unix,other}:
  prefix: None
  exec_prefix: None
  home: None
  user: 0
  install_base: None
  install_platbase: None
  root: None
  install_purelib: None
  install_platlib: None
  install_lib: None
  install_headers: None
  install_scripts: None
  install_data: None
  compile: None
  compile: True
  optimize: None
  force: None
  skip_build: 0
  record: None
post-finalize_{unix,other}():
  prefix: C:\Program Files\IronPython 2.7
  exec_prefix: None
  home: None
  user: 0
  install_base: C:\Program Files\IronPython 2.7
  install_platbase: C:\Program Files\IronPython 2.7
  root: None
  install_purelib: $base/Lib/site-packages
  install_platlib: $base/Lib/site-packages
  install_lib: None
  install_headers: $base/Include/$dist_name
  install_scripts: $base/Scripts
  install_data: $base
  compile: None
  compile: True
  optimize: None
  force: None
  skip_build: 0
  record: None
post-expand_basedirs():
  prefix: C:\Program Files\IronPython 2.7
  exec_prefix: None
  home: None
  user: 0
  install_base: C:\Program Files\IronPython 2.7
  install_platbase: C:\Program Files\IronPython 2.7
  root: None
  install_purelib: $base/Lib/site-packages
  install_platlib: $base/Lib/site-packages
  install_lib: None
  install_headers: $base/Include/$dist_name
  install_scripts: $base/Scripts
  install_data: $base
  compile: None
  compile: True
  optimize: None
  force: None
  skip_build: 0
  record: None
config vars:
{'base': 'C:\\Program Files\\IronPython 2.7',
 'dist_fullname': 'mock-0.7.0',
 'dist_name': 'mock',
 'dist_version': '0.7.0',
 'exec_prefix': 'C:\\Program Files\\IronPython 2.7',
 'platbase': 'C:\\Program Files\\IronPython 2.7',
 'prefix': 'C:\\Program Files\\IronPython 2.7',
 'py_version': '2.7.0',
 'py_version_nodot': '27',
 'py_version_short': '2.7',
 'sys_exec_prefix': 'C:\\Program Files\\IronPython 2.7',
 'sys_prefix': 'C:\\Program Files\\IronPython 2.7',
 'userbase': 'C:\\Users\\michael\\AppData\\Roaming\\Python',
 'usersite': 'C:\\Users\\michael\\AppData\\Roaming\\Python\\Python27\\site-packa
ges'}
post-expand_dirs():
  prefix: C:\Program Files\IronPython 2.7
  exec_prefix: None
  home: None
  user: 0
  install_base: C:\Program Files\IronPython 2.7
  install_platbase: C:\Program Files\IronPython 2.7
  root: None
  install_purelib: C:\Program Files\IronPython 2.7/Lib/site-packages
  install_platlib: C:\Program Files\IronPython 2.7/Lib/site-packages
  install_lib: None
  install_headers: C:\Program Files\IronPython 2.7/Include/mock
  install_scripts: C:\Program Files\IronPython 2.7/Scripts
  install_data: C:\Program Files\IronPython 2.7
  compile: None
  compile: True
  optimize: None
  force: None
  skip_build: 0
  record: None
after prepending root:
  prefix: C:\Program Files\IronPython 2.7
  exec_prefix: None
  home: None
  user: 0
  install_base: C:\Program Files\IronPython 2.7
  install_platbase: C:\Program Files\IronPython 2.7
  root: None
  install_purelib: C:\Program Files\IronPython 2.7\Lib\site-packages
  install_platlib: C:\Program Files\IronPython 2.7\Lib\site-packages
  install_lib: C:\Program Files\IronPython 2.7\Lib\site-packages\
  install_headers: C:\Program Files\IronPython 2.7\Include\mock
  install_scripts: C:\Program Files\IronPython 2.7\Scripts
  install_data: C:\Program Files\IronPython 2.7
  compile: None
  compile: True
  optimize: None
  force: None
  skip_build: 0
  record: None
Distribution.get_command_obj(): creating 'build' command object
running build
running build_py
Distribution.get_command_obj(): creating 'build_py' command object
warning: build_py: byte-compiling is disabled, skipping.

running install_lib
Distribution.get_command_obj(): creating 'install_lib' command object
copying build\lib\mock.py -> C:\Program Files\IronPython 2.7\Lib\site-packages
error: C:\Program Files\IronPython 2.7\Lib\site-packages\mock.py: None
Traceback (most recent call last):
  Fil

[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2010-08-02 Thread Éric Araujo

Éric Araujo  added the comment:

Could you run ipy.exe setup.py build, then set DISTUTILS_DEBUG in the 
environment and run ipy.exe
setup.py install?

--
nosy: +merwok

___
Python tracker 

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



[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2010-07-11 Thread Mark Lawrence

Changes by Mark Lawrence :


--
keywords: +easy -26backport
versions: +Python 3.1 -Python 2.6

___
Python tracker 

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



[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2009-10-27 Thread Michael Foord

New submission from Michael Foord :

This problem showed up when installing a package with IronPython, where
the site-packages folder requires admin privileges to write to (which
*should* be true with CPython Windows but isn't).

If you perform a 'python setup.py install' without admin privileges the
install fails (as it should) but with a very cryptic error message:

C:\compile\test\foo-1.0>"C:\Program Files\IronPython 2.6\ipy.exe"
setup.py install
running install
running build
running build_py
creating build
creating build\lib
copying foo.py -> build\lib
running install_lib
copying build\lib\foo.py -> C:\Program Files\IronPython
2.6\Lib\site-packages
error: C:\Program Files\IronPython 2.6\Lib\site-packages\foo.py: None

--
assignee: tarek
keywords: 26backport
messages: 94554
nosy: michael.foord, tarek
priority: normal
severity: normal
stage: needs patch
status: open
title: Unhelpful error message when a distutils package install fails due to a 
permissions error
type: behavior
versions: Python 2.6, Python 2.7, Python 3.2

___
Python tracker 

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