The file PREFIX/lib/python2.5/site-packages/easy-install.pth which tells Python what egg files to look in for libraries installed with the Easy Install system is not maintained across upgrading the devel/py-setuptools port. This means that after an upgrade importing libraries which where installed with the Easy Install system will fail. Fix: The current workaround is to reinstall all of the ports which use the Easy Install system. How-To-Repeat: Upgrade devel/py-setuptools. Run Python and try to import a library installed with Easy Install (for example devel/py-pytz): [douglas@slowhand:~]$ python Python 2.5.1 (r251:54863, Nov 10 2007, 23:43:31) [GCC 3.4.6 [FreeBSD] 20060305] on freebsd6 Type "help", "copyright", "credits" or "license" for more information. >>> import pytz Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named pytz >>>
Responsible Changed From-To: freebsd-ports-bugs->python Over to maintainer (via the GNATS Auto Assign Tool)
Responsible Changed From-To: python->freebsd-python Canonicalize assignment.
Just got bit by this bug, too. Annoying.
I just hit the same thing and it fried all our Trac sites .. very unpleasant Somewhat quicker workaround - edit /usr/local/lib/pythonX.X/easy-install.pth and add the names of all directories under /usr/local/lib/pythonX.X/, that end in .egg For our setup after update easy-install.pth contains: import sys; sys.__plen = len(sys.path) ./setuptools-0.6c9-py2.5.egg import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new) should be: import sys; sys.__plen = len(sys.path) ./setuptools-0.6c9-py2.5.egg ./Trac-0.11.1-py2.5.egg ./Genshi-0.5.1-py2.5-freebsd-7.0-STABLE-amd64.egg ./Pygments-0.11.1-py2.5.egg import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)
Being just bitten by this again, I see it is not fixed yet. A plain cd /usr/local/lib/pythonX.X/ awk '\!/setuptools/ {print $0}; /setuptools/ { system("ls -ld *.egg | awk '"'"'{ print \"./\"$9 }'"'"'") }' easy-install.pth > temp_file mv temp_file easy-install.pth does the job, but I think the proper solution for the port would be to simply copy the easy-install.pth file before updating and restore it afterwards, because if you have installed some .egg's by some other means, you will be doubling their declarations by generating the file in this way. I can't expect that I will remember to copy the file next time we have setuptools update, so I thought - prepare yourself, save the awk script in the PR. Seems I remembered the place, not the details anyway.
Hi, > [2007/11/28 Douglas William Thrift <douglas@douglasthrift.net>] >>Synopsis: =A0 =A0 =A0 devel/py-setuptools easy-install.pth contents lost = on upgrade clobbering ports using it The following patch should solve the issue: http://people.freebsd.org/~nivit/diffs/py-setuptools.txt --=20 Nicola Vitale
On 3/8/2011 7:05 AM, Nicola Vitale wrote: > Hi, > >> [2007/11/28 Douglas William Thrift <douglas@douglasthrift.net>] >>> Synopsis: devel/py-setuptools easy-install.pth contents lost on upgrade clobbering ports using it > > The following patch should solve the issue: > > http://people.freebsd.org/~nivit/diffs/py-setuptools.txt > Awesome! The patch looks good to me, and it makes me think: "why didn't I think of that?" Thanks! -- Douglas William Thrift <douglas@douglasthrift.net> <http://douglasthrift.net/>
is this still open? 2007? patch added in March 2011 by nivit@FreeBSD.org ? patch applies cleanly, portlint -C is happy. any reason this should NOT be committed? -- Michael Scheidell, CTO o: 561-999-5000 d: 561-948-2259 >*| *SECNAP Network Security Corporation * Best Mobile Solutions Product of 2011 * Best Intrusion Prevention Product * Hot Company Finalist 2011 * Best Email Security Product * Certified SNORT Integrator ______________________________________________________________________ This email has been scanned and certified safe by SpammerTrap(r). For Information please see http://www.spammertrap.com/ ______________________________________________________________________
State Changed From-To: open->feedback
State Changed From-To: feedback->closed Committed
scheidell 2012-01-06 16:36:03 UTC FreeBSD ports repository Modified files: devel/py-setuptools Makefile pkg-plist Added files: devel/py-setuptools/files pkg-install.in Log: - Fixes: easy-install.pth contents lost on upgrade clobbering ports using it PR: ports/118301 Submitted by: Douglas William Thrift <douglas@douglasthrift.net> Approved by: lars.eggert@nokia.com (maintainer, timeout 3 years), gabor (mentor) Revision Changes Path 1.23 +11 -1 ports/devel/py-setuptools/Makefile 1.1 +24 -0 ports/devel/py-setuptools/files/pkg-install.in (new) 1.12 +4 -2 ports/devel/py-setuptools/pkg-plist _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: closed->suspended Reopening pr, set to suspended. This will need more thought.
As promissed, attached is a patch to back out portrevision 3, or, most specifically, leave it as an option knob, default off. It packages just fine, with and without: http://people.freebsd.org/~scheidell/py27-setuptools-0.6c11_4.WITHOUT.log (the default, just like it did before portrevision 3) and, with: (with option knob set) by looking at Makefile, and pkg-plist changes, I think I correctly wrapped !defines() around all the changed things. (note: this sat for 3 years. python@ got 'open pr' emails, once a week, so, speak up now, or forever hold your peace. or nra members, your piece) I can tell you this packages, both ways, leaves no left overs, but I can't tell you if it solves the original problem with the knob, or the problem created with revision 3. But I can tell you, it looks like this attached patch reverses revision 3. Please, if you have any stake in this, test it, or, in when this gets committed, don't complain. -- Michael Scheidell, CTO SECNAP Network Security Corporation http://people.freebsd.org/~scheidell ______________________________________________________________________ This email has been scanned and certified safe by SpammerTrap(r). For Information please see http://www.spammertrap.com/ ______________________________________________________________________
On Fri, Feb 24, 2012 at 8:43 AM, Michael Scheidell <scheidell@freebsd.org> wrote: > As promissed, attached is a patch to back out portrevision 3, or, most sp= ecifically, leave it as an option knob, default > off. > > It packages just fine, with and without: > > http://people.freebsd.org/~scheidell/py27-setuptools-0.6c11_4.WITHOUT.log= =C2=A0(the default, just like it did before > portrevision 3) > > and, with: (with option knob set) > > by looking at Makefile, and pkg-plist changes, I think I correctly wrappe= d !defines() around all the changed things. > > (note: this sat for 3 years. =C2=A0python@ got 'open pr' emails, once a w= eek, so, speak up now, or forever hold your peace. or > nra members, your piece) > > I can tell you this packages, both ways, leaves no left overs, but I can'= t tell you if it solves the original problem with > the knob, or the problem created with revision 3. =C2=A0But I can tell yo= u, it looks like this attached patch reverses revision > 3. > > Please, if you have any stake in this, test it, or, in when this gets com= mitted, don't complain. > -- > Michael Scheidell, CTO > SECNAP Network Security Corporation > http://people.freebsd.org/~scheidell > > ______________________________________________________________________ > This email has been scanned and certified safe by SpammerTrap(r). > For Information please see http://www.spammertrap.com/ > ______________________________________________________________________ > > > _______________________________________________ > freebsd-python@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-python > To unsubscribe, send any mail to "freebsd-python-unsubscribe@freebsd.org" > Hello, What was the issue with portrevision 3? Also the name and description of the new knob do not make sense. What the knob enables is preserving the contents of the easy-install.pth file which specifies what packages are installed; easy-install itself is core functionality of setuptools that is not affected by the knob. It really seems unacceptable that upgrading setuptools pretty much clobbers dependent ports. When other things like libraries are upgraded in this fashion there is usually a notice in UPDATING or the portrevision of dependent ports is bumped. I don't think having a knob makes any sense. Either fix whatever problem there is with what the preservation patch did or back it out and make sure whoever upgrades setuptools puts notices in UPDATING or bumps portrevisions. Thanks! --=20 Douglas William Thrift <douglaswth@gmail.com> <http://douglasthrift.net/>
On 2012-02-24 20:18, Douglas Thrift wrote: > > ... > > What was the issue with portrevision 3? +1 > Also the name and description > of the new knob do not make sense. What the knob enables is > preserving > the contents of the easy-install.pth file which specifies what > packages are installed; easy-install itself is core functionality of > setuptools that is not affected by the knob. +1 Also I would add that setuptools is already superseded by distribute (devel/py-distribute). It does contain the same solution as py-setuptools_3. If there is a problem with it, may be a PR regarding that port is in order, though IMHO it works fine. Regards, Velko Ivanov
State Changed From-To: suspended->closed We have moved to devel/py-distribute and the fix is integrated. Please report if there is any other issues.