Skip to content

PyPi

This repository is used for storing python packages. The process of working with one of the twine package publishing tools is described below. To work with other tools, use their official documentation.

Depending on the working environment used, the commands may differ (python/python3, pip/pip3, etc.).

Setup package info (in setup.py)

To publish a package in your namespace, add UID at the beginning of the package name:

...
setuptools.setup(
name="UID-example-pkg-name",
...

Packaging

Before publishing the package, you must package it (make sure that you have the latest versions of setuptools and wheel installed):

$ pip install --user --upgrade setuptools wheel
$ python3 setup.py sdist bdist_wheel

After completion, two files must be generated in the dist directory:

dist/
    UID-example-pkg-name-<version>-py3-none-any.whl
    UID-example-pkg-name-<version>.tar.gz

Uploading

To publish the package to the repository, run (make sure that you have the twine module installed):

$ pip install --user --upgrade twine
$ twine upload -u mail -p password --repository-url https://artifactory.$LOC.icdc.io/repository/pypi-hosted/ ./dist/*

Installing

To install a previously uploaded package from the repository run:

$ pip install --index-url https://artifactory.$LOC.icdc.io/repository/pypi-hosted/simple UID-example-pkg-name

Info

Currently, the development of the pypi repository format is not officially completed. Therefore, any user can upload any package to the repository, but only packages that start with their UID or TEAM_NAME will be available to users for use and management.

Due to modified functionality in the area of access control the CLI tools search function is not available, but the browse and search can still be performed via the Web interface.