I have uploaded my package to the https://test.pypi.org/ using this tutorial. But, at the end, the installation works with pip install -i https://test.pypi.org/simple/ PACKAGE-NAME
. However, I aimed at installing the package using pip install PACKAGE-NAME
.
Anybody knows how can I change it to work with pip install PACKAGE-NAME
?
For more information, I have a setup.py
file, which looks like this:
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'
)
and I have also a setup.cfg
file, which is:
[build_sphinx]
source-dir = docs
build-dir = docs/_build
all_files = 1
[upload_sphinx]
upload-dir = docs/_build/html
[easy_install]
I found the issue with my problem today. When you upload your package on https://test.pypi.org/, the installation using pip
works with:
pip install -i https://test.pypi.org/simple/ PACKAGE-NAME
to be able to install the package with pip install PACKAGE-NAME
, you should upload it on https://pypi.org/.
Therefore, I needed to walk through the steps in the tutorial for pypi
, not for test.pypi
.