This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: DESTDIR improvement
Type: Stage:
Components: Build Versions: Python 2.3
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: loewis, nijel, wrobell
Priority: normal Keywords: patch

Created on 2003-05-12 10:30 by nijel, last changed 2022-04-10 16:08 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
Makefile.pre.in.patch nijel, 2003-05-12 10:31
Messages (7)
msg43687 - (view) Author: Michal Čihař (nijel) * Date: 2003-05-12 10:30
Byte compile correctly with DESTDIR.
msg43688 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-05-16 06:09
Logged In: YES 
user_id=21627

What is the rationale of this patch? If I set DESTDIR to,
say, /tmp/py, why is passing -d /tmp/py to compileall desirable?
msg43689 - (view) Author: wrobell (wrobell) Date: 2003-05-16 08:52
Logged In: YES 
user_id=387193

A simple test, to describe the problem, below.

DESTDIR is set to "/home/users/user/tmp/python-2.3b1-root-user".
-----------------
import logging
 
class X:
    pass
 
logging.setLoggerClass(X)
-------------------

Code above gives following exception:

Traceback (most recent call last):
  File "tracedir.py", line 6, in ?
    logging.setLoggerClass(X)
  File
"/home/users/user/tmp/python-2.3b1-root-user/usr/lib/python2.3/logging/__init__.py",
line 729, in setLoggerClass
TypeError: logger not derived from logging.Logger: X

I _suppose_ that, after applying the patch the exception
will look like:

Traceback (most recent call last):
  File "tracedir.py", line 6, in ?
    logging.setLoggerClass(X)
  File "/usr/lib/python2.3/logging/__init__.py", line 729,
in setLoggerClass
TypeError: logger not derived from logging.Logger: X

There will be no DESTDIR part in the module filepath.
msg43690 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-05-16 21:42
Logged In: YES 
user_id=21627

Please test this on your machine. The byte code of
__init__.py will still point to 

/home/users/user/tmp/python-2.3b1-root-user/usr/lib/python2.3/logging/__init__.py

with your patch applied.
msg43691 - (view) Author: Michal Čihař (nijel) * Date: 2003-05-19 09:51
Logged In: YES 
user_id=192186

I forgot to mention, that the patch was larger before, but I
saw many simmilar things applied in CVS, so this _should_
work with CVS version. However I will test it today...
msg43692 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-06-21 13:27
Logged In: YES 
user_id=21627

The patch is incorrect: setting -d to DESTDIR will cause
DESTDIR to be hard-coded. Correct is to use LIBDEST,
committed as Makefile.pre.in 1.134
msg43693 - (view) Author: Michal Čihař (nijel) * Date: 2003-06-26 13:44
Logged In: YES 
user_id=192186

Yes, you're right, sorry for posting bad patch....
History
Date User Action Args
2022-04-10 16:08:42adminsetgithub: 38485
2003-05-12 10:30:59nijelcreate