[Plone-developers] ANN: plone-devstart (please help test)

7 views
Skip to first unread message

Martin Aspeli

unread,
Mar 10, 2012, 5:15:40 PM3/10/12
to Plone developers, Plone, product-developers
Hi,

Somewhat inspired by the goals of the ``plone.api`` initiative and based on the experience of seeing many, many people struggle to get a "safe" Plone development up and running due to problems with polluted system Python interpreters, missing libraries and confusing buildouts, I have created a script called ``plone-devstart.py``.

The idea is that you can use this to instantiate a new development environment in a 'safe' way. It will perform some checks on your environment to determine the likelihood of success. It then installs a bunch of useful development tools, a basic deployment configuration, and creates a simple (non-reusable) package where you can put your custom Python code and templates.


It supports Plone 4.1, though I plan to add 4.2 support shortly.

You can download the one file you need here: https://github.com/plone/plone-devstart/raw/master/plone-devstart.py

I've tested as much as I can, but if this is to work out for a broader audience, we need lots of people to test. If you have a particularly messed up environment, I'd like to hear about it. :)

Martin

adam tang

unread,
Mar 10, 2012, 7:39:46 PM3/10/12
to Martin Aspeli, Plone developers, product-developers, Plone
Great a news!
I will test it using Fedora Linux and Plone4.1x.
Thank you Martin!

2012/3/11 Martin Aspeli <optilud...@gmail.com>
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Plone-developers mailing list
Plone-de...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-developers




--
三人行必有我师!
There are three men walking together.(collaboration,innovation and comity, THREE AS ONE.)
WebSite building Expert:http://315ok.org/

Giacomo Spettoli

unread,
Mar 10, 2012, 7:55:33 PM3/10/12
to plone-de...@lists.sourceforge.net
Excellent idea. Hopefully this kind of projects (plone-devstart, plone.api) will bring more and more fire power to the Plone community.

Thanks Martin. 

Giacomo

robert rottermann

unread,
Mar 11, 2012, 12:39:57 PM3/11/12
to plone-de...@lists.sourceforge.net
id did a builtout with it an it worked nicely.
I think it would be good to point to the fact, that one shoudl first start the virtualenv befor starting builout.

thanks for your efforts
robert

Martin Aspeli

unread,
Mar 11, 2012, 1:21:48 PM3/11/12
to robert rottermann, plone-de...@lists.sourceforge.net
On 11 March 2012 16:39, robert rottermann <rob...@redcor.ch> wrote:
id did a builtout with it an it worked nicely.
I think it would be good to point to the fact, that one shoudl first start the virtualenv befor starting builout.

That shouldn't be necessary. Was it for you?

Martin 

robert rottermann

unread,
Mar 12, 2012, 1:56:40 AM3/12/12
to Martin Aspeli, plone-de...@lists.sourceforge.net
no it was not ..

robert

Martin Aspeli

unread,
Mar 12, 2012, 11:18:36 AM3/12/12
to Maurits van Rees, plone-de...@lists.sourceforge.net, Rok Garbas, plone...@lists.sourceforge.net, plone-produc...@lists.plone.org
Hi,

On 12 March 2012 14:17, Maurits van Rees <m.van...@zestsoftware.nl> wrote:
Op 10-03-12 23:15, Martin Aspeli schreef:
Thanks for creating this.

I wanted to push a simple fix (PIL mail fail -> PIL may fail), but I have no write access.  Maybe something needs to be fixed since this started out on your own github account.

Probably.

Rok, help? :-)
 

The script complains about a missing jpeglib.h, but when I tell it to continue PIL gets compiled just fine.  Uploading a jpeg works fine too, including creating the extra sizes.  This is on Mac OSX 10.6.8, both with the standard Mac Python and with a Python from buildout.python with a virtualenv in front (and with PIL already installed actually).  So it does not include the directory containing jpeglib.h.  Not sure how that would be solvable in a generic way.  But anyway, PIL is working for me.


Interesting. If PIL can be compiled with JPEG support, then it should be possible to detect that. Maybe we just need to get rid of that check and just try to install PIL and see if it fails?

Martin

David Glick (GW)

unread,
Mar 12, 2012, 11:58:38 AM3/12/12
to Martin Aspeli, Maurits van Rees, plone-de...@lists.sourceforge.net, plone-produc...@lists.plone.org, plone...@lists.sourceforge.net, Rok Garbas
You just need to grant the Developers team access to the new repository. Anyone who is in the Owners team should be able to do that.

 

David Glick
Web Developer
david...@groundwire.org
206.286.1235x32

The NPO Engagement Party 2012. So much more fun than the wedding reception.


Martin Aspeli

