{ "info": { "author": "hayj", "author_email": "hj@hayj.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Utilities" ], "description": "WorkspaceManager\n===============\n\nIn order to use this tool, we assume:\n\n * You are familiar with pip / setuptools and python virtual envs\n * You want to organize both dependencies between your own projects and with external libs using python virtual envs\n\nRequirements\n------------\n\nThis lib works on a *workspace* which is a main folder within recursively projects and folders (which are sub-workspaces to gather projects). Here an example :\n\n\t\u2514\u2500\u2500 MyPythonWorkspace\n\t \u00a0\u00a0 \u251c\u2500\u2500 Project1\n\t \u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 project1\n\t \u00a0\u00a0 \u2502\u00a0\u00a0 \t \u2514\u2500\u2500 __init__.py\n\t \u00a0\u00a0 \u251c\u2500\u2500 Basics\n\t \u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 Project2\n\t \u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\t \u2514\u2500\u2500 project2\n\t \u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\t \t \u2514\u2500\u2500 __init__.py\n\t \u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 Project3\n\t \u00a0\u00a0 \u2502\u00a0\u00a0 \t \u2514\u2500\u2500 project3\n\t \u00a0\u00a0 \u2502\u00a0\u00a0 \t \t \u2514\u2500\u2500 __init__.py\n\t \u00a0\u00a0 \u2514\u2500\u2500 wm-conf.json\n\nYou need to create a blank `wm-conf.json` in the root folder to indicate which one is the main workspace.\n\nTo manage an eclipse workspace this way, you need to set MyPythonWorkspace as the workspace and add all projects as external projects, then manage them with eclipse working sets to have the same tree organization.\n\nYou also have to install [Pew](https://github.com/berdario/pew) and [pipsi](https://pypi.python.org/pypi/pipsi) in order to use wm-pew:\n\n\tsudo pip install pipsi\n\tsudo pipsi install pew\n\nInstallation\n------------\n\n\tsudo pip install workspacemanager\n\nThen `cd` to your workspace and execute `touch wm-conf.json`.\n\nGenerate the setup file\n------------------------\n\nUsage (the default path is the current):\n\n\twm-setup [-a /path/to/the/project]\n\n 1. This function will create some files (`LICENCE.txt`, `setup.py`, `requirements.txt`...). Each file can be edited in the */path/to/the/lib/setup-templates*. For instance, you can paste a different licence in the templates folder(default is the MIT licence)\n 2. Each file will be edited according to the username, email, date given when executing the command line\n 3. If there are no *\\_\\_init\\_\\_.py* files or an empty one, a version is added\n\nYou can add lines in the `MANIFEST.in`, choose *topics* in `setup.py`, add requirements... \n\nThen you can subscribe to PyPi and upload your project using `python setup.py sdist upload`.\n\nOr install your project on the current activated venv using `python setup.py install`\n\nYou can create `wm-conf.json` in your workspace (or edit it if it already exists) to set default values:\n\n {\n \"author_email\": \"your@email.com\",\n \"author\": \"yourusername\"\n }\n\nOn Linux you need to install pandoc and pypandoc to handle markdown to reStructuredText convertion:\n\n\tsudo apt-get install pandoc\n\tpip install pypandoc\n\nGenerate a venv linked to the project using Pew\n------------------------\n\n\twm-pew [-a /path/to/the/project] [-p /path/to/python]\n\t\nThis command line is equivalent to `pew new -a /path/to/the/project projectname-venv`\n\nIf a python bin is given (e.g. */usr/bin/python3.6*), the command is equivalent to `pew new -p /path/to/python -a /path/to/the/project projectname-venv`\n\nTo use the venv in eclipse PyDev, right click on your project, properties, interpreter, configure, new, add the venv path (e.g. `/home/username/.virtualenvs/projectname-venv/bin/python2.7`), ok, unselect all but the venv libs, ok, select the new venv, ok.\n\nIf this function doesn't work, add the pew path to `/bin` using `sudo ln -s ~/.local/bin/pew /bin`\n\nIf you want python 3 as default python, you can add `alias wm-pew=\"wm-pew -p /usr/bin/python3.5\"` in your `~/.bash_aliases`.\n\nInstall internal workspace dependencies on the project venv\n------------------------\n\nEach project has one or more packages with *\\_\\_init\\_\\_.py* files.\n\nCreate `local-dependencies.txt` at the root of the current project:\n\n\tcd /path/to/the/project\n\ttouch local-dependencies.txt\n\nThen add local dependencies, i.e. projects (in your workspace) that your project depends on:\n\n\techo \"Utils\" >> local-dependencies.txt\n\techo \"MachineLearningTools\" >> local-dependencies.txt\n\nThe current project and all projects in `local-dependencies.txt` must have setups files which work. And the current project must have an associated venv.\n\nThis command will install all dependencies (recursively) in the current project venv, so you can work on all project (e.g. through eclipse), install all update but work on a totally independent venv:\n\n\twm-deps [-a /path/to/the/project] [-r filename.txt]\n\nIf a local project (your own) is also on PyPi, you can write the PyPi project name after the local project name following by a \"/\" in `local-dependencies.txt` :\n\n\techo \"Utils/hjutils\" >> local-dependencies.txt\n\nSo, in this example, the `hjutils` project from PyPi you uploaded will not be installed using `wm-req`. Instead, you will need `wm-deps` to install the local project.\n\nIf you want to set a custom project name to upload on PyPi, for example `hjutils` instead of `utils` (because the project `utils` probably still exists), just edit the `name` param in the setup file. \n\nCreate a dist of your project and all dependencies\n-------\n\n\twm-dist\n\nThis function will package the project and all internal dependencies in *wm-dist* folder.\n\nYou can then edit the *conf.json* file and use `rsync-all.sh` to install all on a remote server.\n\nTo use this script, you will need `jq` to read json conf from bash script:\n\n\tsudo apt-get install jq\n\nYou can add an authorized key in the host to avoid asking a password.\n\nYou can write your own script in the `wm-dist` folder to run the project on the remote server. This script won't be erased by re-launching `wm-dist`.\n\nYou can set `erase_wm-dist_templates` to true in the `wm-conf.json` file if you want the dist templates to be erased at each re-use.\n\nIf pew is not found on the remote server, add the pew path to `/bin` using `sudo ln -s ~/.local/bin/pew /bin`\n\nYou can set multiple addresses in dist/conf.json by separating all addresses with spaces, e.g. `\"localhost 10.10.10.200 test.com\"`\n\nOthers\n------\n\nUse `wm-workon` to disp the pew workon command line according to the current project.\n\nUse `wm-freeze` to see which lib is installed in the linked venv.\n\nUse `wm-req` to install all requirements of *requirements.txt* in the linked venv.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "workspacemanager", "package_url": "https://pypi.org/project/workspacemanager/", "platform": "", "project_url": "https://pypi.org/project/workspacemanager/", "project_urls": null, "release_url": "https://pypi.org/project/workspacemanager/0.3.2/", "requires_dist": null, "requires_python": "", "summary": "This tool can manage a workspace by providing some useful functions (generation of the setup file and others, generate a virtual env according to the project name, install your own dependencies, generate dist of all dependencies...). See the readme for more informations.", "version": "0.3.2" }, "last_serial": 4816669, "releases": { "0.2.10": [ { "comment_text": "", "digests": { "md5": "dfd2e423e75f901d73e560d491a98804", "sha256": "29dc52596ca8859b06ae11823a1b2a7102243046961ac2a3bc40f79b7aef26a3" }, "downloads": -1, "filename": "workspacemanager-0.2.10.tar.gz", "has_sig": false, "md5_digest": "dfd2e423e75f901d73e560d491a98804", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32392, "upload_time": "2017-10-14T19:35:08", "url": "https://files.pythonhosted.org/packages/e0/31/220373874c106f3f1f03c128f7a2dc1e883fb956835cea3815d3aff67d31/workspacemanager-0.2.10.tar.gz" } ], "0.2.11": [ { "comment_text": "", "digests": { "md5": "4047f0126334d4f52a705f94ebf41037", "sha256": "0d289d3d01d75c6c966f16b9f8efefde16eeb82d99ee793d801112843a2cbc19" }, "downloads": -1, "filename": "workspacemanager-0.2.11.tar.gz", "has_sig": false, "md5_digest": "4047f0126334d4f52a705f94ebf41037", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21304, "upload_time": "2017-12-18T13:42:11", "url": "https://files.pythonhosted.org/packages/dc/b7/03847ae5531a088d6c63e1fa6b65ff74ebd2d52cab1cc51dde9aeca824f0/workspacemanager-0.2.11.tar.gz" } ], "0.2.12": [ { "comment_text": "", "digests": { "md5": "136ab8369a7b720f8a008bc000fbd0d9", "sha256": "25d956658589116c8227d0527bd04fefd61b4d1c6d483570eec0cc6e0586f112" }, "downloads": -1, "filename": "workspacemanager-0.2.12.tar.gz", "has_sig": false, "md5_digest": "136ab8369a7b720f8a008bc000fbd0d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21522, "upload_time": "2018-02-25T14:05:11", "url": "https://files.pythonhosted.org/packages/a9/37/fddfc33076d322dde137458d1c290b2f139715bb072f2815c4e4f6e0f532/workspacemanager-0.2.12.tar.gz" } ], "0.2.13": [ { "comment_text": "", "digests": { "md5": "100b6e002d6614f4dc1b870d99cdc1c1", "sha256": "c166b8b858e410f116a9493b7d74834e459c81c77b5e10e449ca9ed983ae94a1" }, "downloads": -1, "filename": "workspacemanager-0.2.13.tar.gz", "has_sig": false, "md5_digest": "100b6e002d6614f4dc1b870d99cdc1c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22954, "upload_time": "2018-04-02T21:56:27", "url": "https://files.pythonhosted.org/packages/4e/a5/cc3893bfb664e38a4497718ae4b16e6d67177e64e4e046eead52f65341e3/workspacemanager-0.2.13.tar.gz" } ], "0.2.15": [ { "comment_text": "", "digests": { "md5": "6046c9b3c88e93edc9751eaf7d612369", "sha256": "bc0d40b4de8a6e05a783db79a5a01298ebca3618439f1be5ea4e48a4e4df3163" }, "downloads": -1, "filename": "workspacemanager-0.2.15.tar.gz", "has_sig": false, "md5_digest": "6046c9b3c88e93edc9751eaf7d612369", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43705, "upload_time": "2018-09-27T17:47:54", "url": "https://files.pythonhosted.org/packages/c3/8c/52e1aa0a36dd33c5a7cd43c7d00e0e01d90727cb7eb4de6328dcbbdc1f26/workspacemanager-0.2.15.tar.gz" } ], "0.2.18": [ { "comment_text": "", "digests": { "md5": "859360705dd037b1553af303a2e6eefa", "sha256": "bee26972cc6e41d09e9afdb147611e80eafd6442e9322a33d91a158c77b72493" }, "downloads": -1, "filename": "workspacemanager-0.2.18.tar.gz", "has_sig": false, "md5_digest": "859360705dd037b1553af303a2e6eefa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43735, "upload_time": "2018-09-27T20:27:07", "url": "https://files.pythonhosted.org/packages/1f/19/376aff1b5c48a4c1fddf511b9fc74bcfa55e044ec85f7b01c16350fabff4/workspacemanager-0.2.18.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "c3af5f3bd7d13ccb367d1e77e1d67077", "sha256": "0cf002b60f5cba1461e0b4f92c01e0e6c67bb13173fec3169f365346fb0baeb1" }, "downloads": -1, "filename": "workspacemanager-0.3.1.tar.gz", "has_sig": false, "md5_digest": "c3af5f3bd7d13ccb367d1e77e1d67077", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 410265, "upload_time": "2019-02-08T13:28:24", "url": "https://files.pythonhosted.org/packages/ba/c5/8c697b96adf0e6301d20f8dfaf74d33e84db153fbc9001b9f695f5c61d12/workspacemanager-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "49e5d3be4f487d2df4cbe1903507f0cb", "sha256": "5f3165d8aadee0b1b7c9540967f76bcf46c50b529d018b92e8354bddfa031973" }, "downloads": -1, "filename": "workspacemanager-0.3.2.tar.gz", "has_sig": false, "md5_digest": "49e5d3be4f487d2df4cbe1903507f0cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 410306, "upload_time": "2019-02-13T17:12:27", "url": "https://files.pythonhosted.org/packages/af/82/fbf33d3cc69959093538169a8f3fe47ed14b224123b6859ad6d5b746853d/workspacemanager-0.3.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "49e5d3be4f487d2df4cbe1903507f0cb", "sha256": "5f3165d8aadee0b1b7c9540967f76bcf46c50b529d018b92e8354bddfa031973" }, "downloads": -1, "filename": "workspacemanager-0.3.2.tar.gz", "has_sig": false, "md5_digest": "49e5d3be4f487d2df4cbe1903507f0cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 410306, "upload_time": "2019-02-13T17:12:27", "url": "https://files.pythonhosted.org/packages/af/82/fbf33d3cc69959093538169a8f3fe47ed14b224123b6859ad6d5b746853d/workspacemanager-0.3.2.tar.gz" } ] }