On 06/19/2014 06:26 AM, Amit Prakash Ambasta wrote:
My name is Amit and I’ve been trying for the past few weeks to be able to
get zato into a pip ready state so someone could just pip install zato.
I am not sure as to how mailing lists work so dropping in a first message
to introduce myself.
Hello Amit,
as we have started to talk about it off-list, here are my thoughts on
the idea.
First thing is, it’s great that you’d like to help out
It’s really
great to see such an enthusiasm!
When thinking of any sort of installers, please always keep in mind that:
-
pip and PyPI are for installing Python modules and packages Zato is
not a simple Python module nor package.
-
The point above is really important - pip merely installs Python
modules. It’s very good at it and that’s it. Zato is a programming
platform that is written in Python but it doesn’t mean it has to be
installable using a tool that has recently become popular.
-
The point on recent popularity is an important one - over years we
have had easy_install, distribute, distribute2, pip, project forks,
merges, splits and joins - personally I’ve spent enough time on it all
and /perhaps/ now that pip is in Python 3.x things will settle down.
I really wish everyone involved in developing Python packaging story all
the best and I really hope things will be clearer now. But I’ve been
using Python since 2.1 and it’s way too early for me to categorically
say pip is the way to go. I need more time to get convinced.
In that regards, consider Zato similar to PostgreSQL. The latter being
built using a Makefile but it doesn’t mean one should be able to do
stuff like ‘make download postgresql’.
Up until recently, the only Python packaging tool almost capable of
producing result Zato needs was buildout. Some time ago conda has come
around and perhaps conda is something to look at but I’m 100% pip right
won’t handle what we need. Perhaps with time but not now.
Like I say, I hope and keep fingers crossed Python’s packaging situation
but there are no packaging problems in Zato that pip solves.
In fact, given it’s never been meant to support what Zato needs, I’m
certain it won’t do. But this is because there are certain goals for
Zato installers outside of pip’s scope, not that because pip doesn’t
live up to its own promises.
Actually - if you have a look at the very first commit to GH …
https://github.com/zatosource/zato/blob/41476e8c27d0eb309f45762015fbcdc09de8547f/code/install.sh
https://github.com/zatosource/zato/blob/41476e8c27d0eb309f45762015fbcdc09de8547f/code/buildout.cfg
… you’ll already notice that pip will not:
- Update system packages
- Install a system package
- Apply a patch to a dependency
This was 2 years ago and this is how it looks like today
https://github.com/zatosource/zato/blob/master/code/_install-deb.sh
https://github.com/zatosource/zato/blob/master/code/_install-fedora.sh
And it’s all OK - pip simply is not meant for things we need. There’s no
need to use this particular tool if we have a toolbox full of other options.
- Zato must be able to install on systems that may not even have Python
2.7 alone - think CentOS 6.x or SuSE - and the goal of the installation
process is always to install Zato in a reproducible way.
That is, given a bare OS when one does ‘yum install zato’ or ‘apt-get
install zato’ or simply install it from source, it should always install
the same set of packages given the same version of the OS.
Builds must always be reproducible, this is a topmost priority. Please
remember that people, me including, support production systems that
aren’t operated by Python programmers and everyone should always have
the same environment given the same build process.
If I have a local VM of Ubuntu 12.04.3 LTS up to do date and a Zato user
has the same system then ‘apt-get install zato’ always produces the same
output. There simply can be no exceptions to that process.
That point rules out providing dependencies in the form of ‘foo>=1.23’.
These always need to explicitly listed. And conversely, there can be no
dependencies that are not listed in a given requirements file (pip or
buildout).
- To conclude - I like pip for simpler projects, for instance apitest
uses requirements.txt and is generally available through pip
But even in such a simple project as apitest I immediately hit upon a
feature pip doesn’t support - that of warning when a dependency of a
package attempts to install its own dependency I didn’t explicitly list
in requirements.txt.
And Zato must support use cases on a order of magnitude harder, like
making sure Python 2.7 is available in the first place and links to
correct system libraries. Or that HAProxy is there.
These are real requirements set before a packaging tool and pip doesn’t
deal with them, it’s all simply outside of its scope, at least for now.
I honestly am very thankful for your work, it’s terrific to see such a
passion but at that point I’m not convinced pip is something we really,
really need.
If you’d still like to work on it, I’d be happy to discuss it with you
here on the list and make sure your works go in the same direction the
rest of the project but right now I just can’t see any issue pip solves
for us.
This is open-source so hey, you can do anything you want
but there
are some tickets waiting in the tracker and perhaps you’d rather be
interested in picking up one of these instead?
These are all the tickets that need to be closed before we can cut the
2.0 release. If you’d like to get involved in the project, maybe you
could have a look at them and say a bit about what you’re interested in
generally as Python development goes so that I could suggest a ticket
that you’d find a worthwhile goal or perhaps we’d open a new one for you?
What do you think?