build conda package from local python package(从本地 python 包构建 conda 包)
问题描述
我找不到一个完整的示例,说明如何从我编写的 python 包创建 conda 包,以及如何使用 conda install 安装包,而它在我的计算机上而不是在 anaconda 云上.例如,我正在寻找不使用 pypi 的 conda 骨架,而是在我的 windows 机器上使用 python 包,源代码必须在我的 windows 机器上,而不是在 pypi 或其他云上.任何帮助都会很重要.非常感谢
I can't find a complete example of how to create a conda package from a python package that I wrote and also how to install the package using conda install, while it is on my computer and not on anaconda cloud. I'm looking for example that not using conda skeleton from pypi, but using a python package on my windows machine, the source code must be on my windows machine and not on pypi or other cloud. any help would be mostly appriciate. thanks very much
推荐答案
可以在元数据文件 meta.yaml 中指定一个本地源目录,方法是:
A local source directory can be specified in the metadata file meta.yaml by using:
source:
path: ../src
https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#source-from-a-local-path
此外,要打包您自己的程序,您必须定义构建和安装它所需的步骤(例如,为使用 setuptools 的 python 脚本运行 setup.py install:https://setuptools.readthedocs.io/en/latest/index.html) 文件 build.sh for linux 和用于 Windows 的 bld.bat.
Additionally, to package your own program you have to define the steps needed to build and install it (for instance, running setup.py install for a python script that uses setuptools: https://setuptools.readthedocs.io/en/latest/index.html) in the files build.sh for linux and bld.bat for windows.
这篇关于从本地 python 包构建 conda 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:从本地 python 包构建 conda 包


基础教程推荐
- Dask.array.套用_沿_轴:由于额外的元素([1]),使用dask.array的每一行作为另一个函数的输入失败 2022-01-01
- 如何让 python 脚本监听来自另一个脚本的输入 2022-01-01
- Python kivy 入口点 inflateRest2 无法定位 libpng16-16.dll 2022-01-01
- 何时使用 os.name、sys.platform 或 platform.system? 2022-01-01
- 线程时出现 msgbox 错误,GUI 块 2022-01-01
- 如何在海运重新绘制中自定义标题和y标签 2022-01-01
- 用于分类数据的跳跃记号标签 2022-01-01
- 筛选NumPy数组 2022-01-01
- 在 Python 中,如果我在一个“with"中返回.块,文件还会关闭吗? 2022-01-01
- 使用PyInstaller后在Windows中打开可执行文件时出错 2022-01-01