Nexus PyPI源配置 MacOS

1、下载配置

在用户根目录下添加.pip文件夹,创建pip.conf文件,添加如下配置:

[global]
index-url = http://username:password@localhost:8081/repository/jiayundata/simple
[install]
trusted-host = localhost

2、上传配置

在用户根目录下添加.pypirc文件,添加如下配置:

[distutils]
index-servers =
    pypi
    pypitest
    nexus
    nexustest

[pypi]
repository:https://pypi.python.org/pypi
username:your_username
password:your_password

[pypitest]
repository:https://testpypi.python.org/pypi
username:your_username
password:your_password

[nexus]
repository:http://ip:port/repository/jiayun_host/
username:your_username
password:your_password

[nexustest]
repository:http://ip:port/repository/jiayun_host/
username:your_username
password:your_password

安装python的twine包

pip install twine

python打包安装包教程

https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject

安装完成之后,在python包目录下执行以下命令即可

twine upload -r nexus package_name.whl       # 正式环境
twine upload -r nexustest package_name.whl   # 测试环境
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容