unread,
Mar 12, 2012, 12:23:15 PM3/12/12
to David Glick (GW), Maurits van Rees, plone-de...@lists.sourceforge.net, plone-produc...@lists.plone.org, plone...@lists.sourceforge.net, Rok Garbas
Done, I hope.

Martin 

Maurits van Rees

unread,
Mar 12, 2012, 12:49:46 PM3/12/12
to Martin Aspeli, plone-de...@lists.sourceforge.net, Rok Garbas, plone...@lists.sourceforge.net, plone-produc...@lists.plone.org
Op 12-03-12 17:23, Martin Aspeli schreef:
Yep, that worked.  I have pushed my typo fixes.

Thanks,

-- 
Maurits van Rees: http://maurits.vanrees.org/
Zest Software: http://zestsoftware.nl

Rok Garbas

unread,
Mar 13, 2012, 3:19:51 AM3/13/12
to David Glick (GW), Maurits van Rees, plone-de...@lists.sourceforge.net, plone...@lists.sourceforge.net, plone-produc...@lists.plone.org
On Mon, Mar 12, 2012 at 4:58 PM, David Glick (GW)
<david...@groundwire.org> wrote:
> Probably.
>
> Rok, help? :-)
>
> You just need to grant the Developers team access to the new repository.
> Anyone who is in the Owners team should be able to do that.
>

i see this already setup ... i believe there are quite some folks in
the Developers team.


--
Rok Garbas
http://www.garbas.si
r...@garbas.si

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d

David Glick (GW)

unread,
Mar 13, 2012, 1:17:58 PM3/13/12
to Alex Clark, plone-de...@lists.sourceforge.net, plone...@lists.sourceforge.net, plone-produc...@lists.plone.org

On Mar 13, 2012, at 10:00 AM, Alex Clark wrote:

On 3/10/12 5:15 PM, Martin Aspeli wrote:
Hi,

Somewhat inspired by the goals of the ``plone.api`` initiative and based
on the experience of seeing many, many people struggle to get a "safe"
Plone development up and running due to problems with polluted system
Python interpreters, missing libraries and confusing buildouts, I have
created a script called ``plone-devstart.py``.


+0

In the interest of stop energy (kidding)… but seriously: can we not go
in this direction, if at all possible? Or at least think out loud a bit
more before first.

My thoughts:

We've spent years getting Plone situated in a "nice" place within the
Python community. To address the concerns of the ``plone.api`` folks and
anyone that has trouble installing or developing add-ons for Plone, I
would strongly recommend that we adhere very closely to "Python best
practices"[1].

Now, I completely understand Martin's motivation here and may personally
be interested in trying plone-devstart.py to see what he has come up
with. But I don't think, at least my gut reaction tells me, that a
project-specific script is not what we need or want more of here[2].

Think about it this way: the Plone project has very ambitious goals with
regard to CMS functionality, and a limited set of developers to
accomplish those goals. We don't want those resources spent on Python
module installation problems, if we can help it. Better to offload that
problem to the worldwide community of Python folks IMHO for "free" support.


Alex


[1] Support: "pip install -r 4.2.x.txt Plone" ASAP. Failures with this
process become "general Python failures" not "Plone specific failures".
Don't have PIL? "pip install Pillow" and so on. Let requirements.txt
equal versions.cfg in effect, and let's figure out how to build out a
bunch of zcml slugs without buildout. (Actually, with Pillow, it's
probably now "safe" to depend on it in the way we depend on Zope2.
Installation problems have been practically eliminated for all major
OSes. The only "gotcha" is C extensions, but Zope2 has those too. Oh and
PIL's deps, but the Unified Installer includes those for its purposes
and anyone that can type "pip install Plone" can probably type
"{aptitude,brew,etc} install libjpeg-dev" and so on.)

[2] One exception may be if "pip install plone-devstart" were supported.


I'm all in favor of moving toward supporting a more "standard Python" installation approach, but I think something along the lines of Martin's plone-devstart script would be useful even then. I'd rather run a script which checks to make sure everything is installed and installs the missing things than have to remember all the steps myself. If we can build those checks into Plone's setup.py though, so much the better -- so I'd much rather consider Martin's script as very useful research toward that end rather than as a "wrong direction."

David

Martin Aspeli

unread,
Mar 13, 2012, 4:01:48 PM3/13/12
to Alex Clark, plone-de...@lists.sourceforge.net, plone...@lists.sourceforge.net, plone-produc...@lists.plone.org
I think you need to look a bit more closely at what the script does before passing judgment. I feel like your comment below misses the point.


