[issue26074] Add a method to pip.. pip.require("package_name")

2016-01-23 Thread Blaize Rhodes

Blaize Rhodes added the comment:

Righto.. will talk to the pip dudes.  Thanks for your time.  

(@matrixise The reason I posted this here is because pip is included as part of 
the cpython distribution.  None of the documentation I've seen suggests that 
this isn't a forum for discussing the std python libs, and indeed there seem to 
be many enhancement requests for python libs in this bug db.  It seems that pip 
has some special status as included as part of the std python distribution but 
not part of the std libs.  I would have thought that it was obvious from the 
context that I was unaware of this fact at the time I posted the request.  Does 
that answer your question?  What's with the attitude?  You've never made a 
mistake I take it?).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26074] Add a method to pip.. pip.require("package_name")

2016-01-10 Thread Blaize Rhodes

New submission from Blaize Rhodes:

The idea is to add a method to pip that tries to import a package and if the 
import fails then try to download and install the package handling the UI.

Yes, you can put the package as a dependency in your pip config for 
your code.  This is intended for the case when you have a bunch of 
python tools/libs in some shared repository in your organization.
People check the code out and expect it to run but it has third party 
dependencies.  There is no install step for your code, per se.  Furthermore the 
people using your code don't know enough about python to install things 
themselves.

Proposed syntax is:

import pip
pip.require("foo")

If you search online for pip.main you'll see a whole bunch of hall-baked 
brittle solutions to this problem that look like this:

try:
import foo
except ImportError:
 pip.main("install", "foo")

--
files: require.py
messages: 257903
nosy: Blaize Rhodes
priority: normal
severity: normal
status: open
title: Add a method to pip.. pip.require("package_name")
type: enhancement
Added file: http://bugs.python.org/file41565/require.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26074] Add a method to pip.. pip.require("package_name")

2016-01-10 Thread Stéphane Wirtel

Stéphane Wirtel added the comment:

But in fact, Pip is an external project to CPython.

Could you explain why you post this issue in the CPython Bug Tracker?

Thank you

--
nosy: +matrixise

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26074] Add a method to pip.. pip.require("package_name")

2016-01-10 Thread Blaize Rhodes

Blaize Rhodes added the comment:

I'm more than happy to fill in the contributor agreement.. but it seems like a 
hassle if, what I'm assuming will happen, someone points out a good reason why 
this hasn't been done already.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26074] Add a method to pip.. pip.require("package_name")

2016-01-10 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report, but this should be discussed either at 
https://groups.google.com/forum/#!forum/pypa-dev or 
https://github.com/pypa/pip/issues

--
nosy: +berker.peksag
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com