Skip to content

Instantly share code, notes, and snippets.

@PaulleDemon
Last active January 19, 2024 16:52
Show Gist options
  • Save PaulleDemon/b1a8bac52e6161efc53195597e4835d7 to your computer and use it in GitHub Desktop.
Save PaulleDemon/b1a8bac52e6161efc53195597e4835d7 to your computer and use it in GitHub Desktop.
This is quick description to upload to PyPi
  • 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/*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment