Hello,
>-export PYBUILD_AFTER_BUILD_python3=2to3 -n -w {build_dir}/pynzb/; sed -i -e >'s/StringIO/BytesIO/g' -e 's/BytesIO(xml)/BytesIO(bytes(xml,"utf-8"))/' >{build_dir}/pynzb/lxml_nzb.py >+export PYBUILD_AFTER_BUILD_python3=2to3-{version} -n -w {build_dir}/pynzb/; >sed >-i -e 's/StringIO/BytesIO/g' -e 's/BytesIO(xml)/BytesIO(bytes(xml,"utf-8"))/' >{build_dir}/pynzb/lxml_nzb.py this seems hacky and unmaintainable, what about calling 2to3 in setup.py? and you can patch the code with a retro-compatible code if you can't find a way that works with both python2 and 3, there is the version_info variable that can help you in understanding what is the current interpreter https://docs.python.org/3/howto/pyporting.html. I'm mostly sure upstream would appreciate a porting/retrocompatible patch :) G.