使用 conda 和 python3k 构建包
Building packages with conda and python3k
所以我在 Win7 上用 conda 构建一个包:
conda skeleton pypi $pkgname
conda build $pkgname
binstar upload ./conda-bld/win-64/$pkgname-py27_0.tar.bz2
conda install -c https://conda.binstar.org/myname $pkgname
对于 python2k,这很有魅力。但是,使用 python3k 失败,因为 patch
包不适用于 python3k。错误(docopt
的示例):
$ conda skeleton pypi docopt
Using url https://pypi.python.org/packages/source/d/docopt/docopt-0.6.2.tar.gz (25 KB) for docopt.
Downloading docopt (use --no-download to skip this step)
Using cached download
Unpacking docopt...
done
working in C:\cygwin64\tmp\tmpy7erx8vyconda_skeleton_docopt-0.6.2.tar.gz
Fetching package metadata: ......
Solving package specifications: .
Applying patch: 'C:\cygwin64\tmp\tmpy7erx8vyconda_skeleton_docopt-0.6.2.tar.gz\pypi-distutils.patch'
Error:
Did not find 'patch' in: C:\Python\Anaconda3\envs\_build\Scripts;C:\Python\Anaconda3\Scripts;C:\cygwin\bin;C:\cygwin64\usr\local\bin;C:\cygwin64\bin;C:\Python\Python3\Lib\site-packages\PyQt4;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\MiKTeX 2.9\miktex\bin\x64;C:\cygwin64\bin;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Python\Anaconda3;C:\Python\Anaconda3\Scripts;C:\cygwin64\lib\lapack
You can install 'patch' using apt-get, yum (Linux), Xcode (MacOSX), or conda, cygwin (Windows)
尝试安装时 patch
:
$conda search ^patch$
Fetching package metadata: ....
patch 1.12.11 py27_0 defaults
没有 patch
python3k 包 - 这是否意味着我没有包构建?
您可以重复使用您使用 Python 2 构建的相同配方。或者您可以使用 patch
(conda create -n patch patch
) 创建一个环境并将其放在您的 PATH
.或者您可以从 http://gnuwin32.sourceforge.net/packages/patch.htm.
安装补丁
所以我在 Win7 上用 conda 构建一个包:
conda skeleton pypi $pkgname
conda build $pkgname
binstar upload ./conda-bld/win-64/$pkgname-py27_0.tar.bz2
conda install -c https://conda.binstar.org/myname $pkgname
对于 python2k,这很有魅力。但是,使用 python3k 失败,因为 patch
包不适用于 python3k。错误(docopt
的示例):
$ conda skeleton pypi docopt
Using url https://pypi.python.org/packages/source/d/docopt/docopt-0.6.2.tar.gz (25 KB) for docopt.
Downloading docopt (use --no-download to skip this step)
Using cached download
Unpacking docopt...
done
working in C:\cygwin64\tmp\tmpy7erx8vyconda_skeleton_docopt-0.6.2.tar.gz
Fetching package metadata: ......
Solving package specifications: .
Applying patch: 'C:\cygwin64\tmp\tmpy7erx8vyconda_skeleton_docopt-0.6.2.tar.gz\pypi-distutils.patch'
Error:
Did not find 'patch' in: C:\Python\Anaconda3\envs\_build\Scripts;C:\Python\Anaconda3\Scripts;C:\cygwin\bin;C:\cygwin64\usr\local\bin;C:\cygwin64\bin;C:\Python\Python3\Lib\site-packages\PyQt4;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\MiKTeX 2.9\miktex\bin\x64;C:\cygwin64\bin;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Python\Anaconda3;C:\Python\Anaconda3\Scripts;C:\cygwin64\lib\lapack
You can install 'patch' using apt-get, yum (Linux), Xcode (MacOSX), or conda, cygwin (Windows)
尝试安装时 patch
:
$conda search ^patch$
Fetching package metadata: ....
patch 1.12.11 py27_0 defaults
没有 patch
python3k 包 - 这是否意味着我没有包构建?
您可以重复使用您使用 Python 2 构建的相同配方。或者您可以使用 patch
(conda create -n patch patch
) 创建一个环境并将其放在您的 PATH
.或者您可以从 http://gnuwin32.sourceforge.net/packages/patch.htm.