{ "info": { "author": "Alex Rudakov", "author_email": "ribozz+layers@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Layers\n--------------\n\nLayers is small utility for software developers that use aufs to merge several layers project into one.\n\n.. note::\n Project is in alpha-dev stage. Contributions, testing, feedback are really welcome.\n\nWhy?\n====================\n\nLayers allow to apply DRY principle to your project by merging several folders into one. Every software\nproject has some files that are copied from project to project without modification.\n\nExamples:\n\n - configuration files for your development stack\n - .gitignore files\n - directory structure\n - ... more samples?\n\n\nUsually this files are copied once, and it's big work to update them all after.\n\n\nAufs to help\n===================\n\nAufs is layered filesystem that allows to merge several directories into one, and keep them writable.\nLayers utility use aufs, to compose layers automatically.\n\n\nInstallation\n===================\n\n\nYou need linux (not tested on other OSes yet) with aufs-tools installed, python-pip is also needed.\nUsually you have all those if you ever use Docker, if not then google how to install this tools.\n\nInstall Layers::\n\n sudo pip install layers\n\nAs mount command against curent directory is not possible (shows \"directory busy\" error), add alias for layers\ncommand to execute it from parent dir, and then get you back in project directory. Execute in shell::\n\n echo \"layers() { LPD=\\$PWD; cd ..; layers-util \\$LPD \\$@; cd \\$LPD; }\" >> ~/.bashrc\n source ~/.bashrc\n\nThis will update your .bashrc automatically.\n\n\nQuick start\n===================\n\n\nLet's prepare example directory structure::\n\n mkdir project1\n mkdir some-layer\n mkdir another\n\nproject1 - is our project directory. Another too are layers.\nWe will put some data into \"some-layer\" and another::\n\n echo \"*.pyc\" > some-layer/.gitignore\n echo \"Empty yet\" > some-layer/README.txt\n\n echo \"John Doe (c) 2076 year\" > another/AUTHOR.txt\n\nNow create layers.yml file in your project1 directory, like this::\n\n layers:\n\n every-python-project-should-have-this:\n path: ../some-layer\n\n just-my-ego:\n path: ../another\n\nNow, lets mount this::\n\n cd project1\n layers mount\n\nNow, ls should show the following::\n\n ls project1\n\n AUTHOR.txt layers.yml README.txt\n\n\nWorking with layers\n=========================\n\nIf you make any changes in project1 directory, all changes will be recorded only on this layer,\nso, if we change project1/README.txt, it will not affect \"some-layer\"::\n\n $ cat project1/README.txt\n\n Empty yet\n\n $ echo \"This is project readme\" > project1/README.txt\n\n $ cat project1/README.txt\n\n This is project readme\n\n $ cat some-layer/README.txt\n\n Empty yet\n\nBut if you modify layers, changes are reflected::\n\n $ echo \".more-to-ignore\" >> some-layer/.gitignore\n\n $ cat project1/.gitignore\n\n *.pyc\n .more-to-ignore\n\n\nAuto-create mount-points\n==========================\n\nlayers.yml have one interesting option that allow to create mount point before it mounted.\nFor example it can be checked out from git::\n\n\n layers:\n\n mfcloud-python:\n path: ../python-django\n create: git clone git@bitbucket.org:ribozz/python-django.git\n\n\nSyntax here is::\n\n create: {any valid bash command}\n\n\nThis may allow you to bootstrap your projects very quickly::\n\n $ git clone my-repo-url-here my-project\n $ cd my-project\n $ layers mount\n\n\nAnd magically all your layers are checked out and mounted.\n\n\n\nMount to different directory\n==============================\n\n\"to\" allows to mount to sub-directories::\n\n layers:\n\n cratis:\n path: ../cratis\n create: git clone git@bitbucket.org:itpeople/cratis.git\n to: lib/cratis\n\n cratis-features:\n path: ../cratis-features\n create: git clone git@bitbucket.org:itpeople/cratis-features.git\n to: lib/cratis-features\n\n mfcloud-python:\n path: ../python-django\n create: git clone git@bitbucket.org:ribozz/python-django.git\n\n\n\nCommand reference\n======================\n\nlayers mount\n*****************\n\nSyntax:\n\n layers mount\n\nMounts all layers referred in layers.yml\n\n\nlayers umount\n*****************\n\nSyntax:\n\n layers umount\n\nUnmounts all layers from current directory\n\n\nlayers commands\n*****************\n\nSyntax:\n\n layers {some commmand}\n\nchdir into every directory specified in layers.yml, and execute command.\nExample::\n\n $ layers ls -la\n\n Layer /home/alex/dev/example/project1\n\n total 24\n drwxrwxr-x 8 alex alex 4096 sept 30 14:43 .\n drwxrwxr-x 5 alex alex 4096 sept 30 13:59 ..\n -rw-rw-r-- 1 alex alex 23 sept 30 14:04 AUTHOR.txt\n -rw-rw-r-- 1 alex alex 22 sept 30 14:46 .gitignore\n -rw-rw-r-- 1 alex alex 113 sept 30 14:05 layers.yml\n -rw-rw-r-- 1 alex alex 23 sept 30 14:43 README.txt\n\n Layer /home/alex/dev/example/some-layer\n\n total 24\n drwxrwxr-x 4 alex alex 4096 sept 30 14:06 .\n drwxrwxr-x 5 alex alex 4096 sept 30 13:59 ..\n -rw-rw-r-- 1 alex alex 22 sept 30 14:46 .gitignore\n -rw-rw-r-- 1 alex alex 10 sept 30 14:42 README.txt\n -r--r--r-- 1 root root 0 sept 30 14:06 .wh..wh.aufs\n drwx------ 2 root root 4096 sept 30 14:06 .wh..wh.orph\n drwx------ 2 root root 4096 sept 30 14:06 .wh..wh.plnk\n\n Layer /home/alex/dev/example/another\n\n total 20\n drwxrwxr-x 4 alex alex 4096 sept 30 14:06 .\n drwxrwxr-x 5 alex alex 4096 sept 30 13:59 ..\n -rw-rw-r-- 1 alex alex 23 sept 30 14:04 AUTHOR.txt\n -r--r--r-- 1 root root 0 sept 30 14:06 .wh..wh.aufs\n drwx------ 2 root root 4096 sept 30 14:06 .wh..wh.orph\n drwx------ 2 root root 4096 sept 30 14:06 .wh..wh.plnk\n\n\nAnother useful command is::\n\n layers git status\n\nLicence\n======================\n\nApache licecne. See LICENCE for details\n\nChangelog\n======================\n\n\n----------------------\n\n0.1.5\n\n- Improved handling of sub-mounts (to: ). (Alex.R.)\n\n----------------------\n\n0.1.4\n\n- Fix installation pocess in setup.py. (Alex. R.)\n- Improved sh script, made it more user-friendly. Added instructions to README how to pudate bashrc (Alex.R.)\n\n----------------------\n\n0.1.3\n\nAdded \"to\" to layers.yml (Alex R.)\n\n---------------------", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ribozz/layers", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "layers", "package_url": "https://pypi.org/project/layers/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/layers/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ribozz/layers" }, "release_url": "https://pypi.org/project/layers/0.1.5/", "requires_dist": null, "requires_python": null, "summary": "Layered source layouts for software development projects", "version": "0.1.5" }, "last_serial": 1243955, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "657a00619eb09c7054428bcedd78daa5", "sha256": "94edba448903c526b10b3fba0d064d9efae7b4f55ac28018068c26a1fa466737" }, "downloads": -1, "filename": "layers-0.1.0.tar.gz", "has_sig": false, "md5_digest": "657a00619eb09c7054428bcedd78daa5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 984, "upload_time": "2014-09-30T08:01:36", "url": "https://files.pythonhosted.org/packages/5c/6b/f4c0d9fe63d07dc65468a663d2f702946ed4b8943ba9a9919d2cad9afbb3/layers-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d41f87ea15bf1223fc58d2200d0adab4", "sha256": "5ec846510c1d076de23a90a65df92b87c0a8d27c13a70a00683aae4421049e05" }, "downloads": -1, "filename": "layers-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d41f87ea15bf1223fc58d2200d0adab4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3070, "upload_time": "2014-09-30T11:57:59", "url": "https://files.pythonhosted.org/packages/9a/e3/be0b3a436a129cc27a6882c6c8129e38b6b26eadbba70e991102b01a2288/layers-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b463ca2e22326dbe185401a90e26db87", "sha256": "f7326f544119158111c23b580bfffec83258cc88e6961c237635459e8e90d9bd" }, "downloads": -1, "filename": "layers-0.1.2.tar.gz", "has_sig": false, "md5_digest": "b463ca2e22326dbe185401a90e26db87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3068, "upload_time": "2014-09-30T12:29:09", "url": "https://files.pythonhosted.org/packages/61/ef/2f391738c4fd76cf683438499c6ef321997e2f77bf2d1df7166245a29507/layers-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "b34b1d12fed6d253f549c6a28c1a5937", "sha256": "2e4cc0b51b32f7fba477fcc7a998e55eae8f16320afab8d627c412bc3be1d7d2" }, "downloads": -1, "filename": "layers-0.1.3.tar.gz", "has_sig": false, "md5_digest": "b34b1d12fed6d253f549c6a28c1a5937", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3417, "upload_time": "2014-09-30T14:36:55", "url": "https://files.pythonhosted.org/packages/c3/f9/c1ee8e5b49a2e205a99baedf3adbb07386198e24b41bf378a4d4bdcb0155/layers-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "033502728f8e30952970cb27dba338fe", "sha256": "a5639a32f95d2fb2d39d6d4ca234d08b3c31206c2bb3fc74cac309ea3d1a7f1c" }, "downloads": -1, "filename": "layers-0.1.4.tar.gz", "has_sig": false, "md5_digest": "033502728f8e30952970cb27dba338fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4977, "upload_time": "2014-09-30T17:05:24", "url": "https://files.pythonhosted.org/packages/f6/aa/3eaf79e9feeeab6714f8cfba94387f71918d0f3a3ebdaa3e696d1764096f/layers-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "a0128b3b8f5f7963dc5bc227a712aae3", "sha256": "641153e690ab39a86bc5da00a19bd2daad107ff983d0e24955d006e1cb86030c" }, "downloads": -1, "filename": "layers-0.1.5.tar.gz", "has_sig": false, "md5_digest": "a0128b3b8f5f7963dc5bc227a712aae3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5479, "upload_time": "2014-10-01T04:56:57", "url": "https://files.pythonhosted.org/packages/d9/92/35202726dd7c4408700914d997d42687b88b90c50ac808ebb81a85a12f36/layers-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a0128b3b8f5f7963dc5bc227a712aae3", "sha256": "641153e690ab39a86bc5da00a19bd2daad107ff983d0e24955d006e1cb86030c" }, "downloads": -1, "filename": "layers-0.1.5.tar.gz", "has_sig": false, "md5_digest": "a0128b3b8f5f7963dc5bc227a712aae3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5479, "upload_time": "2014-10-01T04:56:57", "url": "https://files.pythonhosted.org/packages/d9/92/35202726dd7c4408700914d997d42687b88b90c50ac808ebb81a85a12f36/layers-0.1.5.tar.gz" } ] }