Qt-contributors-summit-2011-Qt library archive: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
=<nowiki>#inqlude – The Qt library archive</nowiki>=


Notes from the Qt Developers’ Summit session of a Qt library archive aka “<span class="caps">CPAN</span>” for Qt
Getting a better overview and more easy access to all the great Qt based libraries out there, especially also those done independently of the core Qt libraries. Having something like <span class="caps">CPAN</span> or Ruby gems would be great. Let’s discuss what we can do here. We already discussed this topic at the <span class="caps">KDE</span> Platform sprint and collected some input and ideas.
It shall not be just an archive on a website, but also include a system to install stuff. It’s inspired by Perl’s <span class="caps">CPAN</span> or Ruby’s gem.
A ''prototype'' is available on http://inqlude.org<br /> Git repository is at https://github.com/cornelius/inqlude<br /> The metadata git repo is at https://github.com/cornelius/inqlude_data<br /> Mailing list for discussing Inqlude: https://mail.kde.org/mailman/listinfo/inqlude
implemented as a git repository with metadata for the “packages”
There is a prototype command line tool
<div class="cpp-qt geshi">
# <div class="de1"><span class="co1">// install with </span></div>
# <div class="de1">gem install inqlude</div>
# <div class="de1"> </div>
# <div class="de1"><span class="co1">// install a package:</span></div>
# <div class="de2">inqlude install qjson</div>
</div>
The installer is hooked into the native package manager (e.g. rpm, dep). It installs the operating system’s packages if available.
==Dependencies==
* not yet fully designed and implemented
* is needed in the long term
==Use of native package managers==
===Pros===
* using the infrastructure that’s already there
===Cons===
* Mixing native packages and manually installed ones is messing up the system
* No native packages for various platforms (including Mac, Windows)
==Build Systems==
* force the libs to provide a qmake .pro file or allow different build tools (qmake, CMake, autotools)
* possible tools to look at:<br /> Gentoo ebuilds<br /> Ruby gems
==Metadata==
* use own format or adapt an existing one (deb, gems)?
* what info to put in?
** dependencies (on qt libs and/or external libs)
** which type of build system is used
** supported platforms
** licenses
** required Qt version (min, probably max)
* who will create the metadata (bootstrapping?)
* where is it stored (file inside the tarball?)
==<span class="caps">QML</span> Components==
Search for a particualar component should be possible (where to find it, which package to install it)
==Misc==
* rating a lib (centralized? or on different sites focusing on specialized audiences)
=Metadata Followup Session=
==Field description==
===schema_version===
* identifies the version of the used metadata schema
===name===
* identifies the add on
* must be unique
* first come, first server
===version===
* to distinguish different versions of an add on
* is the same as the upstream version
* there is no <span class="caps">QPAN</span>/inqlude specific versioning
===release_date===
* date when the library was released upstream
===summary===
* a ''short'' string (one line) describing the library
===urls===
with subkeys:
* homepage<br /> for the project homepage
* api_docs<br /> for the <span class="caps">API</span> docs
* readme
* logo
* screenshots<br /> with a list of <span class="caps">URL</span>s
===licenses===
* list of multiple licenses
* well known licenses are identified by keywords
* custom licenses with a keyword only, no link
===description===
* a long description
* can include multiple paragraphs
* format plain text (newlines for separating paragraphs)
===authors===
* list of authors consisting of author’s name and a url/email address in a string
===maturity===
* inspired by sourceforge, but leaving out some states
===platforms===
* list of platforms (Linux, Windows, Mac…)
===packages===
* with subkeys for various systems
* source is mandatory
** optionally scm repositories (scm specific)
** build systems (may be more)
* platform/distribution specific formats
===keywords===
* should be obvious <span class="smiley">:-)</span>
===dependencies===
* dependencies within the metadata space and external
* name, min version, max version
* this are hard dependencies which are required to build the lib/app
* optional requirements should go into the description
===languages===
* list of programming languages. Mostly will be C++, but could be something like Python, with bindings, or <span class="caps">QML</span>, if we want to extend to that.
==notes==
* update_date (reflecting the last change of the metadata) is not required
==Example for meta data==
<div class="cpp-qt geshi">
# <div class="de1"><span class="br0">{</span></div>
# <div class="de1">  <span class="st0">"schema_version"</span><span class="sy0">:</span> <span class="nu0">1</span><span class="sy0">,</span></div>
# <div class="de1">  <span class="st0">"name"</span><span class="sy0">:</span> <span class="st0">"qjson"</span><span class="sy0">,</span></div>
# <div class="de1">  <span class="st0">"version"</span><span class="sy0">:</span> <span class="st0">"0.7.1"</span><span class="sy0">,</span></div>
# <div class="de2">  <span class="st0">"release_date"</span><span class="sy0">:</span> <span class="st0">"20110618"</span><span class="sy0">,</span></div>
# <div class="de1">  <span class="st0">"summary"</span><span class="sy0">:</span> <span class="st0">"Development files for QJson"</span><span class="sy0">,</span></div>
# <div class="de1">  <span class="st0">"urls"</span><span class="sy0">:</span> <span class="br0">{</span></div>
# <div class="de1">    <span class="st0">"homepage"</span><span class="sy0">:</span> <span class="st0">"http://qjson.sourceforge.net/"</span><span class="sy0">,</span></div>
# <div class="de1">    <span class="st0">"api_docs"</span><span class="sy0">:</span> <span class="st0">"http://qjson.sf.net/api"</span><span class="sy0">,</span></div>
# <div class="de2">    <span class="st0">"readme"</span><span class="sy0">:</span> <span class="st0">"http://qjson.sf.net/README"</span><span class="sy0">,</span></div>
# <div class="de1">    <span class="st0">"logo"</span><span class="sy0">:</span> <span class="st0">"http://qjson.sf.net/logo.png"</span><span class="sy0">,</span></div>
# <div class="de1">    <span class="st0">"screenshots"</span><span class="sy0">:</span> <span class="br0">{</span></div>
# <div class="de1">      <span class="st0">"Fancy Widgets"</span><span class="sy0">:</span> <span class="st0">"http://example.com/one.jpg"</span><span class="sy0">,</span></div>
# <div class="de1">      <span class="st0">"Boring widgets"</span><span class="sy0">:</span> <span class="st0">"http://example.com/two.jpg"</span></div>
# <div class="de2">    <span class="br0">}</span></div>
# <div class="de1">  <span class="br0">}</span><span class="sy0">,</span></div>
# <div class="de1">  <span class="st0">"licenses"</span><span class="sy0">:</span> <span class="br0">[</span> <span class="st0">"LGPL"</span> <span class="br0">]</span><span class="sy0">,</span></div>
# <div class="de1">  <span class="st0">"description"</span><span class="sy0">:</span> <span class="st0">"JSON (JavaScript Object Notation) is a lightweight data-interchange format.<span class="es1">\n</span>It can represent integer, real number, string, an ordered sequence of value,<span class="es1">\n</span>and a collection of name/value pairs. QJson is a qt-based library that maps<span class="es1">\n</span>JSON data to QVariant objects. JSON arrays will be mapped to QVariantList<span class="es1">\n</span>instances, while JSON's objects will be mapped to QVariantMap.<span class="es1">\n</span><span class="es1">\n</span>This package contains files for developing applications using QJson.<span class="es1">\n</span><span class="es1">\n</span>"</span><span class="sy0">,</span></div>
# <div class="de1">  <span class="st0">"authors"</span><span class="sy0">:</span> <span class="br0">[</span> <span class="st0">"Flavio Castelli &lt;flavio@castelli.name&gt;"</span> <span class="br0">]</span><span class="sy0">,</span></div>
# <div class="de2">  <span class="st0">"maturity"</span><span class="sy0">:</span> <span class="st0">"stable"</span><span class="sy0">,</span></div>
# <div class="de1">  <span class="st0">"platforms"</span><span class="sy0">:</span> <span class="br0">[</span> <span class="st0">"Linux"</span><span class="sy0">,</span> <span class="st0">"Windows"</span> <span class="br0">]</span><span class="sy0">,</span></div>
# <div class="de1">  <span class="st0">"packages"</span><span class="sy0">:</span> <span class="br0">{</span></div>
# <div class="de1">    <span class="st0">"source"</span><span class="sy0">:</span> <span class="br0">{</span></div>
# <div class="de1">      <span class="st0">"git"</span><span class="sy0">:</span> <span class="br0">{</span></div>
# <div class="de2">        <span class="st0">"url"</span><span class="sy0">:</span> <span class="st0">"http://github.com/flavio/qjson"</span><span class="sy0">,</span></div>
# <div class="de1">        <span class="st0">"tag"</span><span class="sy0">:</span> <span class="st0">"0_7_1"</span></div>
# <div class="de1">      <span class="br0">}</span><span class="sy0">,</span></div>
# <div class="de1">      <span class="st0">"url"</span><span class="sy0">:</span> <span class="st0">"http://download.qjson.com/qjson-0.7.1.tgz"</span><span class="sy0">,</span></div>
# <div class="de1">      <span class="st0">"build_system"</span><span class="sy0">:</span> <span class="br0">[</span> <span class="st0">"cmake"</span><span class="sy0">,</span> <span class="st0">"qmake"</span> <span class="br0">]</span></div>
# <div class="de2">    <span class="br0">}</span><span class="sy0">,</span></div>
# <div class="de1">    <span class="st0">"openSUSE"</span><span class="sy0">:</span> <span class="br0">{</span></div>
# <div class="de1">      <span class="st0">"11.4"</span><span class="sy0">:</span> <span class="br0">{</span></div>
# <div class="de1">        <span class="st0">"package_name"</span><span class="sy0">:</span> <span class="st0">"libqjson-devel"</span><span class="sy0">,</span></div>
# <div class="de1">        <span class="st0">"repository"</span><span class="sy0">:</span> <span class="br0">{</span></div>
# <div class="de2">          <span class="st0">"url"</span><span class="sy0">:</span> <span class="st0">"http://download.opensuse.org/distribution/11.4/repo/oss/"</span><span class="sy0">,</span></div>
# <div class="de1">          <span class="st0">"name"</span><span class="sy0">:</span> <span class="st0">"openSUSE-11.4-Oss"</span></div>
# <div class="de1">        <span class="br0">}</span><span class="sy0">,</span></div>
# <div class="de1">        <span class="st0">"source_rpm"</span><span class="sy0">:</span> <span class="st0">"libqjson-0.7.1-9.3.src.rpm"</span></div>
# <div class="de1">      <span class="br0">}</span></div>
# <div class="de2">    <span class="br0">}</span></div>
# <div class="de1">  <span class="br0">}</span></div>
# <div class="de1">  <span class="st0">"keywords"</span><span class="sy0">:</span> <span class="br0">[</span> <span class="st0">"JSON"</span><span class="sy0">,</span> <span class="st0">"magic"</span> <span class="br0">]</span><span class="sy0">,</span></div>
# <div class="de1">  <span class="st0">"dependencies"</span><span class="sy0">:</span> <span class="br0">[</span> <span class="st0">"QtCore"</span><span class="sy0">,</span> <span class="st0">"QtUi &gt;= 4.6.1"</span><span class="sy0">,</span> <span class="st0">"QtUi &lt; 4.9"</span><span class="sy0">,</span> <span class="st0">"libfoo"</span> <span class="br0">]</span><span class="sy0">,</span></div>
# <div class="de1">  <span class="st0">"languages"</span><span class="sy0">:</span> <span class="br0">[</span> <span class="st0">"C++"</span> <span class="br0">]</span></div>
# <div class="de2"><span class="br0">}</span></div>
</div>

