Git Product home page Git Product logo

Comments (13)

annatisch avatar annatisch commented on June 12, 2024 1

Phew - finally got windows builds working (FWIW - the only way I was able to get this running was to install an old Professional verison of Visual Studio 2008).

Test builds attached.
uamqp-1.1.0a1-cp27-cp27m-win.zip

FYI @digimaun

from azure-uamqp-python.

gdooper avatar gdooper commented on June 12, 2024 1

I have some interest in having this library (and azure-eventhub) python 2.7 compatible. So I decided to test these initial builds.

I haven't gone too deep yet, but 32bit windows build installed, and I could import uamqp in the python interpreter. The 64bit linux build installed fine too, but if I try to import uamqp in the 64bit linux interpreter, I get the following error message:

$ python -c 'import uamqp'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/greg/venv27/local/lib/python2.7/site-packages/uamqp/__init__.py", line 10, in <module>
    from uamqp import c_uamqp  # pylint: disable=import-self
ImportError: /home/greg/venv27/local/lib/python2.7/site-packages/uamqp/c_uamqp.so: undefined symbol: PyUnicodeUCS2_DecodeUTF8

I've been able to reproduce this on both Ubuntu 18.04 and WSL (upgraded to 16.04). Both are 64bit environments. I haven't gone so far as to test 64bit python on Windows or 32bit python on linux.

Steps to reproduce:

  1. Create virtualenv
$ virtualenv venv27 --python /usr/bin/python2.7
  1. Install uamqp from wheel
$ ./venv27/bin/python -m pip install wheels/uamqp-1.1.0a1-cp27-cp27mu-manylinux1_x86_64.whl
  1. Import uamqp in python interpreter
$ ./venv27/bin/python -c 'import uamqp'

from azure-uamqp-python.

annatisch avatar annatisch commented on June 12, 2024

Made some good progress here.
Here are some test builds for anyone wish to give it a try - I would appreciate any feedback and bug reports.

Haven't managed to get a Windows build running yet, but if anyone is keen to try the code is here:
https://github.com/annatisch/azure-uamqp-python/tree/py27

uamqp-1.1.0a1-cp27-cp27.zip

from azure-uamqp-python.

annatisch avatar annatisch commented on June 12, 2024

Thank you @gdooper for testing out these builds! :)
I will try to repro today

from azure-uamqp-python.

annatisch avatar annatisch commented on June 12, 2024

Hi @gdooper - I was able to repro this on the build I attached above.
However went I built a fresh wheel from my latest code it seems to work.

I intend to publish a release candidate tomorrow

from azure-uamqp-python.

gdooper avatar gdooper commented on June 12, 2024

It seems like the issue was that the cp27-cp27mu wheel was built with leftover intermediate 'build' files from the cp27-cp27m build. Deleting the 'build' folder between builds seems to resolve this issue.

annatisch#2 should help.

from azure-uamqp-python.

annatisch avatar annatisch commented on June 12, 2024

oooooo! This is a great observation - thank you @gdooper! :)
I will amend my build script.

Edit: I actually clicked the link and saw your PR - thank you so much for your contribution!! :)

from azure-uamqp-python.

gdooper avatar gdooper commented on June 12, 2024

Your welcome!

I think there are some manylinux wheels that aren't usable still. It seems like all of the 32bit wheels fail when you try to import uamqp after installing the wheel. Also the 64bit py34 manylinux wheel also fails when you try to import uamqp.

How am I testing?

  1. Generate the docker images
docker build -t local/manylinux_crypto32 utils/ManyLinux_32bit/.
docker build -t local/manylinux_crypto64 utils/ManyLinux_64bit/.
  1. Build the wheels
docker run --rm -v $PWD:/data local/manylinux_crypto32 /data/build_many_linux.sh
docker run --rm -v $PWD:/data local/manylinux_crypto64 /data/build_many_linux.sh
  1. Save this script somewhere (e.g. test_many_linux.sh):
#!/bin/bash

# Test the wheels
for PYBIN in /opt/python/*/bin; do
        $PYBIN/pip install "certifi>=2017.4.17" "six~=1.0" "enum34>=1.0.4";
        $PYBIN/pip install uamqp --no-index -f /data/wheelhouse;
        $PYBIN/python -c 'import uamqp;print("*****Importing uamqp from wheel successful*****")';
done
  1. Run this script against the local/manylinux_crypto32 and local/manylinux_crypto64 docker images:
docker run --rm -v $PWD:/data local/manylinux_crypto32 /data/test_many_linux.sh
docker run --rm -v $PWD:/data local/manylinux_crypto64 /data/test_many_linux.sh

This isn't the best test plan, but it shows that some of the wheels are failing. You could probably integrate the above script into the build_many_linux.sh if you wanted to.

I've also tested some of the 32bit wheels against various versions of python on a 32bit Ubuntu 16.04 vagrant VM, and can confirm I get the same problem in that environment.

from azure-uamqp-python.

gdooper avatar gdooper commented on June 12, 2024

It's probably also worth testing the wheels on other platforms as well (eg. arm and osx)

from azure-uamqp-python.

annatisch avatar annatisch commented on June 12, 2024

Thanks @gdooper!
I'm running your test script now.

I already have a test VM I use to run on the OSX wheels - so will give that go too.
Unfortunately I haven't been able to properly support wheels for ARM yet.... can't quite get the build working end-to-end....

from azure-uamqp-python.

annatisch avatar annatisch commented on June 12, 2024

Hi @gdooper - I just did some tests and it seems to be related to Cython.

I updated the Cython build version 0.28.5, and I added the test script into the build_many_linux.sh script and now it all seems to be running cleanly for both 64 and 32bit Linux :)

from azure-uamqp-python.

annatisch avatar annatisch commented on June 12, 2024

The first Python 2.7 pre-release is now published!
You can install with:

pip install uamqp --pre

All feedback welcome!! :)

from azure-uamqp-python.

annatisch avatar annatisch commented on June 12, 2024

Python 2.7 support released in 1.1.0 :)

from azure-uamqp-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.