{ "info": { "author": "Lenny Morayniss", "author_email": "ldmoray@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "|Build Status|\n\nA styn of Python build.\n=======================\n\n`Lenny Morayniss `__\n\nFeatures\n--------\n\n- Easy to learn.\n- Build tasks are just python functions.\n- Manages dependencies between tasks.\n- Automatically generates a command line interface.\n- Rake style param passing to tasks\n- Supports python 2.7 and python 3.x\n- Tasks are called chores.\n- Works with Celery.\n\nInstallation\n------------\n\nYou can install styn from the Python Package Index (PyPI) or from\nsource.\n\nUsing pip\n\n.. code:: bash\n\n $ pip install styn\n\nUsing easy\\_install\n\n.. code:: bash\n\n $ easy_install styn\n\nExample\n-------\n\nThe build script is written in pure Python and styn takes care of\nmanaging any dependencies between tasks and generating a command line\ninterface.\n\nWriting build tasks is really simple, all you need to know is the @task\ndecorator. Tasks are just regular Python functions marked with the\n``@task()`` decorator. Dependencies are specified with ``@task()`` too.\nTasks can be ignored with the ``@task(ignore=True)``. Disabling a task\nis an useful feature to have in situations where you have one task that\na lot of other tasks depend on and you want to quickly remove it from\nthe dependency chains of all the dependent tasks.\n\n**build.py**\n------------\n\n.. code:: python\n\n\n #!/usr/bin/python\n\n import sys\n from styn import chore\n\n @chore()\n def clean():\n '''Clean build directory.'''\n print 'Cleaning build directory...'\n\n @chore(clean)\n def html(target='.'):\n '''Generate HTML.'''\n print 'Generating HTML in directory \"%s\"' % target\n\n @chore(clean, ignore=True)\n def images():\n '''Prepare images.'''\n print 'Preparing images...'\n\n @chore(html,images)\n def start_server(server='localhost', port = '80'):\n '''Start the server'''\n print 'Starting server at %s:%s' % (server, port)\n\n @chore(start_server) #Depends on task with all optional params\n def stop_server():\n print 'Stopping server....'\n\n @chore()\n def copy_file(src, dest):\n print 'Copying from %s to %s' % (src, dest)\n\n @chore()\n def echo(*args,**kwargs):\n print args\n print kwargs\n \n # Default task (if specified) is run when no task is specified in the command line\n # make sure you define the variable __DEFAULT__ after the task is defined\n # A good convention is to define it at the end of the module\n # __DEFAULT__ is an optional member\n\n __DEFAULT__=start_server\n\n**Running styn chores**\n-----------------------\n\nThe command line interface and help is automatically generated. Task\ndescriptions are extracted from function docstrings.\n\n.. code:: bash\n\n $ styn -h\n usage: styn [-h] [-l] [-v] [-f file] [task [task ...]]\n\n positional arguments:\n task perform specified task and all its dependencies\n\n optional arguments:\n -h, --help show this help message and exit\n -l, --list-tasks List the tasks\n -v, --version Display the version information\n -f file, --file file Build file to read the tasks from. Default is\n 'build.py'\n\n.. code:: bash\n\n $ styn -l\n Tasks in build file ./build.py:\n clean Clean build directory.\n copy_file \n echo \n html Generate HTML.\n images [Ignored] Prepare images.\n start_server [Default] Start the server\n stop_server \n\n Powered by styn - A Lightweight Python Build Tool for Celery Users.\n\nstyn takes care of dependencies between tasks. In the following case\nstart\\_server depends on clean, html and image generation (image task is\nignored).\n\n.. code:: bash\n\n $ styn #Runs the default task start_server. It does exactly what \"styn start_server\" would do.\n [ example.py - Starting task \"clean\" ]\n Cleaning build directory...\n [ example.py - Completed task \"clean\" ]\n [ example.py - Starting task \"html\" ]\n Generating HTML in directory \".\"\n [ example.py - Completed task \"html\" ]\n [ example.py - Ignoring task \"images\" ]\n [ example.py - Starting task \"start_server\" ]\n Starting server at localhost:80\n [ example.py - Completed task \"start_server\" ]\n\nThe first few characters of the task name is enough to execute the task,\nas long as the partial name is unambiguous. You can specify multiple\ntasks to run in the commandline. Again the dependencies are taken taken\ncare of.\n\n.. code:: bash\n\n $ styn cle ht cl\n [ example.py - Starting task \"clean\" ]\n Cleaning build directory...\n [ example.py - Completed task \"clean\" ]\n [ example.py - Starting task \"html\" ]\n Generating HTML in directory \".\"\n [ example.py - Completed task \"html\" ]\n [ example.py - Starting task \"clean\" ]\n Cleaning build directory...\n [ example.py - Completed task \"clean\" ]\n\nThe 'html' task dependency 'clean' is run only once. But clean can be\nexplicitly run again later.\n\nstyn tasks can accept parameters from commandline.\n\n.. code:: bash\n\n $ styn \"copy_file[/path/to/foo, path_to_bar]\"\n [ example.py - Starting task \"clean\" ]\n Cleaning build directory...\n [ example.py - Completed task \"clean\" ]\n [ example.py - Starting task \"copy_file\" ]\n Copying from /path/to/foo to path_to_bar\n [ example.py - Completed task \"copy_file\" ]\n\nstyn can also accept keyword arguments.\n\n.. code:: bash\n\n $ styn start[port=8888]\n [ example.py - Starting task \"clean\" ]\n Cleaning build directory...\n [ example.py - Completed task \"clean\" ]\n [ example.py - Starting task \"html\" ]\n Generating HTML in directory \".\"\n [ example.py - Completed task \"html\" ]\n [ example.py - Ignoring task \"images\" ]\n [ example.py - Starting task \"start_server\" ]\n Starting server at localhost:8888\n [ example.py - Completed task \"start_server\" ]\n \n $ styn echo[hello,world,foo=bar,blah=123]\n [ example.py - Starting task \"echo\" ]\n ('hello', 'world')\n {'blah': '123', 'foo': 'bar'}\n [ example.py - Completed task \"echo\" ]\n\n**Organizing build scripts**\n----------------------------\n\nYou can break up your build files into modules and simple import them\ninto your main build file.\n\n.. code:: python\n\n from deploy_tasks import *\n from test_tasks import functional_tests, report_coverage\n\nContributors/Contributing\n-------------------------\n\n- Raghunandan Rao - styn is preceded by and forked from\n `pynt `__, which was created by\n `Raghunandan Rao `__.\n- Calum J. Eadie - pynt is preceded by and forked from\n `microbuild `__, which was\n created by `Calum J. Eadie `__.\n\nIf you want to make changes the repo is at\nhttps://github.com/ldmoray/styn. You will need\n`pytest `__ to run the tests\n\n.. code:: bash\n\n $ ./b t\n\nIt will be great if you can raise a `pull\nrequest `__ once\nyou are done.\n\n*If you find any bugs or need new features please raise a ticket in the\n`issues section `__ of the\ngithub repo.*\n\nReally, this is just a downstream fork to rename \"tasks\" to \"chores\"\nthough.\n\nLicense\n-------\n\npynt is licensed under a `MIT\nlicense `__\n\n.. |Build Status| image:: https://travis-ci.org/ldmoray/styn.svg?branch=master\n :target: https://travis-ci.org/ldmoray/styn\n\nChanges \n=======\n1.0.0 - 30/03/2016\n------------------\n* Rename task decorator to chore to work with Celery.\n* Use default \"py.test\" to test. Only test one version.\n\nChanges before forking from pynt\n================================\n\n0.8.1 - 02/09/2013\n------------------\n* Enabling extensions\n\n0.8.0 - 02/09/2013\n------------------\n* Support for specifying a default task with __DEFAULT__ variable\n* pynt -v (--version) for displays version info\n* pynt -l lists tasks in alphabetical order\n\n0.7.1 - 17/03/2013\n------------------\n* Migrated pynt to work on python 3.x. pynt still works on 2.7.\n* pynt version now displayed as part of help output.\n\n0.7.0 - 16/02/2013\n------------------\n\n* New commandline interface. Distribution now includes 'pynt' executable.\n* 'build.py' is the default build file.\n* Build files no longer need \"if main\" construct.\n* pynt no longer exposes build method. This is a backward incompatible change.\n\n\n0.6.0 - 17/12/2012\n------------------\n\n* Simplified ignoring tasks. ignore a keyword param for task and not a separate decorator. [This change is NOT backward compatible!!!]\n* Added support for listing tasks\n* Improved help\n\n\n0.5.0 - 01/12/2012\n------------------\n\n* Ability to pass params to tasks.\n* Major rewrite and flattening the package hierarchy.\n\n0.4.0 - 17/11/2012\n------------------\n\n* Support for running multiple tasks from commandline.\n* Ability to run tasks by typing in just the first few unambigious charecters.\n\n\nChanges before forking from microbuild\n======================================\n\n0.3.0 - 18/09/2012\n------------------\n\n* Fixed bug in logging. No longer modifies root logger.\n* Added ignore functionality.\n* Extended API documentation.\n\n0.2.0 - 29/08/2012\n------------------\n\n* Added progress tracking output.\n* Added handling of exceptions within tasks.\n\n0.1.0 - 28/08/2012\n------------------\n\n* Initial release.\n* Added management of dependancies between tasks.\n* Added automatic generation of command line interface.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://rags.github.com/pynt/", "keywords": "build", "license": "MIT License", "maintainer": null, "maintainer_email": null, "name": "styn", "package_url": "https://pypi.org/project/styn/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/styn/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://rags.github.com/pynt/" }, "release_url": "https://pypi.org/project/styn/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "Lightweight Python Build Tool for Celery Users.", "version": "1.0.0" }, "last_serial": 2036661, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "6ede097ec807f52e97fc92230db68983", "sha256": "7e9e2784bc87c4d25efae3adec8e62ef4b87724b4fe014abfc6aaff89a75a98d" }, "downloads": -1, "filename": "styn-1.0.0.tar.gz", "has_sig": false, "md5_digest": "6ede097ec807f52e97fc92230db68983", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10553, "upload_time": "2016-03-30T19:16:37", "url": "https://files.pythonhosted.org/packages/b8/e9/6c7ea4f6696d24c83753a882af39704dbd381c93ab4f98c79f847d8b8b53/styn-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6ede097ec807f52e97fc92230db68983", "sha256": "7e9e2784bc87c4d25efae3adec8e62ef4b87724b4fe014abfc6aaff89a75a98d" }, "downloads": -1, "filename": "styn-1.0.0.tar.gz", "has_sig": false, "md5_digest": "6ede097ec807f52e97fc92230db68983", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10553, "upload_time": "2016-03-30T19:16:37", "url": "https://files.pythonhosted.org/packages/b8/e9/6c7ea4f6696d24c83753a882af39704dbd381c93ab4f98c79f847d8b8b53/styn-1.0.0.tar.gz" } ] }