Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#14912 closed defect (fixed)

py25-setuptools should include site.py

Reported by: stefan@… Owned by: stechert@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: python, easy_install, setuptools Cc: aalorbe@…, ryandesign (Ryan Carsten Schmidt), blb@…
Port: py-setuptools, py25-setuptools

Description

Setuptools 0.6c8_0 (package py25-setuptools) is currently broken, because the file site.py is not installed.

Change History (11)

comment:1 Changed 16 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to stechert@…

Assigning to maintainer.

comment:2 Changed 16 years ago by aalorbe@…

Cc: aalorbe@… added

Cc Me!

comment:3 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Port: py25-setuptools added

Could you describe how it's broken without this file? py-setuptools and py25-setuptools seem to work for me without this file.

comment:4 in reply to:  3 Changed 16 years ago by aalorbe@…

Replying to ryandesign@…:

Could you describe how it's broken without this file? py-setuptools and py25-setuptools seem to work for me without this file.

So, it turns out it was not the file. Instead, I did the following to fix the problem, after I reinstalled MacPorts from scratch:

  • The problem is described here:
    http://bugs.python.org/setuptools/issue4
    • Went with the solutions listed in msg14 and msg56 of issue4 (messages are repeated below). That is, from bottom up, first applied patch described in http://bugs.python.org/file10198/setuptools_patch.txt (navigated there by going to http://bugs.python.org/issue2770 and then clicking on "setuptools_patch.txt") and then added "from distutils import log" to top of sdist.py)
    • For reference:
      msg56 (view)  	Author: gsf  	Date: 2008-07-11.19:59:34  	
      
      In addition to the patch, sdist.py should include "from distutils import log" --
      that's where the error is coming from.
      
      msg14 (view) 	Author: durin42 	Date: 2008-05-12.18:15:58 	
      
      There's a patch which fixes the underlying problem (although not the missing 
      import of log) at http://bugs.python.org/issue2770 which was marked as a duplicate 
      of this issue.
      

I'm not sure if the initial error message I got was because my installation of MacPorts was screwed up, but when I reinstalled from scratch I got the same error as described in http://bugs.python.org/setuptools/issue4

I think everyone else is going to get the same error until one of the many fixes described in http://bugs.python.org/setuptools/issue4 is implemented.

comment:5 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

I did fix py-setuptools and py25-setuptools to recognize Subversion 1.5 working copies in #16017. I did not add "import log" because it didn't seem to be necessary to fix this issue and I didn't understand what adding that line was meant to fix. Do you still experience a problem with the updated version of py*-setuptools?

comment:6 in reply to:  5 ; Changed 16 years ago by macports@…

Replying to ryandesign@…:

I did fix py-setuptools and py25-setuptools to recognize Subversion 1.5 working copies in #16017. I did not add "import log" because it didn't seem to be necessary to fix this issue and I didn't understand what adding that line was meant to fix. Do you still experience a problem with the updated version of py*-setuptools?

The "import log" statement is not necessary, because it's included in the new version of setuptools that the port now points to.

However, I'm still having problems with the missing dist.py. Looking at the Portfile, the file is deleted, but there is no reason given as to why that is. I'm also having trouble figuring out why that would be.

comment:7 in reply to:  6 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to macports@…:

I'm still having problems with the missing dist.py. Looking at the Portfile, the file is deleted, but there is no reason given as to why that is. I'm also having trouble figuring out why that would be.

Could you be more specific about what problems you're experiencing?

I assume you mean site.py, not dist.py (which the Portfile doesn't mention)? If so, then it looks like that file is being deleted because it is apparently unnecessary; see r16819. If you disagree, you could ask Bryan why he made that change.

comment:8 Changed 16 years ago by stefan@…

From http://mail.python.org/pipermail/distutils-sig/2007-December/008550.html:

You have a broken setuptools installation in /opt, which is missing site.py. I'm afraid that setuptools isn't designed to gracefully handle the situation where random files are simply missing from the installation.

comment:9 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: blb@… added
Port: py-setuptools added
Resolution: fixed
Status: newclosed

Ok, well that posting (by Phillip J. Eby, the principal author of setuptools) is pretty clear. In addition to what you quoted above, he says:

I'm going to guess that it's missing because it was installed using an RPM or some other package put together by someone who had the hubris to assume that I would actually include files in setuptools that aren't *necessary* for its operation, and that it would therefore be "better" for them to remove it. If this is the case, please educate them regarding the error of their ways -- it will be taken more seriously from an actual user bitten by it, than from me.

I still don't know why Bryan changed the port in r16819 to no longer install site.py, nor why he claimed in the log message that the file was unnecessary, nor why it took two years after that change for anyone to report the problem to us. Maybe the file did not used to be required, but now is. In any case, given the software author's statement, I changed the ports to again install that file, as of r39983.

comment:10 in reply to:  9 Changed 16 years ago by blb@…

Replying to ryandesign@…:

I still don't know why Bryan changed the port in r16819 to no longer install site.py, nor why he claimed in the log message that the file was unnecessary, nor why it took two years after that change for anyone to report the problem to us. Maybe the file did not used to be required, but now is. In any case, given the software author's statement, I changed the ports to again install that file, as of r39983.

I think (and since this was 2.5 years ago, I could definitely be remembering wrong) is that since it was putting site.py into ${prefix}/lib/python*/site-packages/ instead of where the base site.py is located, I may have believed it to be unnecessary. Or it was interfering with a site.py already present there, though I don't see one with python2.5.

comment:11 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.