ARTIFACTORY: How to deploy a PyPI package to the Artifactory’s local repository?
This article describes the steps to configure your Python client to publish packages to the JFrog Artifactory's PyPI repository.
What's needed for a Python package to be published?
First, you need to add Artifactory as an index server for your user. This can be done through the $HOME/.pypirc file configured at the client-side.
To configure the .pypirc file with the Artifactory's repository information, please refer to the Set Me UP section available with the PyPI repositories you have created in Artifactory.
Upon clicking on the "Set Me Up" option, it will display the instructions to update the .pypirc file.
a setup.py file (which includes the package information), For more details on how to prepare a setup.py file, please refer to the article here.
Here’s a sample setup file for reference
description="Package for testing uploads [PyPI]",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
Once the setup.py and the $HOME/.pypirc files are ready, execute the following command to upload the package to the local repository.
$ python setup.py sdist upload -r local