Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package and distribute pre-built linux wheel #194

Closed
hansingt opened this issue Sep 11, 2020 · 8 comments
Closed

Package and distribute pre-built linux wheel #194

hansingt opened this issue Sep 11, 2020 · 8 comments

Comments

@hansingt
Copy link

Hello,

I'm not sure whether I understand the readme correct or not. It states:

pre-built portable Linux wheels

  • are not supported, neither issues related to portable Linux wheels
  • ❗ must not be distributed with embedded SAP NWRFC SDK binaries, only private use permitted

Does this mean, that we can't pre-built the pynwrfc package ourselfs and distribute it to our customers?
This would be a real shame as it would force us to maintain our own python wrapper for the SAP NWRFC libraries.

We are an SAP Partner and would like to create an integration with this library. But our customers use Linux systems as well.

@jfilak
Copy link

jfilak commented Sep 11, 2020

The thing is that if you build pynwrfc on the same distribution as your customer's distribution, then you can safely ship them the pre-built version.

The safest option is to ship docker image to your customers, thought.

@bsrdjan
Copy link
Member

bsrdjan commented Sep 11, 2020

The README section is about portable Linux wheels, with all dependencies included, thus also SAP NWRFC SDK.

The only distribution channel for SAP NWRFC SDK is SAP Service Portal and the SDK must not be public distributed inside portable wheels (PyPI), docker containers or similar packages. That is why the README "clause" was added.

Your business case makes sense to me and I will ask the SDK team to have a look into this.

Do you have some specific Linux distros in mind and how would you distribute (PyPI, docker, build from source...)?

I am on vacation until the end of this month and may not be able to respond promptly.

@bsrdjan
Copy link
Member

bsrdjan commented Sep 11, 2020

If you don't need to ship the SDK, you can build & distribute whatever you like.

@hansingt
Copy link
Author

Thanks for the quick reply! This makes things much more clear to me now.

Do you have some specific Linux distros in mind and how would you distribute (PyPI, docker, build from source...)?

We will most likely be supporting latest Ubuntu LTS, but that's not yet fixed.

If you don't need to ship the SDK, you can build & distribute whatever you like.

We will be shipping a complete sofware stack (including a python 3.8) as an installer for windows and linux, but of course not including the SAP NWRFC libs. These have to be supplied by our customers themselfs. Thus, there should be no problem then.

But then, another question comes to my mind:
If the clause is about "portable" wheels only, then why not provide pre-built wheels for linux as well, like for Windows and MacOS?
As the SAP NWRFC Libs only depend on glibc and libuuid, the only thing to really consider is the glibc version. Luckly, the API is versioned an older APIs are included in newer glibc versions. Thus, all you'd have to do is build the wrapper on the lowest glibc version supported by SAP NWRFC and you could then use it on every platform with a newer glibc version as well. That's how we're doing it for another C/C++ based integration. This would make the installation on linux much easier and we don't have to pre-build the wheel ourselfs.

@jfilak
Copy link

jfilak commented Sep 14, 2020

PyRFC is compiled from C++ sources and depends on Python ABI too. For example Fedora's Python has a slightly different Python ABI then Ubunt's one and this caused me troubles in the past.

@hansingt
Copy link
Author

PyRFC is compiled from C++ sources and depends on Python ABI too. For example Fedora's Python has a slightly different Python ABI then Ubunt's one and this caused me troubles in the past.

Yes, thats most likely the USC-2 vs. UCS-4 problem. This ist only relevant for Python versions below 3.3 which aren't maintained anymore (See also https://www.python.org/dev/peps/pep-0513/#ucs-2-vs-ucs-4-builds). Thus, nowadays, this should bei no issue anymore.

In fact, what I'm suggesting is building a portable wheel but without including the SAP NWRFC libs in the wheel. IMHO this should be possible and should allow to make the installation consistent over all supported platforms.

@jfilak
Copy link

jfilak commented Sep 14, 2020

All relevant distros have their their docker image in Docker Hub, so it should be possible to build the portable wheel and run tests against all the major distros without too much effort.

@hansingt
Copy link
Author

hansingt commented Sep 15, 2020

Forget everything I've said. Building a portable python wheel requires including the shared libraries by definition.

Thus, it is not possible to build a portable wheel WITHOUT the SAP NWRFC libs. As this is, per definition, not portable anymore. Uploading anything else than portable manylinux wheels to PyPi is not allowed.

Thus, I will close the issue here, as my original question is answered: I'm allowed to build and distribute platform specific wheels myself as long as I don't include the SAP NWRFC libs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants