[Python-Dev] OneGet provider for Python

2014-11-14 Thread Vincent Povirk
I have been following OneGet development very closely, and I have
volunteered to create a OneGet provider for installing Python
packages. Normally, I would keep quiet about this sort of thing until
I have actual code that works, but since no one else on the OneGet
seems as interested in doing it, and the Python community (if this
mailing list is anything to go by) doesn't know what to make of this
stuff, I figured I should try to open lines of communication before I
start essentially making decisions on this community's behalf.

So, the main advantage of a Python provider is that you would be able
to do things like:
> Install-Package -Provider Python -Name Pygments
or
> Install-Package Pygments-2.0.1-py3-none-any.whl

and OneGet would be able to bootstrap (if necessary) the Python
provider itself, Python 3.x, and pip, and use pip to install the .whl.
(I'm unclear at the moment on whether pip is necessary to install a
.whl, but currently it looks to be the best thing to lean on for the
job of installing/uninstalling things).

My end goal is to be able to package a Python application such that an
end-user on Windows (who doesn't know anything about Python) can
easily install it, without either of us having to think about how all
the dependencies are going to get there.

I think that the best approach for the moment is to lean heavily on
pip for installing/uninstalling things, while duplicating other tasks
(such as listing installed packages, querying information about
package files, searching PyPI) in C# so that they do not require a
Python environment.

If anyone has questions or concerns about this, please let me know.
Keep in mind that I am not subscribed to the mailing list and will
have to be CC'd.

If anyone has questions about OneGet generally, you should probably
ask them directly (see https://github.com/OneGet/oneget), as I am not
a definitive source of information on the project.

Incidentally, it would be really useful if python.org provided stable
url's that always redirected to the latest .msi installers, for
bootstrapping purposes. I'd prefer to not rely on chocolatey (or on
scraping the web site) for this.

(Also, I don't think this is ready yet, but in the future it will be
possible to add  tags to websites, such that one can do things
like "Install-Package https://www.python.org"; and have the right
things happen.)
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] OneGet provider for Python

2014-11-14 Thread Vincent Povirk
Someone pointed out off-list that I didn't provide any explanation of
what OneGet is. I saw it had been brought up on this list earlier, and
incorrectly assumed that meant everyone would know what I was talking
about.

OneGet is a new unified interface for using tools that work with
software, which is being built and will ship with future versions of
Windows (Linux support is planned but seems to be a long way off
currently). It's intended to help solve the problems that a package
manager would solve on Linux, without enforcing any particular ideas
about how software should be packaged, obtained, or installed. It
relies on external components (called "providers") to talk to existing
packaging systems and do any real work.

Currently, the only UI for OneGet is a set of PowerShell commands,
like Install-Package (which can take a filename, url, or name of a
package as long as some provider can make sense of it), but there is
an API available for use by installers, packaging tools that want to
define external dependencies in some generic way, or other UI's.

So, having a Python provider would make it easier for Windows users to
install Python software, and cut down on the work required to package
software written in Python for Windows. (Ideally, in this case
developers would just have to package it in PyPI, or provide a source
archive or .whl, and OneGet should be able to automate installation of
that and everything it needs, in this case probably by installing
Python and pip, and asking pip to do the real work. I am planning to
write the component that figures out all the Python-specific parts of
this.)

Or, more succinctly, the plan is to do everything pip already does (on
Windows only for now), but in a way that also supports all kinds of
other packagers and doesn't require the user to manually install
Python and pip.
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] OneGet provider for Python

2014-11-15 Thread Vincent Povirk
 >> The website has an API you know.
>
> Um, no. Where can I find out about it?

Ooh, I didn't expect that. I couldn't find any documentation, but the
source code of urls_api.py at
https://github.com/python/pythondotorg/tree/master/pydotorg is
certainly interesting.

Also, distutils-sig does seem more appropriate, and I'm interested in
packaging generally so I'll probably subscribe there. Sorry I missed
it and ended up in the wrong place first.
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com