On Tuesday, 13 March 2012, Alex Clark <acl...@aclark.net> wrote:
> On 3/10/12 5:15 PM, Martin Aspeli wrote:
>>
>> Hi,
>>
>> Somewhat inspired by the goals of the ``plone.api`` initiative and based
>> on the experience of seeing many, many people struggle to get a "safe"
>> Plone development up and running due to problems with polluted system
>> Python interpreters, missing libraries and confusing buildouts, I have
>> created a script called ``plone-devstart.py``.
>
>
> +0
>
> In the interest of stop energy (kidding)… but seriously: can we not go in this direction, if at all possible? Or at least think out loud a bit more before first.
>
> My thoughts:
>
> We've spent years getting Plone situated in a "nice" place within the Python community. To address the concerns of the ``plone.api`` folks and anyone that has trouble installing or developing add-ons for Plone, I would strongly recommend that we adhere very closely to "Python best practices"[1].
>
> Now, I completely understand Martin's motivation here and may personally be interested in trying plone-devstart.py to see what he has come up with. But I don't think, at least my gut reaction tells me, that a project-specific script is not what we need or want more of here[2].
>
> Think about it this way: the Plone project has very ambitious goals with regard to CMS functionality, and a limited set of developers to accomplish those goals. We don't want those resources spent on Python module installation problems, if we can help it. Better to offload that problem to the worldwide community of Python folks IMHO for "free" support.
>
>
> Alex
>
>
> [1] Support: "pip install -r 4.2.x.txt Plone" ASAP. Failures with this process become "general Python failures" not "Plone specific failures". Don't have PIL? "pip install Pillow" and so on. Let requirements.txt equal versions.cfg in effect, and let's figure out how to build out a bunch of zcml slugs without buildout. (Actually, with Pillow, it's probably now "safe" to depend on it in the way we depend on Zope2. Installation problems have been practically eliminated for all major OSes. The only "gotcha" is C extensions, but Zope2 has those too. Oh and PIL's deps, but the Unified Installer includes those for its purposes and anyone that can type "pip install Plone" can probably type "{aptitude,brew,etc} install libjpeg-dev" and so on.)
>
> [2] One exception may be if "pip install plone-devstart" were supported.
>
>
>>
>> The idea is that you can use this to instantiate a new development
>> environment in a 'safe' way. It will perform some checks on your
>> environment to determine the likelihood of success. It then installs a
>> bunch of useful development tools, a basic deployment configuration, and
>> creates a simple (non-reusable) package where you can put your custom
>> Python code and templates.
>>
>> For now it lives here: https://github.com/plone/plone-devstart/
>>
>> It supports Plone 4.1, though I plan to add 4.2 support shortly.
>>
>> You can download the one file you need here:
>> https://github.com/plone/plone-devstart/raw/master/plone-devstart.py
>>
>> I've tested as much as I can, but if this is to work out for a broader
>> audience, we need lots of people to test. If you have a particularly
>> messed up environment, I'd like to hear about it. :)
>>
>> Martin
>>
>>
>> _______________________________________________
>> Product-Developers mailing list
>> Product-D...@lists.plone.org
>> https://lists.plone.org/mailman/listinfo/plone-product-developers
>
>
> --
> Alex Clark · http://pythonpackages.com
>
> _______________________________________________
> Product-Developers mailing list
> Product-D...@lists.plone.org
> https://lists.plone.org/mailman/listinfo/plone-product-developers
>

Martin Aspeli

unread,
Mar 13, 2012, 4:43:08 PM3/13/12
to Jens W. Klein, plone-de...@lists.sourceforge.net, plone...@lists.sourceforge.net, plone-produc...@lists.plone.org


On 13 March 2012 18:14, Jens W. Klein <je...@bluedynamics.com> wrote:

But isnt there a widely spreaded tool for doing so: GNU Autoconf and GNU Automake? It can check if preconditions for building PIL and Zope2 C-Extensions are meet. This would then end up in a classic CMMI cycle. And at the end (after make install step) at given target theres a plone (dev?) environment.

That's a lot more complicated though, and not very cross-platform. It also assumes you have autoconf and automake installed. And I suspect noone in our community particularly wants to maintain autoconf/automake.

IMHO, autoconf/automake makes sense for the Unified Installer, but not for something like plone-devstart.

Martin

Martin Aspeli

unread,
Mar 13, 2012, 7:14:40 PM3/13/12
to Alex Clark, plone-de...@lists.sourceforge.net, plone...@lists.sourceforge.net, plone-produc...@lists.plone.org


On 13 March 2012 23:10, Alex Clark <acl...@aclark.net> wrote:
On 3/13/12 4:01 PM, Martin Aspeli wrote:
I think you need to look a bit more closely at what the script does
before passing judgment. I feel like your comment below misses the point.


I understand what you are trying to do, and I'm not passing judgement, so please don't misunderstand why I'm taking the time to comment.

