- create setup.py file
Eg:
from setuptools import setup
with open("Readme.md", 'r') as f:
long_description = f.read()
setup(
name='tkvideoplayer',
version='2.0.0',
description="This library helps you play videos in tkinter",
license="MIT",
long_description=long_description,
long_description_content_type="text/markdown",
author='Paul',
url="https://github.com/PaulleDemon/tkVideoPlayer",
classifiers=[
"License :: OSI Approved :: MIT License",
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10"
],
keywords=['tkinter', 'video', 'player', 'video player', 'tkvideoplayer', 'play video in tkinter'],
packages=["tkVideoPlayer"],
install_requires=["av", "pillow"],
include_package_data=True,
python_requires='>=3.6',
)
-
Now
pip install twine
-
To build the package
python setup.py sdist bdist_wheel
-
Check if all the distribution is fine using
twine check dist/*
-
Now that its built first try uploading it to test PyPi using command
twine upload -r testpypi dist/*
-
Now if statisfied upload to PyPI using
twine upload dist/*