From 5f43faa7f3577561ccec58011848d893681e7ecf Mon Sep 17 00:00:00 2001 From: mpeterv Date: Fri, 14 Aug 2015 12:35:12 +0300 Subject: [PATCH] Package for pip --- MANIFEST.in | 2 ++ README.rst | 4 +++- hererocks.py | 6 +++++- setup.py | 40 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 MANIFEST.in mode change 100644 => 100755 hererocks.py create mode 100644 setup.py diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..9d5d250 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include LICENSE +include README.rst diff --git a/README.rst b/README.rst index 8f77bb6..b29e589 100644 --- a/README.rst +++ b/README.rst @@ -6,7 +6,9 @@ hererocks Installation ------------ -TODO: package and publish on PyPI. +Using `pip `_: run ``pip install hererocks``, using ``sudo`` if necessary. + +Manually: dowbload hererocks with ``wget https://raw.githubusercontent.com/mpeterv/hererocks/master/hererocks.py``, then use ``python hererocks.py ...`` to run it. Usage ----- diff --git a/hererocks.py b/hererocks.py old mode 100644 new mode 100755 index 51f7a06..917e2ce --- a/hererocks.py +++ b/hererocks.py @@ -1,4 +1,7 @@ #!/usr/bin/env python + +"""A tool for installing Lua and LuaRocks locally.""" + from __future__ import print_function import argparse @@ -15,7 +18,8 @@ try: except ImportError: from urllib.request import urlretrieve -hererocks_version = "Hererocks 0.0.1" +hererocks_version = "Hererocks 0.0.3" +__all__ = ["main"] platform_to_lua_target = { "linux": "linux", diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..de9c695 --- /dev/null +++ b/setup.py @@ -0,0 +1,40 @@ +import codecs +import os +import setuptools + +here = os.path.abspath(os.path.dirname(__file__)) +readme = codecs.open(os.path.join(here, "README.rst"), encoding="UTF-8") +long_description = readme.read() +readme.close() + +setuptools.setup( + name="hererocks", + version="0.0.3", + description="Tool for installing Lua and LuaRocks locally", + long_description = long_description, + keywords="lua", + url="https://github.com/mpeterv/hererocks", + author="Peter Melnichenko", + author_email="mpeterval@gmail.com", + license="MIT", + classifiers=[ + "Development Status :: 3 - Alpha", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.0", + "Programming Language :: Python :: 3.1", + "Programming Language :: Python :: 3.2", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4", + "Programming Language :: Python :: 3.5" + ], + py_modules = ["hererocks"], + entry_points={ + "console_scripts": [ + "hererocks=hererocks:main" + ] + } +)