citadel.nodes.pypirc module

class citadel.nodes.pypirc.Pypirc(yml, path)[source]
Synopsis:Sets up a .pypirc configuration in the current dir.
Requirements:None
Platform:Any

Usage

1
2
3
4
5
6
7
8
9
pypirc:
  pypi:
    repository: https://example.com/pypi
    username: <username>
    password: <password>
  other:
    repository: https://example.com/other
    username: <username>
    password: <password>

Warning

Avoid authentication tokens in plain text. CITADel does a best effort to remove them from the logs (anything containing the password string), but it’s a very imperfect method.

Generates a .pypirc in the current directory to allow custom package installation without super user privileges.

The file is generating using the same format as describe in the package index section of the official distutils documentation. In addition to generating the .pypirc file itself it also re-sets the $HOME variable to the current directory to ensure all packages are installed in the local directory. Finally, adds the $HOME/.local/bin to $PATH so that any installed packages can be used as if they were globally installed.

This directive depends on a working internet connection. If any proxy is required, remember to specific it either in the environment directive or directly passing the http proxy’s options using the -e "http_proxy=value" options through citadel-generate.

generate_pypirc(pypirc)[source]

Generate a .pypirc file.