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

Install failure with 1.8.1 on Centos 7 #283

Closed
caboteria opened this issue Apr 10, 2019 · 8 comments
Closed

Install failure with 1.8.1 on Centos 7 #283

caboteria opened this issue Apr 10, 2019 · 8 comments

Comments

@caboteria
Copy link
Contributor

caboteria commented Apr 10, 2019

smart_open 1.8.1 fails to install on Centos 7:

Collecting smart_open
  Downloading https://files.pythonhosted.org/packages/27/90/39f18b9258cd76e98df581213a2b7a393b426821e920f1e820e525f54ed4/smart_open-1.8.1.tar.gz (48kB)
    100% |████████████████████████████████| 51kB 7.4MB/s 
    Complete output from command python setup.py egg_info:
    error in smart_open setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers

It looks like the addition of 'backports.lzma;python_version<"3.3"' is the only substantive change to setup.py since 1.8.0. According to the setuptools docs, that feature was added in 20.5 but Centos 7 ships with 0.9.8.

Not sure what to do here but I guess that setup.py should have an install_requires on setuptools>=20.5 so at least it's clear what's going on. Might want to also bump the major version to indicate a back-compatibility change.

@piskvorky
Copy link
Owner

piskvorky commented Apr 10, 2019

Thanks for investigating @caboteria .

@vmarkovtsev @mpenkov do we have any other way to handle this, in setup.py?
I'm not happy about complicating our core dependencies, introducing backward compatibility issues (apparently), for the benefit of such arcane features as .xz format (I never even heard of it), from PR #262.

@piskvorky
Copy link
Owner

Ah I see you guys are already on it, on #282. Nice!

@vmarkovtsev
Copy link
Contributor

Not sure what is meant by "arcane", but xz-utls have been around in Linux since 2014, that is 5 years ago. XZ is the GNU equivalent of 7z. The main advantage is higher compression ratio than bz2 at roughly the same compression speed.

Reference: https://unix.stackexchange.com/questions/108100/why-are-tar-archive-formats-switching-to-xz-compression-to-replace-bzip2-and-wha

Debian, Ubuntu and Fedora use XZ to compress their binary packages.

@mpenkov
Copy link
Collaborator

mpenkov commented Apr 11, 2019

I think "uncommon" or "esoteric" is a better word than "arcane". Regardless of the precise meaning of the word, I think we agree in sentiment: we shouldn't handle .xz compression inside the smart_open library. Instead, we should offer support indirectly through the compressor registry.

https://stackoverflow.com/questions/6493270/why-is-tar-gz-still-much-more-common-than-tar-xz

@vmarkovtsev
Copy link
Contributor

Well, I don't, but nvm.

Regarding the uncommonness, the link from the above shows that it is common in Linux - and it is included into the standard Python3 distribution. What's truly uncommon for tar is snappy, brotly, zophly, lz4, and zstd - all of them used at Google and Facebook nevertheless.

For Windows - yes, I have not seen xz archives for sure.

@piskvorky
Copy link
Owner

piskvorky commented Apr 11, 2019

I'm not against adding more "fringe" features per se (.xz looks nice) – just not at the cost of compromising core dependencies.

The question is: is there something we can do to get rid of the setuptools >= 20.5 requirement?

Ideally without breaking builds on older systems that don't have new setuptools out of the box. Python 2.7 is still super popular, we're not dropping support for it any time soon. Smart_open is a production library.

@mpenkov
Copy link
Collaborator

mpenkov commented Apr 12, 2019

Fixed by #282

@mpenkov mpenkov closed this as completed Apr 12, 2019
@caboteria
Copy link
Contributor Author

Thanks everyone for jumping on this so quickly!

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

4 participants