Ensure that your setup.py
or pyproject.toml
file is properly configured to include the README.md
file.
For setup.py
:
from setuptools import setup, find_packages
setup(
name='mathlib',
version='0.1',
packages=find_packages(),
description='A simple math library with basic operations',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
author='Arun Kumar Pandey',
author_email='[email protected]',
url='https://github.com/arunp77/mathlib-package/',
license='MIT',
install_requires=[],
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
)
For pyproject.toml
with Poetry:
[tool.poetry]
name = "your-package-name"
version = "0.1.0"
description = "A brief description of your package"
readme = "README.md"
authors = ["Your Name <[email protected]>"]
license = "MIT"
[tool.poetry.dependencies]
# List your package dependencies here
Before uploading to PyPI, build your package (but first install the following package: pip install wheel twine
) and then go to:
python setup.py sdist bdist_wheel
Or if using Poetry:
poetry build
Upload your package to PyPI using Twine:
twine upload dist/*
After uploading, you can verify your package on PyPI by visiting the PyPI website and searching for your package name. Ensure that the README.md
content appears correctly.
My package is available at: https://pypi.org/project/arunp77-mathlib/.