tahoe-lafs / zfec

zfec -- an efficient, portable erasure coding tool
Other
374 stars 44 forks source link

Installation of zfec 1.5.3 fails due to non-ascii character #32

Closed igorauad closed 3 years ago

igorauad commented 3 years ago

Hello all,

I'm getting UnicodeDecodeError when installing zfec 1.5.3 via pip on Ubuntu Bionic. I see that this problem was fixed by https://github.com/tahoe-lafs/zfec/pull/16, but I suppose this fix is not included in 1.5.3, right? Is there a plan to push 1.5.4 to PyPI any time soon?

I got the error specifically by running on: Python 3.6.9 (default, Jul 17 2020, 12:50:27)

Steps to reproduce (on Docker):

docker run --rm -it ubuntu:bionic

Then, inside the container:

apt update -y && apt install -y make python3 python3-pip
pip3 install zfec

which leads to:

Collecting zfec
  Using cached https://files.pythonhosted.org/packages/8f/99/aba4602ff6ed25a5ff2a9e0f9a3762d84d7e1b941b75d620a53a0ccecd9f/zfec-1.5.3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-_zh7stnw/zfec/setup.py", line 60, in <module>
        long_description=open('README.rst', 'rU').read(),
      File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)

I'm specifically looking to require zfec from another project that has to work in multiple distributioins. I did get the 1.5.3 installation working on, e.g., Ubuntu focal (Python 3.8.5), Fedora 32 (Python 3.8.5), CentOS8 (Python 3.6.8). However, not on Ubuntu bionic, which is an important one.

igorauad commented 3 years ago

I've just opened PR https://github.com/tahoe-lafs/zfec/pull/33, which hopefully will facilitate shipping versions to PyPI in the future (like the missing 1.5.4).

This PR also helps with the distribution because it will upload the wheels. The current package on PyPI does not seem to include wheels, meaning that users will need to have gcc and python-devel available locally to build the source distribution.

sajith commented 3 years ago

Are you blocked by this? I can upload zfec 1.5.4 to PyPI. I did not do that earlier because I was going to be away for a bit.

igorauad commented 3 years ago

Yep, @sajith Could you do that? Could you upload 1.5.4 including the wheels (i.e., not just the sdist)?

sajith commented 3 years ago

Yes, I can do that. Although... how soon do you need it?

Since a Tahoe-LAFS release is also on the works at this time, I am worried about stepping on other people's toes right now. I will ask, and if there's no objection, I will upload both wheels and sdist. I am sorry that I was not clear about that.

igorauad commented 3 years ago

That's alright, @sajith . We are waiting on this before we release a new version of this package: https://pypi.org/project/blocksat-cli/. We will include zfec as a requirement. However, because this package is supposed to provide an easy-to-install CLI, the wheels are really important. Most users won't have gcc locally to build zfec during pip install.

sajith commented 3 years ago

I asked around and received no objection, so I went ahead and (manually) uploaded zfec 1.5.4 wheels + sdist to pypi. Pretty much nothing has changed from zfec 1.5.3, other than #16 and a bunch of CI changes, so nothing should be broken, hopefully.

Please let me know if this works for you!

igorauad commented 3 years ago

That's great, @sajith Thank you very much.

I can't try it right now, but I will try it tomorrow and I will let you know.

sajith commented 3 years ago

I'm afraid that Windows .whl packages are broken. (See tahoe-lafs/tahoe-lafs#862 for an example of how they are broken.)

I have filed #34.

igorauad commented 3 years ago

@sajith I can confirm that 1.5.4 is working pretty well. Also, it's not a problem for us that the Windows packages are broken. Our package does not support Windows anyway. So I'm satisfied with the solution.

Thanks very much for your help. I'm gonna close the issue if that's ok.