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

Added support for OS X's slightly different xattr calls. #9

Merged
merged 1 commit into from May 1, 2016

Conversation

ahknight
Copy link
Contributor

@ahknight ahknight commented Apr 9, 2016

I added some minor indirection around the base (foo)xattr C calls so that I could create functions with the Linux signature that call the OS X versions.

Note this does't handle the half-dozen OS X special cases (com.apple.ResourceFork, com.apple.FinderInfo, compressed EAs, etc.) but the API is low-level enough that it shouldn't matter in most cases (and if it does matter to someone, that's what ctypes/cffi is for).

@iustin iustin merged commit fa48401 into iustin:master May 1, 2016
@iustin
Copy link
Owner

iustin commented May 1, 2016

Thanks for the patch. I have no way to test OSX, I'll see if I can configure travis-ci for it.

@iustin
Copy link
Owner

iustin commented May 1, 2016

OK, travis-ci can test this, and it was trivial to set it up. Thanks!

yan12125 pushed a commit to ytdl-org/youtube-dl that referenced this pull request Oct 1, 2016
Closes #9054

There are two xattr packages in Python, pyxattr [1] and xattr [2]. They
have different APIs.

In old days pyxattr supports Linux only and xattr supports Linux, Mac,
FreeBSD and Solaris, and pyxattr supports Linux only. Recently pyxattr
adds support for Mac OS X. [3]

An old version of [2] is shipped with Mac OS X. However, some Linux
distributions have pyxattr only, for example PLD-Linux [4] and old Arch
Linux. [5] As a result, supporting both is the way to go.

[1] https://github.com/iustin/pyxattr
[2] https://github.com/xattr/xattr
[3] iustin/pyxattr#9
[4] #5498
[5] https://git.archlinux.org/svntogit/community.git/commit/?id=427c4c76401e386d865ccddea4fbfdc74df80492
    https://git.archlinux.org/svntogit/community.git/commit/?id=59b40da7b69622a6761d364a8b07909e9cccaa56
    python-xattr is added on 2016/06/29 while pyxattr is there for more
    than 6 years
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

Successfully merging this pull request may close these issues.

None yet

2 participants