Revision as of 14:02, 25 February 2015

#inqlude – The Qt library archive

Notes from the Qt Developers’ Summit session of a Qt library archive aka “CPAN” for Qt

Getting a better overview and more easy access to all the great Qt based libraries out there, especially also those done independently of the core Qt libraries. Having something like CPAN or Ruby gems would be great. Let’s discuss what we can do here. We already discussed this topic at the KDE Platform sprint and collected some input and ideas.

It shall not be just an archive on a website, but also include a system to install stuff. It’s inspired by Perl’s CPAN or Ruby’s gem.

A prototype is available on http://inqlude.org
Git repository is at https://github.com/cornelius/inqlude
The metadata git repo is at https://github.com/cornelius/inqlude_data
Mailing list for discussing Inqlude: https://mail.kde.org/mailman/listinfo/inqlude

implemented as a git repository with metadata for the “packages”

There is a prototype command line tool

  1. // install with
  2. gem install inqlude
  3.  
  4. // install a package:
  5. inqlude install qjson

The installer is hooked into the native package manager (e.g. rpm, dep). It installs the operating system’s packages if available.

Dependencies

  • not yet fully designed and implemented
  • is needed in the long term

Use of native package managers

Pros

  • using the infrastructure that’s already there

Cons

  • Mixing native packages and manually installed ones is messing up the system
  • No native packages for various platforms (including Mac, Windows)

Build Systems

  • force the libs to provide a qmake .pro file or allow different build tools (qmake, CMake, autotools)
  • possible tools to look at:
    Gentoo ebuilds
    Ruby gems

Metadata

  • use own format or adapt an existing one (deb, gems)?
  • what info to put in?
    • dependencies (on qt libs and/or external libs)
    • which type of build system is used
    • supported platforms
    • licenses
    • required Qt version (min, probably max)
  • who will create the metadata (bootstrapping?)
  • where is it stored (file inside the tarball?)

QML Components

Search for a particualar component should be possible (where to find it, which package to install it)

Misc

  • rating a lib (centralized? or on different sites focusing on specialized audiences)

Metadata Followup Session

Field description

schema_version

  • identifies the version of the used metadata schema

name

  • identifies the add on
  • must be unique
  • first come, first server

version

  • to distinguish different versions of an add on
  • is the same as the upstream version
  • there is no QPAN/inqlude specific versioning

release_date

  • date when the library was released upstream

summary

  • a short string (one line) describing the library

urls

with subkeys:

  • homepage
    for the project homepage
  • api_docs
    for the API docs
  • readme
  • logo
  • screenshots
    with a list of URLs

licenses

  • list of multiple licenses
  • well known licenses are identified by keywords
  • custom licenses with a keyword only, no link

description

  • a long description
  • can include multiple paragraphs
  • format plain text (newlines for separating paragraphs)

authors

  • list of authors consisting of author’s name and a url/email address in a string

maturity

  • inspired by sourceforge, but leaving out some states

platforms

  • list of platforms (Linux, Windows, Mac…)

packages

  • with subkeys for various systems
  • source is mandatory
    • optionally scm repositories (scm specific)
    • build systems (may be more)
  • platform/distribution specific formats

keywords

  • should be obvious :-)

dependencies

  • dependencies within the metadata space and external
  • name, min version, max version
  • this are hard dependencies which are required to build the lib/app
  • optional requirements should go into the description

languages

  • list of programming languages. Mostly will be C++, but could be something like Python, with bindings, or QML, if we want to extend to that.

notes

  • update_date (reflecting the last change of the metadata) is not required

Example for meta data

  1. {
  2.   "schema_version": 1,
  3.   "name": "qjson",
  4.   "version": "0.7.1",
  5.   "release_date": "20110618",
  6.   "summary": "Development files for QJson",
  7.   "urls": {
  8.     "homepage": "http://qjson.sourceforge.net/",
  9.     "api_docs": "http://qjson.sf.net/api",
  10.     "readme": "http://qjson.sf.net/README",
  11.     "logo": "logo.png",
  12.     "screenshots": {
  13.       "Fancy Widgets": "one.jpg",
  14.       "Boring widgets": "two.jpg"
  15.     }
  16.   },
  17.   "licenses": [ "LGPL" ],
  18.   "description": "JSON (JavaScript Object Notation) is a lightweight data-interchange format.\nIt can represent integer, real number, string, an ordered sequence of value,\nand a collection of name/value pairs. QJson is a qt-based library that maps\nJSON data to QVariant objects. JSON arrays will be mapped to QVariantList\ninstances, while JSON's objects will be mapped to QVariantMap.\n\nThis package contains files for developing applications using QJson.\n\n",
  19.   "authors": [ "Flavio Castelli <flavio@castelli.name>" ],
  20.   "maturity": "stable",
  21.   "platforms": [ "Linux", "Windows" ],
  22.   "packages": {
  23.     "source": {
  24.       "git": {
  25.         "url": "http://github.com/flavio/qjson",
  26.         "tag": "0_7_1"
  27.       },
  28.       "build_system": [ "cmake", "qmake" ]
  29.     },
  30.     "openSUSE": {
  31.       "11.4": {
  32.         "package_name": "libqjson-devel",
  33.         "repository": {
  34.           "name": "openSUSE-11.4-Oss"
  35.         },
  36.         "source_rpm": "libqjson-0.7.1-9.3.src.rpm"
  37.       }
  38.     }
  39.   }
  40.   "keywords": [ "JSON", "magic" ],
  41.   "dependencies": [ "QtCore", "QtUi >= 4.6.1", "QtUi < 4.9", "libfoo" ],
  42.   "languages": [ "C++" ]
  43. }