如何在构建conda包时解决Pypi依赖关系

时间:2017-06-27 15:34:06

标签: python build conda

我正在尝试从我的项目中创建一个conda包。但在构建conda包时,我无法了解如何满足pypi要求。

meta.yaml:

package:
  name: speedstrom
  version: "0.0.1"

source:
    path: .

requirements:
  build:
    - python
    - setuptools
    - cycler
    - llvmlite
    - matplotlib
    - numba
    - numpy
    - pandas
    - pyparsing
    - python-dateutil
    - pytz
    - scikit-learn
    - scipy
    - simplejson
    - six
  run:
    - python
    - cycler
    - llvmlite
    - matplotlib
    - numba
    - numpy
    - pandas
    - pyparsing
    - python-dateutil
    - pytz
    - scikit-learn
    - scipy
    - simplejson
    - six

test:
  imports:
    - speedstrom

about:
  license: WTFPL

setup.py:

from setuptools import setup, find_packages

import speedstrom

setup(
    name='speedstrom',
    version=speedstrom.__version__,
    packages=find_packages(),
    author="Luc",
    description="Nyström On-Line implementation",
    long_description=open('README.rst').read(),
    install_requires=[
        "cycler==0.10.0",
        "llvmlite==0.18.0",
        "matplotlib==2.0.2",
        "nab==1.0",
        "numba==0.33.0",
        "numpy==1.12.1",
        "pandas==0.20.2",
        "pyparsing==2.1.4",
        "python-dateutil==2.6.0",
        "pytz==2017.2",
        "scikit-learn==0.18.1",
        "scipy==0.19.0",
        "simplejson==3.11.1",
        "six==1.10.0"],
    include_package_data=True,
    license="WTFPL",
)

simplejson仅在Pypi中可用,而不在conda索引中。当我运行conda build时,我收到以下错误:

RuntimeError: Setuptools downloading is disabled in conda build. Be sure to add all dependencies in the meta.yaml  url=https://pypi.python.org/simple/simplejson/r

与这种pypi依赖性有关。

然后我尝试将包simplejson上传到conda索引但是我失败了,我想知道是否有办法使用conda启用setuptools下载?

0 个答案:

没有答案