mangling of sys.path in setup.py makes installation of more than one lazr package fail

Reported by James Westby on 2009-07-16
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
LAZR package template
Undecided
Unassigned
lazr.batchnavigator
Undecided
Unassigned
lazr.config
Undecided
Unassigned
lazr.delegates
Undecided
Unassigned
lazr.lifecycle
Undecided
Unassigned
lazr.restfulclient
Undecided
Unassigned
lazr.smtptest
Undecided
Unassigned

Bug Description

Hi,

setup.py does

  sys.path.insert(0, "src")
  from lazr.restfulclient import __version__

however, if there is another lazr module in sys.path this will fail
with an import error, as the lazr package can't be split between
"src" and the other location in sys.path.

This means that if you

  setup.py install

lazr.uri, a dependency of lazr.restfulclient then

  setup.py install

in lazr.restfulclient will fail.

This makes it very difficult to install more than one lazr module.

This is a blocker for packaging the new launchpadlib. I could hack around
it in the package, but it would be better to fix it.

Thanks,

James

Related branches

James Westby (james-w) wrote :

Any comment on this? I'd rather not implement a hack in the packaging.

Thanks,

James

James Westby (james-w) wrote :

Hi,

Feature freeze for Ubuntu is at the end of this month, and I would like
to get the new launchpadlib in, but this is blocking it. Given that there
are new packages to integrate it will take some time, so I'm keen to
get this solved soon. Is there any interest in fixing it in lazr itself,
or shall I just patch it?

Thanks,

James

Gary Poster (gary) wrote :

We should put a versions.txt in the package, and have both setup.py and __init__.py read it. Then we can remove the path hack.

This affects the majority of lazr.* packages, inlcuding the template (lazr.yourpakg)

Leonard Richardson (leonardr) wrote :

I've implemented this fix for lazr.restful and lazr.restfulclient. I don't know what other lazr.* packages are in Ubuntu, but that might be enough for you to work with.

I'm working on the other lazr.* packages now. Let me know if you're unblocked by what I've done so far, and I can make it a little lower priority.

Leonard Richardson wrote:
> I've implemented this fix for lazr.restful and lazr.restfulclient. I
> don't know what other lazr.* packages are in Ubuntu, but that might be
> enough for you to work with.
>
> I'm working on the other lazr.* packages now. Let me know if you're
> unblocked by what I've done so far, and I can make it a little lower
> priority.

That's good thanks, as I am not packaging lazr.restful as this stage, so
I don't need to package the other lazr.* packages it depends on.

Thanks for your help.

James

Leonard Richardson (leonardr) wrote :

I've implemented the fix for lazr.uri, lazr.yourpkg, and lazr.enum. lazr.enum still needs to land and then I need to do a release of it; I'll do the release tomorrow. This should be enough for now.

Changed in lazr.yourpkg:
status: New → Fix Released
Changed in lazr.restfulclient:
status: New → Fix Released
Changed in lazr.lifecycle:
status: New → Confirmed
Changed in lazr.config:
status: New → Fix Released
Gary Poster (gary) on 2009-09-04
Changed in lazr.smtptest:
status: New → In Progress
Gary Poster (gary) on 2009-09-04
Changed in lazr.smtptest:
status: In Progress → Fix Committed
Changed in lazr.lifecycle:
status: Confirmed → Fix Released
Changed in lazr.delegates:
status: New → Fix Released
Changed in lazr.batchnavigator:
status: New → Fix Released
Anna SdG (anna-granudd) wrote :

Version 1.2 of lazr.smtptest on pypi still seems to be missing this fix, is there anybody out there feeling motivated to push a new version of it to pypi? Thanks, Anna

Barry Warsaw (barry) on 2013-01-07
Changed in lazr.smtptest:
status: Fix Committed → Fix Released
milestone: none → 2.0
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers