[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Removal of easy_install



On Tue, 8 May 2018, Ben Finney wrote:

The source package in question is wxpython4.0. The reason I use
easy_install is for installing the python2 version of the module as an
egg.

Okay, so from that I understand that the Debian package is not invoking
‘easy_install’ to fetch files from the network.

From what I remember, it is surprisingly difficult to convince
‘easy_install’ that it should never access the network, even when you
think you're only performing local operations. Probably it's best to
test this in a virtual machine isolated from the network, to be sure it
succeeds.

Correct - using easy_install to install the egg doesn't fetch files from the network. I haven't tried this in a virtual machine, but it definitely works fine on the Fedora builders which are pretty well hardened to have no network access.

The reason I do this is because wxpython3.0 occupies the 'namespace'
for the wx module for python2. In other words, both wxpython3.0 and
wxpython4.0 have a 'wx' module for python2. In order to avoid a
conflict, I install the wxpython4.0 version as an egg.

How does that avoid the conflict — that is, what is the effect of
installing the egg such that a namespace conflict is avoided?

I ask because it is likely that today's Python has a better way of
achieving the effect you're wanting, so that ‘easy_install’ is not
needed.

Installing the egg means that all the wxpython4.0 files are installed under:
/usr/lib/python2.7/dist-packages/wxPython-4.0.1-py2.7-linux-amd64.egg

Thus, any program or user who does an 'import wx' will get the wxpython3.0 module and if instead the wxpython4.0 module is desired, the user must manually insert the above path into sys.path or PYTHONPATH.

Scott

Reply to: