HI Volker,

If you haven't already looked at it, you might be interested  in the
hashdist project: https://github.com/hashdist/hashdist.   I've included a
few more comments below. I will be at sage days this week.


On Sun, Jun 15, 2014 at 3:59 PM, Volker Braun <vbraun.n...@gmail.com> wrote:

> This is a RFC for new packaging system for "sage-the-distribution". I've
> already talked about this with a few of you at the last sage days, but
> finally it managed to do something about it. The goal is to be:
>
> * Git-aware: use SHA1 hashes instead of timestamps for dependency
> calculations
>

hashdist can use git commit ID's and pull source from github. It also uses
SHA1 hashes for other types of source archives. hashdist also hashes and
caches the builds following the approach described by E. Dolstra (Nix
package  manager).

* Unified machine-readable package configuration using YAML
>

package and stack configuration files are in yaml


> * Dependency handling also for optional packages
> * Distinction between different types of dependencies: build time, runtime
> hard/soft, testing.
>

here's and example of the matplotlib package spec:

https://github.com/hashdist/hashstack/blob/master/pkgs/matplotlib/matplotlib.yaml


> * Modular, allowing for easy experimentation with per-package backends
>

not sure I understand this point


> * written in pure Python without any dependencies
>

written in pure Python with all depedencies bundled.


> * doctested for Python 2.6, 2.7, 3.3, and 3.4.
>
>
I don't think there are any major issues with Python 3, but most of the
stacks we are building are Python 2.7.


> Having all package configuration data accessible in machine-readable form
> is IMHO the key to managing complexity. There are various possibilities for
> the file format, but in the end I think YAML is the best choice. It
> integrates very well with Python, is easy to read/write for humans, and if
> things go wrong the parser can pin-point the error very well. Downside is
> that it is not in the Python standard library, but then I don't think we
> should that let us dictate the file format. We'll just include the
> Python-only part of PyYAML as a fallback if the OS Python does not have it.
>
> The entire package configuration will be in a file
> SAGE_ROOT/build/pkgs/<name>/package.yaml, for example
> ----------------------------------------
> name:
>     matplotlib
>
> category:
>     standard
>
> source:
>     version:
>         1.3.1
>     tarball:
>         name:     matplotlib-{source.version}.tar.gz
>         sha1:     f340378c43c4c3f6219ef9fd84af4ebbe18f8feb
>
> builder:
>     type:            SpkgInstallScript
>     install_script:  spkg-install
>
> depends:
>     build:
>         - pkgconf
>         - setuptools
>     hard:
>         - python
>         - numpy
>         - freetype
>         - libpng
>         - gdmodule
>         - dateutil
>         - pyparsing
> ----------------------------------------
>
> I've been working on an implementation, which you can find at
> http://trac.sagemath.org/ticket/16483. It is not feature-complete, but
> can already build the standard packages in dependency order.
>
>
> The package manager lives in SAGE_ROOT/build/manager. Eventually, all
> build-related sage command line switches should just call it:
>
> $ ./build/manager/sage-pkg help
> usage: sage-pkg [-h] [--config CONFIG] [--log LOG]
>
>
> {info,shell,list,pkg-upgrade-v1,help,download,unpack,prepare,configure,compile,check,install,build,get}
>                 ...
>
> The Sage Package Manager
>
> positional arguments:
>
> {info,shell,list,pkg-upgrade-v1,help,download,unpack,prepare,configure,compile,check,install,build,get}
>     info                Print information about package
>     shell               IPython shell
>     list                List all packages
>     pkg-upgrade-v1      Upgrade package descriptions
>     help                Get help
>     download            Build package up to the "download" step
>     unpack              Build package up to the "unpack" step
>     prepare             Build package up to the "prepare" step
>     configure           Build package up to the "configure" step
>     compile             Build package up to the "compile" step
>     check               Build package up to the "check" step
>     install             Build package and install
>     build               Build everything
>     get                 Download tarball/spkg/file
>
> optional arguments:
>   -h, --help            show this help message and exit
>   --config CONFIG       Builder configuration file
>   --log LOG             One of [DEBUG, INFO, ERROR, WARNING, CRITICAL]
>
> $ ./build/manager/sage-pkg info matplotlib
> Configuration:
> - config.builder.install_script = spkg-install
> - config.builder.type = SpkgInstallScript
> - config.category = standard
> - config.depends.build = 'pkgconf', 'setuptools']
> - config.depends.hard = ['python', 'numpy', 'freetype', 'libpng',
> 'gdmodule', 'dateutil', 'pyparsing']
> - config.name = matplotlib
> - config.source.tarball.name = matplotlib-1.3.1.tar.gz
> - config.source.tarball.sha1 = f340378c43c4c3f6219ef9fd84af4ebbe18f8feb
> - config.source.version = 1.3.1
> Status: up to date
> Installed when: 2 hours ago
>
>  --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to