PyPI
Information
Python packages public repo.
Usage, tips and tricks
- Create account at PyPI
- Create API token
- Add token to $HOME/.pypirc
- pip install twine wheel
- python setup.py sdist bdist_wheel
- 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/