Skip to the content.

PyPI

Information

Python packages public repo.

Usage, tips and tricks

  1. Create account at PyPI
  2. Create API token
  3. Add token to $HOME/.pypirc
  4. pip install twine wheel
  5. python setup.py sdist bdist_wheel
  6. twine upload dist/*

$HOME/.pypirc

[pypi]
  username = __token__
  password = pypi-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx....xxxxxx

setup.py

from setuptools import setup, find_packages

setup(
    name='foo_bar_lib_probe',
    version='0.3.0',
    description='A simple Python library for greetings.',
    long_description='A longer description of A simple Python library for greetings.',
    author='Imre Tabur',
    author_email='info@setmy.info',
    license='MIT',
    url='https://github.com/setmy-info/setmy.info/tree/develop/incubation/foo_bar_lib_probe',
    packages=find_packages(),
    install_requires=[
        # List requirements here
    ],
)

Additional pip repository registration

cp -r dist/* /some/nfs/share/with/www/pypi

File: ~/.config/pip/pip.conf

[global]
index-url = http(s)://pip.gintra/pypi/

See also

Web Page