如何使入口点与经conda转换的软件包一起使用?

时间:2019-09-10 18:31:13

标签: python conda

我想在Windows机器上构建注定要在Mac上使用的python软件包。我的代码中有命令行入口点,当我conda将该程序包转换为osx-64时,它创建的入口点脚本既不可执行,又具有错误的shebang行。因此,我可以在python解释器中运行代码,但无法从终端访问它。

我没有选择在OSX上构建的选项,我也必须构建一个单独的Windows版本,因此我不能使用noarch。入口点在Windows上有效。

我的食谱的构建部分是:

build:
  number: {{ build_number }}
  script: python setup.py install --single-version-externally-managed --record=record.txt
  entry_points:
    - pkg_name = pkg_name.cli.main:pkg_name
  preserve_egg_dir: True

我正在运行conda convert --platform osx-64 -o ${BLD_PATH} -f ${WindowsPackage}

我希望我能够从命令行运行pkg_name,但是得到Permission denied

我还希望入口点脚本顶部的shebang行为#!path/to/python/on/installed/machines/conda/env,但改为#!path/to/python/on/build/machine

0 个答案:

没有答案