我正在使用setuptools基于现有的开源项目构建一个新的PyPI package,并添加一些代码修改(它们不一样)。 示例:
opensource-custom=2.13.1
因为这个项目需要依赖项来寻找opensource
在构建控制盘文件时,我可以将哪些选项传递给我的setup.py
,以便在执行pip freeze
/pip list
时可以同时看到这两个选项?你知道吗
opensource-custom=2.13.1
opensource=2.13.0
这个场景的一个例子是intel-numpy
如果您对它执行pip install
,它将生成numpy
的副本。你知道吗
>pip install intel-numpy
>pip freeze
icc-rt==2019.0
intel-numpy==1.15.1
intel-openmp==2019.0
mkl==2019.0
mkl-fft==1.0.6
mkl-random==1.0.1.1
numpy==1.15.1
tbb==2019.0
tbb4py==2019.0
听起来像是要使
opensource
成为opensource-custom
的依赖项。为此,可以在setup.py
中指定install_requires
参数:见https://packaging.python.org/guides/distributing-packages-using-setuptools/#install-requires
相关问题 更多 >
编程相关推荐