diff --git a/dist/pyrfc-1.9.4-py2.6-linux-x86_64.egg b/dist/pyrfc-1.9.4-py2.6-linux-x86_64.egg new file mode 100644 index 0000000..7ccd972 Binary files /dev/null and b/dist/pyrfc-1.9.4-py2.6-linux-x86_64.egg differ diff --git a/dist/pyrfc-1.9.4-py2.7-linux-x86_64.egg b/dist/pyrfc-1.9.4-py2.7-linux-x86_64.egg index 6c85641..655c4a0 100644 Binary files a/dist/pyrfc-1.9.4-py2.7-linux-x86_64.egg and b/dist/pyrfc-1.9.4-py2.7-linux-x86_64.egg differ diff --git a/doc/build.rst b/doc/build.rst index 4c22364..b110b46 100644 --- a/doc/build.rst +++ b/doc/build.rst @@ -15,6 +15,7 @@ Toolchain preparation Linux platform --------------- * :ref:`Install Python ` +* Install ``easy_install`` as described in :ref:`pyrfc installation ` * :ref:`Install SAP NW RFC Library ` * To get any software from the Git source control system the Git client is required as well, use whatever your distribution has @@ -26,6 +27,7 @@ Windows platform ----------------- * :ref:`Install Python ` +* Install ``easy_install`` as described in :ref:`pyrfc installation ` * :ref:`Install SAP NW RFC Library ` * To get any software from the Git source control system the Git client is required as well. Download and install from @@ -54,20 +56,20 @@ Otherwise, follow the example below. Linux platform -------------- -Clone the repository +Clone the repository: - .. code-block:: sh +.. code-block:: sh - git clone https://github.com/SAP/PyRFC + git clone https://github.com/SAP/PyRFC Edit ``setup.py`` and set the CYTHON_VERSION Build the distribution - .. code-block:: sh +.. code-block:: sh - python setup.py clean --all - python setup.py bdist_egg + python setup.py clean --all + python setup.py bdist_egg The result is found in the ``dist/`` directory. The process has to be done on all platforms for which we provide eggs. @@ -78,9 +80,9 @@ Windows platform Open the ``GIT Bash`` shell and clone the repository. - .. code-block:: sh +.. code-block:: sh - git clone https://github.com/SAP/PyRFC + git clone https://github.com/SAP/PyRFC Open the ``CMD Shell`` from ``Microsoft Windows SDK 7.0`` and change to cloned ``pyrfc`` folder. @@ -88,17 +90,17 @@ Edit ``setup.py`` and set the CYTHON_VERSION Set env variables for the release, use /x64 for 64 bit and /x86 for 32 bit: - .. code-block:: sh +.. code-block:: sh - set DISTUTILS_USE_SDK=1 - setenv /x64 /release + set DISTUTILS_USE_SDK=1 + setenv /x64 /release Build the distribution: - .. code-block:: sh +.. code-block:: sh - python setup.py clean --all - python setup.py bdist_egg + python setup.py clean --all + python setup.py bdist_egg Check the ``pyrfc\dist`` folder for a new created egg. @@ -114,11 +116,11 @@ the PATH variable. However, the PATH variable is modified when using a virtual environment, therefore modify the ``Scripts/activate.bat`` file with: - .. code-block:: sh +.. code-block:: sh - set SAPNWRFC_HOME=C:\nwrfcsdk_x86 - set PATH=C:\nwrfcsdk_x86\lib\;%PATH% - set PATH=%VIRTUAL_ENV%\Scripts;%PATH% + set SAPNWRFC_HOME=C:\nwrfcsdk_x86 + set PATH=C:\nwrfcsdk_x86\lib\;%PATH% + set PATH=%VIRTUAL_ENV%\Scripts;%PATH% This assures that specific SAP NW RFC Library is used (e.g. 32bit in this example). This is not required for building the distribution, but rather for importing the Python connector. @@ -131,11 +133,11 @@ Python 3 Prerequisites for building on Python 3, tested on Linux Mint and Ubuntu - .. code-block:: sh +.. code-block:: sh - sudo apt-get install python3-setuptools python3-dev python-configparser - sudo easy_install3 pip - sudo pip3 install cython sphinx ipython + sudo apt-get install python3-setuptools python3-dev python-configparser + sudo easy_install3 pip + sudo pip3 install cython sphinx ipython Building the documentation @@ -145,26 +147,30 @@ Ensure that the lib directory of the SAP NW RFC library is in your PATH environm Change into the ``doc`` directory and type: - .. code-block:: sh +.. code-block:: sh - make clean - make html + make clean + make html The result is found in ``_build/html`` and for other options call ``make``. * If you get an error *'sphinx-build' is not recognized as an internal or external command, operable program or batch file* on calling ``make html``, install ``sphinx`` * If you have DLL import errors (Windows), check the lib directory of the SAP NW RFC Library PATH env variable. -GitHub Pages ------------- - The docu is hosted on GitHub Pages, a propietary solution where a git branch ``gh-pages`` is created as an orphan and the output of the documentation build process (``_build/html``) is stored in that branch. - GitHub then serves these files under a special ``/pages/`` url. To update GitHub Pages, copy everyhing under ``_build/html`` and overwrite the existing files in the ``gh-pages`` branch root. +.. code-block:: sh + + cp _build/html ~/tmp + git checkout gh-pages + rm -Rf *.html *.js *.egg build doc _* pyrfc* *.inv + cp -Rf ~/tmp/_build/html/. . + + .. note:: An additional file .nojekyll is placed in ``gh-pages`` to disable the default GitHub processing which breaks sphinx style folders with leading underscores. diff --git a/doc/install.rst b/doc/install.rst index ae174b1..d961114 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -171,7 +171,26 @@ Python on Linux .. _`install-python-linux`: * Install Python 2.7 (64bit, usually the default) via your preferred package manager - and ``easy_install``. + +* Install ``easy_install`` + + Use the ``distribute`` implementation of ``easy_install`` by downloading + https://bootstrap.pypa.io/ez_setup.py and running + + .. code-block:: none + + python ez_setup.py + + .. note:: + + At this point you may like to install the `pip`_ package which extends + the functionality of ``easy_install``. However, ``pip`` cannot handle binary + build distributions, which will be used later. + + If you are in a internal network that uses a proxy to access resources from + the internet, you may encounter :ref:`connection problems`. + + .. _pip: http://pypi.python.org/pypi/pip * Virtual environment (optional) diff --git a/setup.py b/setup.py index 2da8580..c25b4dc 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ # Note: Historically, the default setup.py did _not_ contain cython requirements. # To build just the extensions inplace, use: # python setup.py build_ext --inplace -CYTHON_VERSION = '0.21.1' # fixed to assure conscious change of version. +CYTHON_VERSION = '0.21.2' # fixed to assure conscious change of version. try: import Cython except ImportError: @@ -41,12 +41,12 @@ def _read(name): if sys.platform.startswith('linux'): LIBS = ['sapnwrfc', 'sapucum'] MACROS = [('NDEBUG', None), ('_LARGEFILE_SOURCE', None), ('_FILE_OFFSET_BITS', 64), ('SAPonUNIX', None), ('SAPwithUNICODE', None) , ('SAPwithTHREADS', None), ('SAPonLIN', None)] - COMPILE_ARGS = ['-Wall', '-O2', '-fexceptions', '-funsigned-char', '-fno-strict-aliasing', '-Wall', '-Wno-uninitialized', '-Wcast-align', '-fPIC', '-pthread', '-minline-all-stringops', '-I{}/include'.format(SAPNWRFC_HOME)] - LINK_ARGS = ['-L{}/lib'.format(SAPNWRFC_HOME)] + COMPILE_ARGS = ['-Wall', '-O2', '-fexceptions', '-funsigned-char', '-fno-strict-aliasing', '-Wall', '-Wno-uninitialized', '-Wcast-align', '-fPIC', '-pthread', '-minline-all-stringops', '-I{0}/include'.format(SAPNWRFC_HOME)] + LINK_ARGS = ['-L{0}/lib'.format(SAPNWRFC_HOME)] elif sys.platform.startswith('win'): LIBS = ['sapnwrfc', 'libsapucum'] MACROS = [('_LARGEFILE_SOURCE', None), ('SAPwithUNICODE', None), ('_CONSOLE', None), ('WIN32', None), ('SAPonNT', None), ('SAP_PLATFORM_MAKENAME', 'ntintel'), ('UNICODE', None), ('_UNICODE', None)] - COMPILE_ARGS = ['-I{}\\include'.format(SAPNWRFC_HOME)] + COMPILE_ARGS = ['-I{0}\\include'.format(SAPNWRFC_HOME)] #LINK_ARGS = ['-L{}\\lib'.format(SAPNWRFC_HOME)] # JK: Does not work with MS VS8.0 Linker, works with MinGW? LINK_ARGS = ['-LIBPATH:{0}\\lib'.format(SAPNWRFC_HOME)] @@ -69,6 +69,7 @@ def _read(name): 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Cython', + 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Topic :: Software Development :: Libraries :: Python Modules',