If one tries to run Swift tests with "PYTHONPATH=$(pwd) ./.unittests" on a stock Fedora, a bunch of them fail with "DistributionNotFound: xattr>=0.4". This is fixed easily with the following patch:
diff -urp pyxattr-0.5.1-p3/setup.py pyxattr-0.5.1/setup.py --- pyxattr-0.5.1-p3/setup.py 2012-05-15 16:58:20.000000000 -0600 +++ pyxattr-0.5.1/setup.py 2014-05-29 14:21:54.223317477 -0600 @@ -29,3 +29,11 @@ setup(name = "pyxattr", test_suite = "test", platforms = ["Linux"], ) +# Add a dummy egg so "xattr>=0.4" works in requirements.txt for paste-deploy. +# This primarily helps with running unit tests of Swift et.al., because for +# packaging we already disable all this. +setup(name="xattr", + version = version, + description = "Alias to pyxattr", + ext_modules = [Extension("xattr", )] + )
This was going on for 3 years or more. Rebuilding the patched pyxattr again for Fedora 24, I started wondering idly, why is it that nobody else ran into this problem? I suspect the answer is that I am the only human in the world who tests OpenStack Swift on Fedora. Everyone else uses Ubuntu (or pip).