mkdir mylibrary
cd mylibrary
python3 -m venv venv
venv\Scripts\activate
source venv/bin/activate
pip install setuptools wheel twine
python
from setuptools import setup
setup(
name='mylibrary',
version='1.0.0',
description='A Python library for...',
author='Your Name',
author_email='your@email.com',
url='https://github.com/yourusername/mylibrary',
packages=['mylibrary'],
install_requires=[
'requests',
],
)
python setup.py sdist bdist_wheel
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*