Skip to content

Commit

Permalink
Release 2.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
bsrdjan committed Mar 16, 2020
1 parent d276f58 commit cf866a0
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 46 deletions.
4 changes: 2 additions & 2 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Change log
==========

2.0.3 (2020-03-XX)
2.0.3 (2020-03-16)
------------------
- PyPI package
- PyPI package pynwrfc

2.0.2 (2020-03-09)
------------------
Expand Down
6 changes: 5 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
recursive-exclude material *
recursive-exclude doc *
recursive-exclude examples *
recursive-exclude material *
recursive-exclude tests *
exclude PyRFC.code-workspace
26 changes: 17 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# SAP NW RFC SDK Client for Python

Asynchronous, non-blocking [SAP NetWeawer RFC SDK](https://support.sap.com/en/products/connectors/nwrfcsdk.html) client bindings for Python.

[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/pynwrfc)
![PyPI - Implementation](https://img.shields.io/pypi/implementation/pynwrfc)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pynwrfc)
![PyPI - Downloads](https://img.shields.io/pypi/dm/pynwrfc)

Asynchronous, non-blocking [SAP NetWeawer RFC SDK](https://support.sap.com/en/products/connectors/nwrfcsdk.html) client bindings for Python.
Stats: https://pypistats.org/packages/pynwrfc

## Features

Expand All @@ -15,9 +21,11 @@ Asynchronous, non-blocking [SAP NetWeawer RFC SDK](https://support.sap.com/en/pr

- Python 3, on Python 2 only critical fixes

- The _pyrfc_ connector can be [built from source](http://sap.github.io/PyRFC/build.html) on all [platforms supported by SAP NW RFC SDK](https://launchpad.support.sap.com/#/notes/2573790).
- Pre-built wheels are provided for Windows 10 and macOS 10.15 and Linux platforms are supported by build from source installation only (see **[Installation](#Installation)** section below).

- Pre-built [portable Linux wheels](https://www.python.org/dev/peps/pep-0513/) are not supported, neither issues related to portable Linux wheels

- Pre-built _pyrfc_ wheels are provided in respective [releases](https://github.com/SAP/PyRFC/releases), for Python 3 and Python 2 (until 2020), for Windows 10, Ubuntu 16.04 and macOS 10.14.
- [Build from source](http://sap.github.io/PyRFC/build.html) is supported on all [platforms supported by SAP NW RFC SDK](https://launchpad.support.sap.com/#/notes/2573790).

## Prerequisites

Expand Down Expand Up @@ -51,25 +59,25 @@ sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setstealthmode off

## Installation

:exclamation: in preparation :exclamation: Local build from source on your system, triggered by PyPI package install. Check prerequisites above:
**Binary wheel** installed if found on PyPI, fallback to build from source otherwise:

```shell
pip install pyrfc
pip install pynwrfc
```

Pre-built wheel installation, without local build from source. Check prerequisites above and choose the wheel adequate for your platform:
**Build from source**

```shell
pip install https://github.com/SAP/PyRFC/releases/download/2.0.2/pyrfc-2.0.2-cp38-cp38-macosx_10_15_x86_64.whl
pip install pynwrfc --no-binary :all:
```

Alternatively, or if the _pyrfc_ package for your platform not provided, [build the package from source](http://sap.github.io/PyRFC/build.html) on your system and pip install:
or

```shell
git clone https://github.com/SAP/PyRFC.git
cd PyRFC
python setup.py bdist_wheel
pip install dist/pyrfc-2.0.3-cp38-cp38-macosx_10_15_x86_64.whl
pip install --find-links=dist pyrf
# set ABAP system parameters in test/pyrfc.cfg
pytest -vv
```
Expand Down
2 changes: 1 addition & 1 deletion ci/utils/build.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@echo off
python setup.py bdist_wheel
pip install --upgrade --no-index --find-links=dist pyrfc
pip install --upgrade --no-index --find-links=dist pynwrfc
pytest -vv


14 changes: 6 additions & 8 deletions ci/utils/build.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
declare -a PYTHONS=("2715" "369" "374" "380")

rm -rf tests/__pycache__
rm -rf tests/stfc-mrfc/__pycache__
declare -a PYTHONS=("369" "375" "380")

for PYTHON_VERSION in "${PYTHONS[@]}"
do

rm -rf tests/__pycache__
rm -rf tests/stfc-mrfc/__pycache__
echo py$PYTHON_VERSION
pyenv activate py$PYTHON_VERSION
python setup.py bdist_wheel
pip install --upgrade --no-index --find-links=dist pyrfc
pytest -vv

pip install --upgrade --force --find-links=dist pynwrfc
[[ $1 != skip ]] && pytest -vv
done
python setup.py sdist


45 changes: 24 additions & 21 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@
from codecs import open
from setuptools import setup, find_packages, Extension

import Cython.Distutils
from Cython.Build import cythonize
# Check prerequisites: Cython
try:
import Cython.Distutils
from Cython.Build import cythonize
except ImportError:
sys.exit("Cython not installed.")

# SAP NW RFC SDK dependency

# Check prerequisites: SAP NW RFC SDK
SAPNWRFC_HOME = os.environ.get("SAPNWRFC_HOME")
if not SAPNWRFC_HOME:
sys.exit(
Expand All @@ -22,13 +27,12 @@
# sys.exit('Environment variable PYTHONSOURCE not set. Please specify this variable with the root directory of the PYTHONSOURCE Library.')

NAME = "pyrfc"
PYPIPACKAGE = "pynwrfc"
HERE = os.path.abspath(os.path.dirname(__file__))


def _read(name):
with open(os.path.join(HERE, name), "rb", "utf-8") as f:
return f.read()

with open(os.path.join(HERE, "VERSION"), "rb", "utf-8") as version_file:
VERSION = version_file.read().strip()
with open(os.path.join(HERE, "README.md"), "rb", "utf-8") as readme_file:
LONG_DESCRIPTION = readme_file.read().strip()

# https://launchpad.support.sap.com/#/notes/2573953
if sys.platform.startswith("linux"):
Expand Down Expand Up @@ -178,39 +182,38 @@ def _read(name):

# cf. http://docs.python.org/distutils/setupscript.html#additional-meta-data
setup(
name=NAME,
version=_read("VERSION").strip(),
description="Python bindings for SAP NetWeaver RFC Library",
long_description=_read("README.md"),
name=PYPIPACKAGE,
version=VERSION,
description=("Python bindings for SAP NetWeaver RFC Library"),
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
download_url="https://github.com/SAP/PyRFC/tarball/master",
classifiers=[ # cf. http://pypi.python.org/pypi?%3Aaction=list_classifiers
"Development Status :: 4 - Beta",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Cython",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Topic :: Software Development :: Libraries :: Python Modules",
],
keywords="%s sap rfc nwrfcsdk" % NAME,
author="Srdjan Boskovic",
author_email="srdjan.boskovic@sap.com",
keywords="%s %s pyrfc sap rfc nwrfc sapnwrfc" % (NAME, PYPIPACKAGE),
author="SAP SE",
url="https://github.com/SAP/pyrfc",
license="OSI Approved :: Apache Software License",
packages=find_packages(where="src", exclude=("material",)),
maintainer="Srdjan Boskovic",
maintainer_email="srdjan.boskovic@sap.com",
packages=find_packages(where="src", exclude=("../material", "../examples/**.*",)),
package_dir={"": "src"},
# include_package_data=True,
# http://packages.python.org/distribute/setuptools.html#setting-the-zip-safe-flag
zip_safe=False,
install_requires=["setuptools"],
setup_requires=["setuptools-git", "Cython", "Sphinx"],
cmdclass={"build_ext": Cython.Distutils.build_ext},
ext_modules=cythonize(PYRFC_EXT, annotate=True),
ext_modules=cythonize(PYRFC_EXT, annotate=True, language_level="3"),
test_suite="pyrfc",
)
3 changes: 0 additions & 3 deletions src/pyrfc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
# import from internal modules that they could be directly imported from
# the pyrfc package

# todo: remove after Python 2 support dropped
from __future__ import absolute_import

# Set DLL path, due to https://docs.python.org/3.8/whatsnew/3.8.html#bpo-36085-whatsnew
import os

Expand Down
2 changes: 1 addition & 1 deletion src/pyrfc/_pyrfc.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import locale
from decimal import Decimal
from csapnwrfc cimport *

from pyrfc._exception import *
from _exception import *

# inverts the enumeration of RFC_DIRECTION
_direction2rfc = {'RFC_IMPORT': RFC_IMPORT, 'RFC_EXPORT': RFC_EXPORT,
Expand Down

0 comments on commit cf866a0

Please sign in to comment.