egg/product metadata

4 messages Options
Embed this post
Permalink
Florian Friesdorf-2

egg/product metadata

Reply Threaded More More options
Print post
Permalink
Hi,

when developing products for plone one needs/wants to define among other
metadata:

- setup.py
  - name
  - version
  - description
  - egg dependencies
- profiles/default/metadata.xml
  - name
  - version
  - description
  - product dependencies

Are there approaches already to move these together, e.g. by generating
both of them from some other file or one from the other, or way more
elegant, storing profiles/default/metadata.xml within setup.py and have
GenericSetup read from there?

florian


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers

attachment0 (205 bytes) Download Attachment
David Glick-2

Re: egg/product metadata

Reply Threaded More More options
Print post
Permalink
Florian Friesdorf wrote:

> when developing products for plone one needs/wants to define among other
> metadata:
>
> - setup.py
>   - name
>   - version
>   - description
>   - egg dependencies
> - profiles/default/metadata.xml
>   - name
>   - version
>   - description
>   - product dependencies
>
> Are there approaches already to move these together, e.g. by generating
> both of them from some other file or one from the other, or way more
> elegant, storing profiles/default/metadata.xml within setup.py and have
> GenericSetup read from there?
>  
I don't believe metadata.xml contains a name or description.  If it did,
it would be the name and description of a GenericSetup profile (it is
perfectly acceptable to have more than one profile per package, which
one of the main reasons unifying these two things doesn't make sense).

In regard to the other items, there is a significant difference between
the version of a package and the version of a profile.  The former is
used when determining what packages to install into the Python
environment.  The latter is used when determining whether any
GenericSetup upgrade steps are available for a profile.  So the version
in metadata.xml is really the version of a profile, and there's really
not any reason to change it unless you have created an upgrade step to
apply some changes between profile versions.  (This distinction was
unfortunately made less clear for a short time in the Plone 3.x series
when the version from metadata.xml was the one shown in the quick
installer, but that has fortunately been corrected.)

There's also a difference between egg dependencies (which, again, has to
do with installing packages into the Python environment) and profile
dependencies (which has to do with what profiles get run when some other
profile is run).

hope this helps,
David



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Florian Friesdorf-2

Re: egg/product metadata

Reply Threaded More More options
Print post
Permalink
On Thu, Oct 08, 2009 at 07:05:02PM -0700, David Glick wrote:
> I don't believe metadata.xml contains a name or description.  If it
> did, it would be the name and description of a GenericSetup profile
> (it is perfectly acceptable to have more than one profile per
> package, which one of the main reasons unifying these two things
> doesn't make sense).

There is a description, but as you say, it's the one of the profile.
point taken.

> In regard to the other items, there is a significant difference
> between the version of a package and the version of a profile.  The
> former is used when determining what packages to install into the
> Python environment.  The latter is used when determining whether any
> GenericSetup upgrade steps are available for a profile.  So the
> version in metadata.xml is really the version of a profile, and
> there's really not any reason to change it unless you have created
> an upgrade step to apply some changes between profile versions.
> (This distinction was unfortunately made less clear for a short time
> in the Plone 3.x series when the version from metadata.xml was the
> one shown in the quick installer, but that has fortunately been
> corrected.)
I'm currently working with a Plone 3.2.2 (will upgrade soon, but stuck
for now) and there the version in the quickinstaller is the one from the
metadata.xml. If that's fixed in 3.3.1 - great!

> There's also a difference between egg dependencies (which, again,
> has to do with installing packages into the Python environment) and
> profile dependencies (which has to do with what profiles get run
> when some other profile is run).

Sure, but a profile dependency makes no sense without a corresponding
egg dependency, so that is clearly redundant - however, I see my
original point being strongly weakened, just struggling for my last
stance ;)

thx for the clarifications!

florian


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers

attachment0 (205 bytes) Download Attachment
Martin Aspeli

Re: egg/product metadata

Reply Threaded More More options
Print post
Permalink
Florian Friesdorf <flo@...> writes:
\
> I'm currently working with a Plone 3.2.2 (will upgrade soon, but stuck
> for now) and there the version in the quickinstaller is the one from the
> metadata.xml. If that's fixed in 3.3.1 - great!

The version in the quickinstaller is taken from the package version in setup.py,
although a version.txt is still allowed (but deprecated).

Profile versions are purely internal matters, and should be numbers like 1, 2,
3, 4. They exist to allow portal_setup to differentiate between installed and
available profiles and possibly run upgade steps if defined.
 
> Sure, but a profile dependency makes no sense without a corresponding
> egg dependency, so that is clearly redundant - however, I see my
> original point being strongly weakened, just struggling for my last
> stance ;)

I don't think that's correct.

 - It's very likely that'll you have egg dependencies for which there is no
corresponding profile

 - It's possible that you don't want to (re)install the profile just because you
use some code from another package

 - A dependency many have multiple profiles

Trying to make this automagic would likely lead to a lot of pain and confusion.

Martin


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers