From: Alexander Kanevskiy Date: Mon, 12 Aug 2013 12:13:02 +0000 (+0300) Subject: Minimal setup.py and README X-Git-Tag: submit/devel/20190730.075403~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cef2aa149afc53031d55dc050e3155e4302396e2;p=services%2Fgerritrest.git Minimal setup.py and README --- diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..260cda5 --- /dev/null +++ b/README.rst @@ -0,0 +1,28 @@ +========== +GerritREST +========== + +GerritREST is a simple library to manipulate with Gerrit objects via REST API. + +Quick start +----------- + +1. Define URL of your server + + gerrit_url = "https://mygerrit.example.com/gerrit/" + +2. Get credentials from ~/.netrc for that URL + + import netrc + user, _, pass = netrc.netrc().hosts[urlparse.urlparse(gerrit_url).netloc] + +3. Create GerritREST instance with those parameters + + from gerritrest import GerritREST + gerrit=GerritREST(gerrit_url, user, pass) + +4. Get list of projects with descriptions and parent information from Gerrit + + projects = gerrit.get_projects(description=True, parents=True) + +5. Use obtained information for something useful :) diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..e89ed2d --- /dev/null +++ b/setup.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python +# -*- coding: UTF-8 -*- +# vim: sw=4 ts=4 expandtab ai + +import os +from setuptools import setup, find_packages + +README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() + +# allow setup.py to be run from any path +os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) + +setup ( + name = "gerritrest", + version = "0.1.0", + packages = ['gerritrest'], + # include_package_data=True, + license = "GPLv2", + description = "Access to Gerrit 2.6+ REST APIs", + long_description = README, + # url = "http://", + author = "Alexander Kanevskiy", + author_email = "alexander.kanevskiy@intel.com", + keywords = "python gerrit REST api", + platforms="Python 2.6 and later.", + classifiers=[ + "Development Status :: 3 - Alpha", + "Environment :: Web Environment", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", + "Operating System :: OS Independent", + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7", + 'Topic :: Internet :: WWW/HTTP', + "Topic :: Software Development :: Libraries :: Python Modules" + ] + ) +