Opened 12 years ago

Last modified 11 years ago

#1949 enhancement new

can't run trial with Python that requires LD_LIBRARY_PATH set

Reported by: Glyph Owned by:
Priority: high Milestone:
Component: core Keywords:
Cc: Branch:


It's currently impossible to get a clean trial twisted run from a user-installed python if your user installation mechanism requires any environment variables to be able to run local executables.

I wish we had a buildbot for this.

All of the required changes are in test code, though; I've attached a patch.

Attachments (1)

run-user-installed.diff (4.7 KB) - added by Glyph 12 years ago.

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by Glyph

Attachment: run-user-installed.diff added

comment:1 Changed 12 years ago by Jean-Paul Calderone

I prefer an inclusive environment setup. It should not be necessary to pass your entire environment on when spawning a child environment. There used to be helper methods for launching a Python child process but someone deleted them. At the time, I think they only set up PYTHONPATH, but they would have been a reasonable place to set LD_LIBRARY_PATH as well.

The ultimate point is that one should not need to be aware of these ridiculous platform requirements when launching a process. It just results in buggy, non-portable code.

comment:2 Changed 12 years ago by Glyph

I agree, and my patch was a bit of a straw man, I just uploaded what I had to do a trial run for the amp branch. These tests should obviously be using a utility function.

Unfortunately I think that inclusive environment setups (at least for test cases) are likely to be a lost cause in the long term, because the ridiculousness that the platform can get up to with environment variables is unbounded. A feature added to combinator to track the current environment is a case in point: it sets COMBINATOR_PATHS and COMBINATOR_PROJECTS and then expects every invocation of Python to look for those variables.

comment:3 Changed 11 years ago by Glyph

Priority: normalhigh

comment:4 Changed 7 years ago by <automation>

Owner: Glyph deleted
Note: See TracTickets for help on using tickets.