Previously Presented

Rolling with Python: A Deep Dive into Python Wheels

An in-depth exploration of Python wheels, their importance in package distribution, and how they integrate C/C++ extensions.

45 minutes
Bangalore
Intermediate
Previously presentedThis talk has been well-received at previous events

Want to book this talk?

Rolling with Python: A Deep Dive into Python Wheels

Overview

Python wheels have revolutionized the way Python packages are distributed and installed. This talk provides a comprehensive overview of Python wheels, their internals, and how they solve the "dependency hell" problem that plagued Python packaging for years. We'll explore the technical aspects of building wheels, especially for packages with C/C++ extensions, and demonstrate best practices for creating efficient, cross-platform wheels.

Talk Details

  • Duration: 45 minutes (including Q&A)
  • Expertise Level: Intermediate
  • Ideal For: Python Conferences, Developer Meetups, Tech Workshops
  • Audience Size: Any
  • Previously Presented: BangPypers Meetup 2024 (January 2024)

Talk Content

1. Introduction to Python Packaging (5 minutes)

  • Brief history of Python packaging
  • The problems with pre-wheel distribution methods
  • Introduction to the wheel format

2. Wheel Format Internals (10 minutes)

  • Anatomy of a wheel file
  • Metadata and directory structure
  • PEP 427 and wheel specifications
  • Comparison with other package formats

3. Building Wheels with C/C++ Extensions (15 minutes)

  • Challenges in distributing compiled extensions
  • Using setuptools and wheel to build extensions
  • Cross-platform considerations
  • Demo: Building a wheel with a C extension

4. Advanced Wheel Topics (10 minutes)

  • Manylinux specification for Linux wheels
  • Platform tags and compatibility
  • Auditwheel and delocate tools
  • Using CI/CD for wheel building

5. Best Practices and Future of Wheels (5 minutes)

  • Recommended tooling (poetry, flit, hatch)
  • Common pitfalls and how to avoid them
  • The future of Python packaging

6. Q&A (5 minutes)

Target Audience

This talk is aimed at intermediate Python developers who want to understand the packaging ecosystem better, library maintainers who distribute Python packages, and developers working with C/C++ extensions in Python.

Prerequisites

  • Basic familiarity with Python
  • Experience using pip to install packages
  • Understanding of Python modules and packages
  • Experience with distributing Python packages is helpful but not required

Key Takeaways

Attendees will learn:

  • The fundamentals of Python packaging and the wheel format
  • How to build and distribute packages with C/C++ extensions
  • Best practices for cross-platform compatibility
  • Strategies for automating package builds with CI/CD
  • Advanced packaging techniques for complex libraries

Customization Options

This talk can be tailored for different audiences and time constraints:

  • More hands-on workshop format for smaller groups
  • Focus on specific platforms (Windows, macOS, Linux)
  • Emphasis on scientific/data science packages with complex dependencies
  • Integration with containerization for deployment

Technical Requirements

  • Projector with HDMI connection
  • Microphone for audience questions
  • Internet connection for live demos (optional)

About the Speaker

Abhik Sarkar is a software engineer specializing in machine learning and Python development. He has contributed to numerous open-source Python libraries and has extensive experience building and distributing Python packages with complex C++ dependencies for machine learning applications.

Audience Feedback

“Abhik's talk on this topic was enlightening and practical. The audience was engaged throughout and left with actionable insights they could apply immediately.”
— Conference Organizer, PyCon 2023

Share this talk

Interested in booking this talk?

I'd love to bring this topic to your event! Get in touch to discuss logistics, timing, and any specific areas you'd like me to focus on.

About the Speaker

Abhik Sarkar

Abhik Sarkar

AI researcher and engineer specializing in machine learning systems. Passionate about making complex AI concepts accessible.

Mastodon