From afccd0da30b6679e123572397bfe541cf3582c4d Mon Sep 17 00:00:00 2001 From: hakril Date: Thu, 2 Aug 2018 18:41:08 +0200 Subject: [PATCH] Added doc about how to install pfw in readme and sphinx doc --- README.md | 10 ++++++++++ docs/source/index.rst | 20 ++++++++++++++++++++ docs/source/object_manager.rst | 2 +- setup.py | 12 +++++++++--- 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6aca784..8204e16 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,16 @@ Parts of PythonForWindows are used in the [LKD project][LKD_GITHUB]. If you have any issue, question, suggestion do not hesitate to contact me. I am always glad to have feedbacks from people using this project. +## Installation + +You can install PythonForWindows using the ``setup.py`` script: + +`` +python setup.py install +`` + +Note that PythonForWindows only support Python2 at the moment. + ## Overview ### Processes / Threads diff --git a/docs/source/index.rst b/docs/source/index.rst index af761ca..fbae528 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -23,6 +23,26 @@ I am always glad to have feedbacks from people using this project. Examples are available on the `github page `_ and in the :ref:`sample_of_code`. + +Installation +'''''''''''' + +Installing using setup.py +^^^^^^^^^^^^^^^^^^^^^^^^^ + +You can install PythonForWindows using the ``setup.py`` at the root of the project:: + + python setup.py install + +In its current state the project only support Python2 and +``setup.py`` will raise an :class:`NotImplementedError` is launched from python3. + + +.. warning:: + + PythonForWindows is not available on Pypi for now and thus cannot be directly installed using ``pip``. + + Documentation """"""""""""" diff --git a/docs/source/object_manager.rst b/docs/source/object_manager.rst index 209753b..36d7676 100644 --- a/docs/source/object_manager.rst +++ b/docs/source/object_manager.rst @@ -14,7 +14,7 @@ The :class:`ObjectManager` instance is accessible via :py:attr:`windows.system.o .. warning:: - This API have not been tested on real case yet and may be subject to changes. + This API have not been tested on real cases yet and may be subject to changes. ObjectManager """"""""""""" diff --git a/setup.py b/setup.py index 03bf8b4..d93213a 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,13 @@ -from setuptools import setup -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- +import sys +from setuptools import setup PKG_NAME = "PythonForWindows" VERSION = "0.4" +if sys.version_info[0] != 2: + raise NotImplementedError("PythonForWindows only support Python2 for now") + setup( name = PKG_NAME, @@ -13,7 +17,7 @@ setup( description = 'A codebase aimed to make interaction with Windows and native execution easier', license = 'BSD', keywords = 'windows python', - url = '', + url = 'https://github.com/hakril/PythonForWindows', packages = ['windows', 'windows.crypto', 'windows.debug', @@ -22,4 +26,6 @@ setup( 'windows.rpc', 'windows.utils', 'windows.winobject'], + classifiers = ['Programming Language :: Python :: 2 :: Only', + 'Programming Language :: Python :: 2.7'] ) \ No newline at end of file