kicad-lib-committers team mailing list archive
-
kicad-lib-committers team
-
Mailing list archive
-
Message #00046
Re: Library build process
----- Original Message -----
> From: Johannes Spanier <jospanier@xxxxxx>
> To: kicad-lib-committers@xxxxxxxxxxxxxxxxxxx
> Cc:
> Sent: Sunday, January 5, 2014 2:17 AM
> Subject: [Kicad-lib-committers] Library build process
>
> Hi Libteam,
>
> Since the move to the *.pretty directory structure all in seperate repos, how do
> I build the complete library?
> I want to use the library on-disk and not depend on the github-plugin and thus
> internet and github to work.
>
> By now I just clone ALL *.pretty repos from GitHub and keep them synced
> afterwards, but some sort of build script would be much cleaner.
>
> I use this very crude Python script to fetch ALL GitHub KiCad repos (and exclude
> the kicad-source-mirror)
> The script requires PyGitHub -> pip install PyGitHub
>
> -------- clone all repos of an GitHub organization ------
> #! /usr/bin/python
>
> from github import Github
> import os
>
> g = Github()
> org = "KiCad"
> cmd_template = '"git clonehttps://github.com/" + org +
> "/" + repo + ".git"'
>
> repolist = [repo.name for repo in g.get_organization(org).get_repos()]
>
> for repo in repolist:
> if repo != "kicad-source-mirror":
> os.system(eval(cmd_template))
> ---------------------------------------------------------
>
> Regards,
>
> Johannes Spanier
>
Hi Johannes,
I think that script is pretty good for the initial pull. With a little work to check if a directory exists (in which case 'pull' instead of 'clone') it will be much better. The challenge I think is placing the cloned items in an appropriate directory and maintaining them. On Linux and OSX this would be trivial - simply create symlinks. I don't know about MSWin.
Another convenience would be to create the fp_libtable entries as well, but managing the entries can be tricky: basically the main table would have to be parsed and entries only added if they don't already exist.
- Cirilo
Follow ups
References