dynatrace-extensions / dt-extensions-python-sdk

Dynatrace Python Extensions SDK
https://dynatrace-extensions.github.io/dt-extensions-python-sdk/
MIT License
8 stars 1 forks source link

SDK packs platform specific wheel #32

Closed pitpalme closed 4 months ago

pitpalme commented 6 months ago

Describe the bug dt-sdk build packs platform specific wheel as dependency, which leads to deployment error.

Having, for example, requests as dependency in setup.py make dt-sdk build download and pack charset_normalizer-3.3.2-cp311-cp311-win_amd64.whl into extension\lib\.

When deployed this leads to deployment error, because runtime linux python 3.10 does not accept cp311 and win_amd64 as satisfying qualifiers and therefore cannot install dependency from "shipped with" wheel.

To Reproduce Steps to reproduce the behavior:

  1. Edit setup.py
  2. Add requests to install_requires list
  3. Run dt-sdk build
  4. Deploy extension
  5. See install / deployment logs for error

Expected behavior SDK packaging should not package platform specific wheels into extension archive, nor should wheels be accepted, that satisfy only one specific python version. If SDK requirement is ">= 3.10", it should be acceptable to use 3.11 or 3.12 to develop and package extension, producing an extension archive, that can be deployed to and run on >= 3.10 runtime (given, the python code is 3.10 compatible).

Desktop (please complete the following information):

dlopes7 commented 5 months ago

You will need to develop on python 3.10 anytime you are using dependencies that have native code.

We can't change this, but can improve documentation.

dlopes7 commented 4 months ago

We've added documentation around this topic: https://dynatrace-extensions.github.io/dt-extensions-python-sdk/guides/building.html