pyg icon indicating copy to clipboard operation
pyg copied to clipboard

Add an `install.py` to packs

Open rubik opened this issue 14 years ago • 14 comments

So users can install packed packages!

rubik avatar Jul 25 '11 15:07 rubik

+1 ;)

About packs, in zicbee, I totally remove the "package-version" folders since I base the final egg on other's egg content. Instead of setting a pythonpath of : foo.egg/something-version we can just foo.egg and have the packages at the root of the egg... it will change installation a lot, so we have to chose:

Current way

  • fetch pyg
  • unpack the egg containing sources
  • install each package from sources, in correct order

Bdist_Egg way

  • copy the egg to site packages
  • fix some .pth file
  • copy executables without the "run_" prefix

What process do you prefer ?

fdev31 avatar Jul 25 '11 16:07 fdev31

It's interesting, but where do we store every package's EGG-INFO dir? :)

rubik avatar Jul 25 '11 16:07 rubik

We don't store each of them, we merge it more or less like the current way....

fdev31 avatar Jul 25 '11 17:07 fdev31

Ok, we lose single metadata in favour of simplicity! That's fair... So, basically the new Pyg pack would look like this:

pyg-0.7.1
  |
  |- run_pyg.py
  |- run_pyg2.7.py
  |- run_easy_install.py
  |- pyg.egg
       |
       |- EGG-INFO
       |     |- spec
       |     |- etc.
       |- pyg
       |- pkgtools
       |- argh
       |- setuptools

It shouldn't be too difficult to change the packing process... :)

rubik avatar Jul 26 '11 09:07 rubik

What do you think?

rubik avatar Jul 26 '11 12:07 rubik

It is simpler than I thought, we could allow both modes...

EDIT: I'm in a hurry, executables are wrong now..

rubik avatar Jul 26 '11 13:07 rubik

Both modes are nice, we will settle on a peculiar one later :)

fdev31 avatar Jul 26 '11 13:07 fdev31

This is tough! :) We have to know where the bin directory is, to place scripts.

rubik avatar Jul 27 '11 08:07 rubik

I don't know whether is better to download pyg or not. We have to choose:

with Pyg Pack

  • We can add a --pack option to the install command so we can install packs easily
  • in the install.py file we download Pyg pack and execute it.

in addition to that, in install.py file we can verify whether Pyg is installed or not before downloading it.

without Pyg Pack

  • we have to copy some code from locations.py (bin path, site-packages) and core.py (egg install) and from other files.

I don't know what is better, what do you think?

rubik avatar Aug 11 '11 08:08 rubik

adding --pack to install command (or auto-detection of a pack file) is a good idea to me but I'm not sure to understand the install.py stuff that well, I think the pack should be autonomous to install itself as well ... we should chat about it in live, it will be easier probably, but I don't know when I'll get some free time :(

fdev31 avatar Aug 12 '11 10:08 fdev31

Ok, that's a nice idea! But for the pack to be autonomus, it has to know where the bin directory is and how to install eggs. And there is another problem: to be setuptools compliant it has to install egg-info as well and we don't have them in the pack...

rubik avatar Aug 12 '11 13:08 rubik

Hehe, In case it's hard to "meet" synchronously, we can start a discussion in the wiki, don't you think ? We will try to think about alternatives and then chose the less constraining one....

2011/8/12 rubik < [email protected]>

Ok, that's a nice idea! But for the pack to be autonomus, it has to know where the bin directory is and how to install eggs. And there is another problem: to be setuptools compliant it has to install egg-info as well and we don't have them in the pack...

Reply to this email directly or view it on GitHub: https://github.com/rubik/pyg/issues/101#issuecomment-1791327

fdev31 avatar Aug 12 '11 14:08 fdev31

Ok, nice idea! :)

rubik avatar Aug 12 '11 16:08 rubik

Now it should be possible (and quite easy) to write an install.py file.

rubik avatar Aug 14 '11 12:08 rubik