Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pypi-install improvements: --build-here, pypi.search #54

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

eichin
Copy link

@eichin eichin commented Oct 6, 2012

Today I found pypi-install. There's a big gap between "pypi-install takes a first draft try, installs it, and throws away the intermediate steps" and "you have to glue all of the pieces together by hand". In an attempt to narrow that gap, I added

  • --build-here -- creates a directory from the package name, and keeps all of the intermediate results (tells the user where to find the .deb in the end, but doesn't attempt to install it.) Also improves the Quickstart 1 warnings; pypi-install was a "dead end" on the path to good packages, pypi-install --build-here is a "first draft" that you can then polish.
  • pypi.search -- lots of packages have StudlyCaps names, which only get in the way; in particular, MANIFEST.in files use the all-lower-case names. If the direct lookup fails, this change just does a pypi.search and sanity checks it a bit. Works perfectly with StudlyCaps vs. lower-case; if it finds more matches, it stops and makes the user pick from the results.

I'll see what else I can do to improve the workflow; my main approach is going to be that "I saw something new at a pycon lightning talk, it's up on pypi, how easily can I get good packages together on my debian system?" "How easily can I share them" will probably be the next step.

  proper way to do it, but the other tools are tedious internal components.
  Instead, add --build-here which does all the setup in a local dir
  named for the package, so that you can do the easy thing if it works,
  and *then* you can refine it in place using the other interfaces,
  if it turns out that there's actually anything wrong...
  (and in particular, the names listed in MANIFEST) don't have them, so
  if that's all we have to go by, we're at another pointless roadblock.

Instead, if the what the user asked for doesn't match perfectly, try a
  pypi.search on the name; if there's exactly one match, run with it
  (if there are multiple matches, display them so the user can easily
  pick the right one and cut&paste it.)

(Simple example: I'm trying to use SST (selenium-simple-test), it
  needs PyVirtualDisplay, which has an unparseable MANIFEST.in; pydist
  ends up reporting "Cannot find installed package that provides
  easyprocess", so I try "pypi-install --build-here easyprocess",
  which failed to find anything.  With this change, I instead get

easyprocess not found, trying search:
EasyProcess 0.1.4
Easy to use python subprocess interface.
Assuming you meant EasyProcess

and it goes on and builds the package, which is what everyone actually
wants...)
@esc
Copy link
Collaborator

esc commented Oct 9, 2012

@eichin : stdeb is somewhat in limbo at the moment, your pull-request will hopefully be tended to sometime, but probably not that soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants