【发布时间】:2021-07-14 20:53:24
【问题描述】:
我已使用this tutorial 将我的包裹上传到https://test.pypi.org/。但是,最后,安装使用pip install -i https://test.pypi.org/simple/ PACKAGE-NAME。但是,我的目标是使用 pip install PACKAGE-NAME 安装软件包。
任何人都知道如何更改它以使用pip install PACKAGE-NAME?
如需更多信息,我有一个setup.py 文件,如下所示:
from setuptools import setup
from os import path
current_dir = path.abspath(path.dirname(__file__))
with open("README.md", "r") as fh:
long_description = fh.read()
with open(path.join(current_dir, 'requirements.txt'), 'r') as f:
install_requires = f.read().split('\n')
setup(
name='package name',
version='0.0.1',
author='author name',
author_email='author's email',
description='description',
long_description=long_description,
long_description_content_type="text/markdown",
license='License',
packages=['package name'],
keywords='keywords',
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent"
],
python_requires='>=3.6'
)
我还有一个setup.cfg 文件,即:
[build_sphinx]
source-dir = docs
build-dir = docs/_build
all_files = 1
[upload_sphinx]
upload-dir = docs/_build/html
[easy_install]
【问题讨论】:
标签: python windows pip pypi python-packaging