2011-06-23 9 views
0

SFTPとwebdav経由のファイル転送にrsyncを使用しているPythonモジュールを使って開発したいと思います。 私はpysyncという名前のlibを見つけました。しかし、私はWindows 7です。私はVisualStudio 2010を使用しますが、 "問題"のためにビルドに失敗します。Windows 7とrsyncを使用したPython

私はこのクロスプラットフォーム要件があるので、誰かがWindows、MacOS、Linuxで動作しているlibrsyncや何かを知っているのだろうかと思います。

C:\Python27\Scripts>pip.exe install pysync 
    Downloading/unpacking pysync 
     Downloading pysync-2.24.tar.bz2 
     Running setup.py egg_info for package pysync 

     file librsync.py (for module librsync) not found 
     warning: no files found matching 'librsync_wrap.*' 
     warning: no files found matching 'librsync\COPYING' 
     warning: no files found matching 'librsync\*.h' 
     warning: no files found matching 'librsync\configure' 
     warning: no files found matching 'librsync\Makefile.in' 
     warning: no files found matching 'librsync\config.h.in' 
     warning: no files found matching 'librsync\config.guess' 
     warning: no files found matching 'librsync\config.sub' 
     warning: no files found matching 'librsync\install-sh' 
     warning: no files found matching 'librsync\popt\Makefile.in' 
    Installing collected packages: pysync 
     Running setup.py install for pysync 
     file librsync.py (for module librsync) not found 
     file librsync.py (for module librsync) not found 
     building 'md4' extension 
     C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\includ 
    e -IC:\Python27\PC /Tcmd4sum/md4module.c /Fobuild\temp.win32-2.7\Release\md4sum/md4module.obj 
     md4module.c 
     c:\python27\include\pyconfig.h(227) : fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory 
[...] 

    ---------------------------------------- 
    Command C:\Python27\python.exe -c "import setuptools;__file__='C:\\Python27\\Scripts\\build\\pysync\\setup.py';exec(compile(op 
    en(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record c:\users\w 
    ishi\appdata\local\temp\pip-kvzhhk-record\install-record.txt failed with error code 1 
    Storing complete log in C:\Users\wishi\AppData\Roaming\pip\pip.log 

    C:\Python27\Scripts> 

答えて

1

本当にrsyncに縛られていますか? SFTPを使用してファイルを転送しているので、paramikoが役立つかもしれません。実際に動作するlibrsyncが必要な場合は、いくつかのオプションがあります。

  1. 事前コンパイルされたバージョンを検索してインストールします(...はGoogleのfuが強いことを願う)
  2. は、cygwinのインストールソースをダウンロードし、Windows用のビルドのオプションを変更した後、make installを実行します。
  3. ソースをLinuxボックスにダウンロードしてクロスコンパイルするように設定する
  4. getGnuWin32を使用して、ライブラリを構築し、パスに入れてpipを再実行するために必要なすべてのツールを入手します。今回はmakeコマンドを実行して、ライブラリをビルドする必要があります。もしソースコードを見つけることができたら、それを実行してください。

これらすべてのもの(1を除く)は、このライブラリのソースを必要とします。これは、クロスプラットフォームビジネスを行う単なるコストです。既に利用可能なWindowsのバージョンがないことが気に入らなければ、rsyncはあなたのためのツールではないかもしれません。

最後に、アップデートhereによれば、誰かがWindowsのバイナリを望むならば、開発者に連絡してビルドするでしょう。

関連する問題