What I am saying is: let us think very carefully about who we are targeting with something like plone-devstart and make sure (i.e. via group consensus and/or FWT evaluation, as needed) we are taking the "right" steps for that target audience.

So far, anyone I'd consider in the target audience who've managed to reply in this thread have been pretty positive, so that's probably a good sign.
 
According to the documentation, the target audience is:

---
… those with a system-installed or custom compiled Python … no need to have a functioning easy_install or pip to be able to use it.
----

Based on those statements, I'm not sure if that means "Python programmers" in general or folks more, or less, skilled than that. So that's the first thing I'm trying to understand. I ran the script and committed the output to:

It means anyone who wants to do Plone development, and who is not an expert or even all that familiar with:

- setuptools
- Python eggs
- sys.path and site packages
- compiling stuff from source
- Plone
- Plone development
- buildout
- Zopeskel
 
Martin

Martin Aspeli

unread,
Mar 14, 2012, 3:57:29 AM3/14/12
to Alex Clark, plone-de...@lists.sourceforge.net, plone...@lists.sourceforge.net, plone-produc...@lists.plone.org


On 13 March 2012 23:33, Alex Clark <acl...@aclark.net> wrote:
Hi,


On 3/13/12 7:14 PM, Martin Aspeli wrote:
So far, anyone I'd consider in the target audience who've managed to
reply in this thread have been pretty positive, so that's probably a
good sign.


Sorry, not sure what you mean. Can we pick a name like "integrators"? and/or "product developers"?




It means anyone who wants to do Plone development, and who is not an
expert or even all that familiar with:

- setuptools
- Python eggs
- sys.path and site packages
- compiling stuff from source
- Plone
- Plone development
- buildout
- Zopeskel


OK so "not Python programmers", that helps.

There are *tons* of people who know how to write Python, who are not very familiar/comfortable with those technologies.

Martin 

Dan Jacka

unread,
Mar 15, 2012, 5:15:24 PM3/15/12
to Martin Aspeli, Plone developers, product-developers, Plone
> I've tested as much as I can, but if this is to work out for a broader
> audience, we need lots of people to test. If you have a particularly
> messed up environment, I'd like to hear about it. :)

Hi Martin,

For kicks I tried plone-devstart.py on a RHEL5 machine with system
Python 2.4.3. I expected to be told that I needed 2.6.

$ python plone-devstart.py devstarttest

Welcome to plone-devstart (version 0.2)
...
Enter a Plone version number [4.1]

* Checking for known good versions set at
http://dist.plone.org/release/4.1/versions.cfg ...
Traceback (most recent call last):
File "plone-devstart.py", line 449, in ?
main()
File "plone-devstart.py", line 242, in main
if not check_url(kgs_url):
File "plone-devstart.py", line 113, in check_url
connection = httplib.HTTPConnection(split.netloc, port=split.port)
AttributeError: 'tuple' object has no attribute 'netloc'

Poking around, it looks like 2.4's urlparse.urlsplit returns a plain
tuple with no 'netloc' or other attributes. [1]

Could plone-devstart.py check for a supported Python version (and fail
with a nicer error message) before checking the KGS url?

Cheers,
Dan


[1] http://docs.python.org/release/2.4/lib/module-urlparse.html

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure

Martin Aspeli

unread,
Mar 16, 2012, 5:59:48 AM3/16/12
to Dan Jacka, Plone developers, product-developers, Plone
On 15 March 2012 21:15, Dan Jacka <danj...@gmail.com> wrote:
I've tested as much as I can, but if this is to work out for a broader
audience, we need lots of people to test. If you have a particularly
messed up environment, I'd like to hear about it. :)

Hi Martin,

For kicks I tried plone-devstart.py on a RHEL5 machine with system Python 2.4.3. I expected to be told that I needed 2.6.

$ python plone-devstart.py devstarttest


Welcome to plone-devstart (version 0.2)
...

Enter a Plone version number [4.1]

* Checking for known good versions set at
  http://dist.plone.org/release/4.1/versions.cfg ...

Traceback (most recent call last):
 File "plone-devstart.py", line 449, in ?
   main()
 File "plone-devstart.py", line 242, in main
   if not check_url(kgs_url):
 File "plone-devstart.py", line 113, in check_url
   connection = httplib.HTTPConnection(split.netloc, port=split.port)
AttributeError: 'tuple' object has no attribute 'netloc'

Poking around, it looks like 2.4's urlparse.urlsplit returns a plain tuple with no 'netloc' or other attributes. [1]

Could plone-devstart.py check for a supported Python version (and fail with a nicer error message) before checking the KGS url?

Yes, though we should also probably just make it run with 2.4.

Could you file an issue in the github issue tracker for plone-devstart?

Martin 
Reply all
Reply to author
Forward
0 new messages