iustin / pyxattr

A python module for accessing filesystem Extended Attributes
https://pyxattr.k1024.org/
GNU Lesser General Public License v2.1
31 stars 14 forks source link

pyxattr fails to install on Windows 10 with cl : Command line error D8021 : invalid numeric argument '/Werror' #22

Closed ericzolf closed 5 years ago

ericzolf commented 5 years ago

As the subject says, all the relevant versions are in the following output:

Collecting pyxattr
  Using cached https://files.pythonhosted.org/packages/36/1d/1a5f3165f330e1a0427636f2bd995dbcc02d0f7660e89458d64806a2ed1e/pyxattr-0.6.1.tar.gz
Installing collected packages: pyxattr
  Running setup.py install for pyxattr: started
    Running setup.py install for pyxattr: finished with status 'error'
    Complete output from command c:\python37\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\IEUser\\AppData\\Local\\Temp\\pip-install-916xhtx4\\pyxattr\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\IEUser\AppData\Local\Temp\pip-record-g0n0thl0\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    building 'xattr' extension
    creating build
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -D_XATTR_VERSION="0.6.1" "-D_XATTR_AUTHOR="Iustin Pop"" -D_XATTR_EMAIL="iustin@k1024.org" -Ic:\python37\include -Ic:\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcxattr.c /Fobuild\temp.win-amd64-3.7\Release\xattr.obj -Wall -Werror -Wsign-compare
    cl : Command line error D8021 : invalid numeric argument '/Werror'
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "c:\python37\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\IEUser\\AppData\\Local\\Temp\\pip-install-916xhtx4\\pyxattr\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\IEUser\AppData\Local\Temp\pip-record-g0n0thl0\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\IEUser\AppData\Local\Temp\pip-install-916xhtx4\pyxattr\
You are using pip version 19.0.3, however version 19.2.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
non-zero return code
iustin commented 5 years ago

Hello,

I have no idea how this works on Windows. Note that this library only supports Unix-style extended attributes, so even if the install problem is sorted, I'm not sure if would do anything useful.

Just curious, why do you want to install it?

ericzolf commented 5 years ago

I'm one of the (new) developers of rdiff-backup, trying to get a working Windows/Python development environment running (as a Linux guy sigh). I was under the, now obviously erroneous, impression that extended attributes are also something concerning Windows, and hence trying to get it installed.

Ah well, sorry for the noise,

iustin commented 5 years ago

Well, there might be some similar things for Windows, but I'm not familiar with it, so this specific library doesn't support it. I wouldn't mind adding support if it makes sense.

mhx commented 6 months ago

Sorry for bumping an old issue, but I came across this one while searching for a Python module that would support "*xattr" on Windows.

Windows actually supports "extended attributes", though much less prominently than *nix/macOS. The functions to access "EA"s, as Windows calls them, are not even part of the public API, but they're documented here. If pyxattr could support Windows, that would be fantastic.

FWIW, searching further, I came across this project, which actually implements reading/writing of EAs from Python; maybe this can be integrated into pyxattr?