Modern binary build systems have made shipping binary packages for Python much easier than ever before. This talk discusses three of the most popular build systems for Python packages using the new standards developed for packaging.
SciPy22 - Building binary extensions with pybind11, scikit build, and cibuild...Henry Schreiner
Building binary extensions is easier than ever thanks to several key libraries. Pybind11 provides a natural C++ language for extensions without requiring pre-processing or special dependencies. Scikit-build ties the premier C++ build system, CMake, into the Python extension build process. And cibuildwheel makes it easy to build highly compatible wheels for over 80 different platforms using CI or on your local machine. We will look at advancements to all three libraries over the last year, as well as future plans.
This document discusses the history and development of Python packages for high energy physics (HEP) analysis. It describes how experiments initially used ROOT and C++, but Python gained popularity for configuration and analysis. This led to the creation of packages like Scikit-HEP, Uproot, and Awkward Array to bridge the gap between ROOT files and the Python data science stack. Scikit-HEP grew to include many related packages and provides best practices through its developer pages. The future may include adopting Scikit-build for building Python packages with C/C++ extensions and running packages in the browser via WebAssembly.
Euro python2011 High Performance PythonIan Ozsvald
I ran this as a 4 hour tutorial at EuroPython 2011 to teach High Performance Python coding.
Techniques covered include bottleneck analysis by profiling, bytecode analysis, converting to C using Cython and ShedSkin, use of the numerical numpy library and numexpr, multi-core and multi-machine parallelisation and using CUDA GPUs.
Write-up with 49 page PDF report: http://ianozsvald.com/2011/06/29/high-performance-python-tutorial-v0-1-from-my-4-hour-tutorial-at-europython-2011/
Talk at PyCon2022 over building binary packages for Python. Covers an overview and an in-depth look into pybind11 for binding, scikit-build for creating the build, and build & cibuildwheel for making the binaries that can be distributed on PyPI.
Flake8 is a Python linter that is fast, simple, and extensible. It can be configured through setup.cfg or .flake8 files to ignore certain checks or select others. The summary recommends using the flake8-bugbear plugin and avoiding all print statements with flake8-print. Linters like Flake8 help find errors, improve code quality, and avoid historical baggage, but one does not need every check and it is okay to build a long ignore list.
The document discusses whether the PyPy implementation of Python is ready for production use. It provides an overview of PyPy, benchmarks various workloads against CPython, and evaluates PyPy based on common criteria for determining if a software project is production-ready. While some workloads are slower on PyPy and it fails with some Python modules, it meets most criteria and provides performance improvements for CPU-bound tasks. Overall, the document concludes PyPy could be considered for production use, especially given its advantages in scalability and upcoming improvements to its just-in-time compiler and Python 3 support.
This document discusses different approaches for creating Python extensions and bindings to C/C++ libraries. It summarizes the author's experience using ctypes to create a minimal binding called PyMiniRacer to the V8 JavaScript engine. The author argues that combining ctypes, which allows shipping a single Python-independent binary, with pre-built wheel distributions can provide an optimal solution for packaging and distributing Python extensions.
Digital RSE: automated code quality checks - RSE group meetingHenry Schreiner
Given at a local RSE group meeting. Covers code quality practices, focusing on Python but over multiple languages, with useful tools highlighted throughout.
Cython allows Python code to be compiled to C/C++ extensions for improved performance. It is a superset of Python that adds static type declarations for variables and functions. This allows Cython code to be compiled to efficient C/C++ code while retaining the syntax and functionality of Python. The document provides an overview of Cython and examples demonstrating how to install Cython, write basic Cython modules, optimize Python code with static types, call C functions from Cython, and interface with C/C++ libraries.
The document discusses best practices for writing a C/C++ Python extension in 2017. It covers available options like ctypes, cffi, Cython, and SWIG. It then focuses on building a binary Python extension using ctypes, including debugging crashes by generating core files and using lldb/gdb. It also discusses memory issues and using valgrind and clang sanitizers. It recommends abusing Python unit tests for testing C code. Finally, it covers shipping the extension, including manylinux wheels, testing wheels on different Linux distributions with Docker, and publishing source and wheel distributions.
The document summarizes Henry Schreiner's work on several Python and C++ scientific computing projects. It describes a scientific Python development guide built from the Scikit-HEP summit. It also outlines Henry's work on pybind11 for C++ bindings, scikit-build for building extensions, cibuildwheel for building wheels on CI, and several other related projects.
Python modules allow programmers to split code into multiple files for easier maintenance. A module is simply a Python file with a .py extension. The import statement is used to include modules. Modules can be organized into packages, which are directories containing an __init__.py file. Popular third party modules like ElementTree, Psyco, EasyGUI, SQLObject, and py.test make Python even more powerful.
Slides for the Cluj.py meetup where we explored the inner workings of CPython, the reference implementation of Python. Includes examples of writing a C extension to Python, and introduces Cython - ultimately the sanest way of writing C extensions.
Also check out the code samples on GitHub: https://github.com/trustyou/meetups/tree/master/python-c
Keynote talk at PyCon Estonia 2019 where I discuss how to extend CPython and how that has led to a robust ecosystem around Python. I then discuss the need to define and build a Python extension language I later propose as EPython on OpenTeams: https://openteams.com/initiatives/2
This document discusses how to publish an open source Python package on PyPI from setup.py. It covers creating setup.py, adding metadata like name, version and description, managing dependencies, generating wheels, and uploading to PyPI. It emphasizes using semantic versioning for versions, PEP 396 for __version__, and twine for secure uploads to PyPI. Continuous integration is recommended for automated testing and deployment on tags.
PyCon 2013 : Scripting to PyPi to GitHub and MoreMatt Harrison
This document discusses various aspects of developing and distributing Python projects, including versioning, configuration, logging, file input, shell invocation, environment layout, project layout, documentation, automation with Makefiles, packaging, testing, GitHub, Travis CI, and PyPI. It recommends using semantic versioning, the logging module, parsing files with the file object interface, invoking shell commands with subprocess, using virtualenv for sandboxed environments, Sphinx for documentation, Makefiles to automate tasks, setuptools for packaging, and GitHub, Travis CI and PyPI for distribution.
This document discusses getting started with a first Python project. It covers installing Python and choosing an IDE, following coding best practices like PEP8 style guidelines, using built-in data structures, testing tools, virtual environments, project structure, and deployment tools like Supervisor. The goal is to help new Python programmers understand the basics of starting their first project.
This document provides an overview of OpenStack APIs and the WSGI (Web Server Gateway Interface) that powers them. It begins with an introduction to WSGI and how OpenStack services are implemented as WSGI applications. It then demonstrates how the OpenStack APIs can be accessed via libraries like novaclient or directly with HTTP requests. Code examples are provided showing how to authenticate against Keystone and retrieve images using urllib2. The document concludes with explanations of how WSGI, WebOb, and Paste are used to implement the OpenStack "web stack".
If you're tired of dealing with load balancing, routing and cloud monitoring and would like to focus on just lambda function, list comprehension or class-based view, then this is the talk for you!
Heroku is the Platform as a Service (PaaS) platform that allows developers to create, run and manage applications entirely in the cloud. To be provided as a service not only the hardware, but also the platform that abstracts the hardware itself and allows you to take advantage of features that allow you to achieve automatic balancing, deployment management and more.
The advantage for the user is to focus exclusively on the development of the application without getting lost in the analysis of problems related to the environment in which it must be distributed, thus obtaining the necessary scalability and reliability.
OpenCV is an open source computer vision library that can be used for image processing and computer vision. It contains over 500 functions and supports Windows, Linux, and MacOS. The OpenCV library consists of three main modules: CV for computer vision algorithms, HighGUI for GUI and image/video input and output, and CXCore for basic data structures. To use OpenCV, developers need a C/C++ compiler like GCC and dependencies like CMake, Git, and Python. OpenCV can then be installed from source by cloning the GitHub repository, configuring with CMake, and building and installing with Make. Useful OpenCV functions and more information sources are also provided.
Python for Delphi (P4D) is a set of free components that wrap up the Python DLL into Delphi and Lazarus (FPC). They let you easily execute Python scripts, create new Python modules and new Python types. You can create Python extensions as DLLs and much more like scripting. P4D provides different levels of functionality: Low-level access to the python API High-level bi-directional interaction with Python Access to Python objects using Delphi custom variants (VarPyth.pas).
This document provides an introduction and overview of using Python on the Raspberry Pi. It discusses that Python is a general purpose language created in the late 1980s that is supported on many operating systems and hardware, including the Raspberry Pi. It then provides tips and recommendations for learning Python, using popular Python libraries, virtual environments, best coding practices, and web development frameworks. Specific libraries and tools mentioned include IPython, Requests, Pandas, Matplotlib, Scikit-Learn, Bottle, Flask, and Django. Source code examples are also included.
In this slides, the author demonstrates many software development practices in Python. Including: runtime environment setup, source code management, version control, unit test, coding convention, code duplication, documentation and automation.
Viktor Tsykunov "Microsoft AI platform for every Developer"Lviv Startup Club
The document provides instructions for setting up an environment for an AI workshop using Azure services. It outlines the following steps:
1. Clone a GitHub repository containing workshop materials and create a Microsoft account.
2. Activate an Azure subscription and create a Data Science Virtual Machine (DSVM) on the Azure portal.
3. Login to a Jupyter notebook server hosted on the DSVM and clone the GitHub repository containing workshop materials.
4. The document then outlines a series of challenges involving using Azure cognitive services, preprocessing images, using scikit-learn models, convolutional neural networks, and deploying models with Docker containers on Azure.
This document provides guidance on sharing reproducible R code projects using version control with Git and GitHub. It discusses configuring Git and RStudio to work together, organizing R projects, publishing projects on GitHub, and tips for making code more shareable. Version control with Git allows tracking changes, collaboration, and recovering from issues like computer crashes. Following standards for coding style, documentation, and packaging environments helps ensure projects are reproducible.
[GSoC 2017] gopy: Updating gopy to support Python3 and PyPyDong-hee Na
gopy is an excellent tool which generates (and compiles) a CPython extension module from a go package. And I hope more developers could make full use of gopy to migrate their go code into python code. To make gopy more advanced, It is necessary to provide APIs for various Python compiler versions, such as CPython 2/3 and PyPy. This can be improved with CFFI or ctypes. Moreover, many go’s implementations/features are not yet implemented in gopy. So we need to implement implementations such as slices, interfaces, and maps in the go.
My goal is to update gopy by using CFFI to support Python3 and PyPy and write detailed documents
Tools to help you write better code - Princeton WintersessionHenry Schreiner
In this workshop, we will investigate a variety of tools to ensure a software project is kept readable, clean, up to date, and as close to bug and warning free as possible. We will primarily focus on Python tooling, though much of what we cover will be applicable to other languages as well. We’ll cover testing, coverage, and especially static checks, which can give you some assurance over even untested code. We’ll look at some aspects of packaging as well.
Ad
More Related Content
Similar to Modern binary build systems - PyCon 2024 (20)
Digital RSE: automated code quality checks - RSE group meetingHenry Schreiner
Given at a local RSE group meeting. Covers code quality practices, focusing on Python but over multiple languages, with useful tools highlighted throughout.
Cython allows Python code to be compiled to C/C++ extensions for improved performance. It is a superset of Python that adds static type declarations for variables and functions. This allows Cython code to be compiled to efficient C/C++ code while retaining the syntax and functionality of Python. The document provides an overview of Cython and examples demonstrating how to install Cython, write basic Cython modules, optimize Python code with static types, call C functions from Cython, and interface with C/C++ libraries.
The document discusses best practices for writing a C/C++ Python extension in 2017. It covers available options like ctypes, cffi, Cython, and SWIG. It then focuses on building a binary Python extension using ctypes, including debugging crashes by generating core files and using lldb/gdb. It also discusses memory issues and using valgrind and clang sanitizers. It recommends abusing Python unit tests for testing C code. Finally, it covers shipping the extension, including manylinux wheels, testing wheels on different Linux distributions with Docker, and publishing source and wheel distributions.
The document summarizes Henry Schreiner's work on several Python and C++ scientific computing projects. It describes a scientific Python development guide built from the Scikit-HEP summit. It also outlines Henry's work on pybind11 for C++ bindings, scikit-build for building extensions, cibuildwheel for building wheels on CI, and several other related projects.
Python modules allow programmers to split code into multiple files for easier maintenance. A module is simply a Python file with a .py extension. The import statement is used to include modules. Modules can be organized into packages, which are directories containing an __init__.py file. Popular third party modules like ElementTree, Psyco, EasyGUI, SQLObject, and py.test make Python even more powerful.
Slides for the Cluj.py meetup where we explored the inner workings of CPython, the reference implementation of Python. Includes examples of writing a C extension to Python, and introduces Cython - ultimately the sanest way of writing C extensions.
Also check out the code samples on GitHub: https://github.com/trustyou/meetups/tree/master/python-c
Keynote talk at PyCon Estonia 2019 where I discuss how to extend CPython and how that has led to a robust ecosystem around Python. I then discuss the need to define and build a Python extension language I later propose as EPython on OpenTeams: https://openteams.com/initiatives/2
This document discusses how to publish an open source Python package on PyPI from setup.py. It covers creating setup.py, adding metadata like name, version and description, managing dependencies, generating wheels, and uploading to PyPI. It emphasizes using semantic versioning for versions, PEP 396 for __version__, and twine for secure uploads to PyPI. Continuous integration is recommended for automated testing and deployment on tags.
PyCon 2013 : Scripting to PyPi to GitHub and MoreMatt Harrison
This document discusses various aspects of developing and distributing Python projects, including versioning, configuration, logging, file input, shell invocation, environment layout, project layout, documentation, automation with Makefiles, packaging, testing, GitHub, Travis CI, and PyPI. It recommends using semantic versioning, the logging module, parsing files with the file object interface, invoking shell commands with subprocess, using virtualenv for sandboxed environments, Sphinx for documentation, Makefiles to automate tasks, setuptools for packaging, and GitHub, Travis CI and PyPI for distribution.
This document discusses getting started with a first Python project. It covers installing Python and choosing an IDE, following coding best practices like PEP8 style guidelines, using built-in data structures, testing tools, virtual environments, project structure, and deployment tools like Supervisor. The goal is to help new Python programmers understand the basics of starting their first project.
This document provides an overview of OpenStack APIs and the WSGI (Web Server Gateway Interface) that powers them. It begins with an introduction to WSGI and how OpenStack services are implemented as WSGI applications. It then demonstrates how the OpenStack APIs can be accessed via libraries like novaclient or directly with HTTP requests. Code examples are provided showing how to authenticate against Keystone and retrieve images using urllib2. The document concludes with explanations of how WSGI, WebOb, and Paste are used to implement the OpenStack "web stack".
If you're tired of dealing with load balancing, routing and cloud monitoring and would like to focus on just lambda function, list comprehension or class-based view, then this is the talk for you!
Heroku is the Platform as a Service (PaaS) platform that allows developers to create, run and manage applications entirely in the cloud. To be provided as a service not only the hardware, but also the platform that abstracts the hardware itself and allows you to take advantage of features that allow you to achieve automatic balancing, deployment management and more.
The advantage for the user is to focus exclusively on the development of the application without getting lost in the analysis of problems related to the environment in which it must be distributed, thus obtaining the necessary scalability and reliability.
OpenCV is an open source computer vision library that can be used for image processing and computer vision. It contains over 500 functions and supports Windows, Linux, and MacOS. The OpenCV library consists of three main modules: CV for computer vision algorithms, HighGUI for GUI and image/video input and output, and CXCore for basic data structures. To use OpenCV, developers need a C/C++ compiler like GCC and dependencies like CMake, Git, and Python. OpenCV can then be installed from source by cloning the GitHub repository, configuring with CMake, and building and installing with Make. Useful OpenCV functions and more information sources are also provided.
Python for Delphi (P4D) is a set of free components that wrap up the Python DLL into Delphi and Lazarus (FPC). They let you easily execute Python scripts, create new Python modules and new Python types. You can create Python extensions as DLLs and much more like scripting. P4D provides different levels of functionality: Low-level access to the python API High-level bi-directional interaction with Python Access to Python objects using Delphi custom variants (VarPyth.pas).
This document provides an introduction and overview of using Python on the Raspberry Pi. It discusses that Python is a general purpose language created in the late 1980s that is supported on many operating systems and hardware, including the Raspberry Pi. It then provides tips and recommendations for learning Python, using popular Python libraries, virtual environments, best coding practices, and web development frameworks. Specific libraries and tools mentioned include IPython, Requests, Pandas, Matplotlib, Scikit-Learn, Bottle, Flask, and Django. Source code examples are also included.
In this slides, the author demonstrates many software development practices in Python. Including: runtime environment setup, source code management, version control, unit test, coding convention, code duplication, documentation and automation.
Viktor Tsykunov "Microsoft AI platform for every Developer"Lviv Startup Club
The document provides instructions for setting up an environment for an AI workshop using Azure services. It outlines the following steps:
1. Clone a GitHub repository containing workshop materials and create a Microsoft account.
2. Activate an Azure subscription and create a Data Science Virtual Machine (DSVM) on the Azure portal.
3. Login to a Jupyter notebook server hosted on the DSVM and clone the GitHub repository containing workshop materials.
4. The document then outlines a series of challenges involving using Azure cognitive services, preprocessing images, using scikit-learn models, convolutional neural networks, and deploying models with Docker containers on Azure.
This document provides guidance on sharing reproducible R code projects using version control with Git and GitHub. It discusses configuring Git and RStudio to work together, organizing R projects, publishing projects on GitHub, and tips for making code more shareable. Version control with Git allows tracking changes, collaboration, and recovering from issues like computer crashes. Following standards for coding style, documentation, and packaging environments helps ensure projects are reproducible.
[GSoC 2017] gopy: Updating gopy to support Python3 and PyPyDong-hee Na
gopy is an excellent tool which generates (and compiles) a CPython extension module from a go package. And I hope more developers could make full use of gopy to migrate their go code into python code. To make gopy more advanced, It is necessary to provide APIs for various Python compiler versions, such as CPython 2/3 and PyPy. This can be improved with CFFI or ctypes. Moreover, many go’s implementations/features are not yet implemented in gopy. So we need to implement implementations such as slices, interfaces, and maps in the go.
My goal is to update gopy by using CFFI to support Python3 and PyPy and write detailed documents
Tools to help you write better code - Princeton WintersessionHenry Schreiner
In this workshop, we will investigate a variety of tools to ensure a software project is kept readable, clean, up to date, and as close to bug and warning free as possible. We will primarily focus on Python tooling, though much of what we cover will be applicable to other languages as well. We’ll cover testing, coverage, and especially static checks, which can give you some assurance over even untested code. We’ll look at some aspects of packaging as well.
This document discusses software quality assurance tooling, focusing on pre-commit. It introduces pre-commit as a tool for running code quality checks before code is committed. Pre-commit allows configuring hooks that run checks and fixers on files matching certain patterns. Hooks can be installed from repositories and support many languages including Python. The document provides examples of pre-commit checks such as disallowing improper capitalization in code comments and files. It also discusses how to configure, run, update and install pre-commit hooks.
The document describes various productivity tools for Python development, including:
- Pre-commit hooks to run checks before committing code
- Hot code reloading in Jupyter notebooks using the %load_ext and %autoreload magic commands
- Cookiecutter for generating project templates
- SSH configuration files and escape sequences for easier remote access
- Autojump to quickly navigate frequently visited directories
- Terminal tips like command history search and referencing the last argument
- Options for tracking Jupyter notebooks with git like stripping outputs or synchronizing notebooks and Python files.
PyCon 2022 -Scikit-HEP Developer Pages: Guidelines for modern packagingHenry Schreiner
This was a PyCon 2022 lightning talk over the Scikit-HEP developer pages. It highlights best practices and guides shown there, and the quick package creation cookiecutter. And finally it demos the Pyodide WebAssembly app embedded into the Scikit-HEP developer pages!
This document provides best practices for using CMake, including:
- Set the cmake_minimum_required version to ensure modern features while maintaining backward compatibility.
- Use targets to define executables and libraries, their properties, and dependencies.
- Fetch remote dependencies at configure time using FetchContent or integrate with package managers like Conan.
- Import library targets rather than reimplementing Find modules when possible.
- Treat CUDA as a first-class language in CMake projects.
HOW 2019: Machine Learning for the Primary Vertex ReconstructionHenry Schreiner
The document describes a machine learning approach for primary vertex reconstruction in high-energy physics experiments. A hybrid method is proposed that uses a 1D convolutional neural network to analyze histograms produced from tracking data. The network is able to find primary vertices with high efficiency and tunable false positive rates, demonstrating the potential of machine learning for this task. Future work involves adding more tracking information and iterating between track association and vertex finding to improve performance.
HOW 2019: A complete reproducible ROOT environment in under 5 minutesHenry Schreiner
The document discusses setting up a ROOT environment using Conda in under 5 minutes. It describes downloading and installing Miniconda and then using Conda commands to create a new environment and install ROOT and its dependencies from the conda-forge channel. The ROOT package provides full ROOT functionality, including compilation and graphics, and supports Linux, macOS, and multiple Python versions.
ACAT 2019: A hybrid deep learning approach to vertexingHenry Schreiner
This document presents a hybrid deep learning approach for vertex finding in high-energy physics experiments. It uses a 1D convolutional neural network to analyze kernel density estimates of track information in order to identify primary vertex positions. The approach achieves primary vertex finding efficiencies of 88-94% with low false positive rates comparable to traditional algorithms. The authors demonstrate tuning of the efficiency-false positive rate tradeoff and discuss plans to improve performance by incorporating additional track information and iterative refinement.
2019 CtD: A hybrid deep learning approach to vertexingHenry Schreiner
This document presents a hybrid deep learning approach for vertex finding using 1D convolutional neural networks. It describes generating 1D kernel densities from tracking information, building target distributions, and using a CNN architecture with an adjustable cost function to optimize the false positive rate versus efficiency. The approach achieves 93.87% efficiency with a 0.251 false positive rate on test data. Future work includes incorporating additional xy information and exploring full 2D kernel densities.
2019 IRIS-HEP AS workshop: Boost-histogram and histHenry Schreiner
The document discusses the current state of histograms in Python and the need for a new histogramming library. It introduces boost-histogram, a C++ histogramming library, and its new Python bindings. The bindings aim to provide a fast, flexible and easily distributable histogram object for Python. Key features discussed include histogram design that treats it as a first-class object, fast filling via multi-threading, a variety of axis and storage types, and performance benchmarks showing it can be over 10x faster than NumPy for filling histograms. Distribution is focused on providing binary wheels for many platforms via continuous integration.
The document discusses the current state of histograms in Python and the need for a new library. It introduces boost-histogram, a C++ histogram library, and its new Python bindings. The bindings aim to provide a fast, flexible, and easily distributable histogram object for Python with support for multiple axis types and storage options. It also discusses plans for an additional wrapper library called hist for easy plotting and interfacing with other tools.
2019 IRIS-HEP AS workshop: Particles and decaysHenry Schreiner
The Scikit-HEP project aims to create an ecosystem for particle physics data analysis in Python. It includes packages like Particle and DecayLanguage that provide tools for working with particle data and decay descriptions. Particle allows users to easily access and search particle property data from sources like the PDG. DecayLanguage allows parsing decay file formats, representing and manipulating decay chains, and converting between decay model representations. Future work includes expanding particle ID support and improving visualization of decay trees.
The document discusses plans for the boost-histogram and hist Python libraries. Boost-histogram is a multidimensional histogram library inspired by ROOT that provides flexibility through many axis and storage types. Hist will provide plotting and analysis functionality by interfacing with libraries like mpl-hep. Future plans include improved indexing, slicing, and NumPy conversions for boost-histogram as well as statistical functions, serialization, and integration with fitters for hist.
The document discusses the new features of Python 3.8, which was recently released. Some key updates include positional-only arguments, the walrus operator for variable assignment, improved static typing support, and performance enhancements. The document also notes additional developer changes and provides resources for obtaining Python 3.8.
Download YouTube By Click 2025 Free Full Activatedsaniamalik72555
Copy & Past Link 👉👉
https://dr-up-community.info/
"YouTube by Click" likely refers to the ByClick Downloader software, a video downloading and conversion tool, specifically designed to download content from YouTube and other video platforms. It allows users to download YouTube videos for offline viewing and to convert them to different formats.
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...Andre Hora
Unittest and pytest are the most popular testing frameworks in Python. Overall, pytest provides some advantages, including simpler assertion, reuse of fixtures, and interoperability. Due to such benefits, multiple projects in the Python ecosystem have migrated from unittest to pytest. To facilitate the migration, pytest can also run unittest tests, thus, the migration can happen gradually over time. However, the migration can be timeconsuming and take a long time to conclude. In this context, projects would benefit from automated solutions to support the migration process. In this paper, we propose TestMigrationsInPy, a dataset of test migrations from unittest to pytest. TestMigrationsInPy contains 923 real-world migrations performed by developers. Future research proposing novel solutions to migrate frameworks in Python can rely on TestMigrationsInPy as a ground truth. Moreover, as TestMigrationsInPy includes information about the migration type (e.g., changes in assertions or fixtures), our dataset enables novel solutions to be verified effectively, for instance, from simpler assertion migrations to more complex fixture migrations. TestMigrationsInPy is publicly available at: https://github.com/altinoalvesjunior/TestMigrationsInPy.
Creating Automated Tests with AI - Cory House - Applitools.pdfApplitools
In this fast-paced, example-driven session, Cory House shows how today’s AI tools make it easier than ever to create comprehensive automated tests. Full recording at https://applitools.info/5wv
See practical workflows using GitHub Copilot, ChatGPT, and Applitools Autonomous to generate and iterate on tests—even without a formal requirements doc.
DVDFab Crack FREE Download Latest Version 2025younisnoman75
⭕️➡️ FOR DOWNLOAD LINK : http://drfiles.net/ ⬅️⭕️
DVDFab is a multimedia software suite primarily focused on DVD and Blu-ray disc processing. It offers tools for copying, ripping, creating, and editing DVDs and Blu-rays, as well as features for downloading videos from streaming sites. It also provides solutions for playing locally stored video files and converting audio and video formats.
Here's a more detailed look at DVDFab's offerings:
DVD Copy:
DVDFab offers software for copying and cloning DVDs, including removing copy protections and creating backups.
DVD Ripping:
This allows users to rip DVDs to various video and audio formats for playback on different devices, while maintaining the original quality.
Blu-ray Copy:
DVDFab provides tools for copying and cloning Blu-ray discs, including removing Cinavia protection and creating lossless backups.
4K UHD Copy:
DVDFab is known for its 4K Ultra HD Blu-ray copy software, allowing users to copy these discs to regular BD-50/25 discs or save them as 1:1 lossless ISO files.
DVD Creator:
This tool allows users to create DVDs from various video and audio formats, with features like GPU acceleration for faster burning.
Video Editing:
DVDFab includes a video editing tool for tasks like cropping, trimming, adding watermarks, external subtitles, and adjusting brightness.
Video Player:
A free video player that supports a wide range of video and audio formats.
All-In-One:
DVDFab offers a bundled software package, DVDFab All-In-One, that includes various tools for handling DVD and Blu-ray processing.
How can one start with crypto wallet development.pptxlaravinson24
This presentation is a beginner-friendly guide to developing a crypto wallet from scratch. It covers essential concepts such as wallet types, blockchain integration, key management, and security best practices. Ideal for developers and tech enthusiasts looking to enter the world of Web3 and decentralized finance.
Get & Download Wondershare Filmora Crack Latest [2025]saniaaftab72555
Copy & Past Link 👉👉
https://dr-up-community.info/
Wondershare Filmora is a video editing software and app designed for both beginners and experienced users. It's known for its user-friendly interface, drag-and-drop functionality, and a wide range of tools and features for creating and editing videos. Filmora is available on Windows, macOS, iOS (iPhone/iPad), and Android platforms.
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Eric D. Schabell
It's time you stopped letting your telemetry data pressure your budgets and get in the way of solving issues with agility! No more I say! Take back control of your telemetry data as we guide you through the open source project Fluent Bit. Learn how to manage your telemetry data from source to destination using the pipeline phases covering collection, parsing, aggregation, transformation, and forwarding from any source to any destination. Buckle up for a fun ride as you learn by exploring how telemetry pipelines work, how to set up your first pipeline, and exploring several common use cases that Fluent Bit helps solve. All this backed by a self-paced, hands-on workshop that attendees can pursue at home after this session (https://o11y-workshops.gitlab.io/workshop-fluentbit).
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentShubham Joshi
A secure test infrastructure ensures that the testing process doesn’t become a gateway for vulnerabilities. By protecting test environments, data, and access points, organizations can confidently develop and deploy software without compromising user privacy or system integrity.
Interactive Odoo Dashboard for various business needs can provide users with dynamic, visually appealing dashboards tailored to their specific requirements. such a module that could support multiple dashboards for different aspects of a business
✅Visit And Buy Now : https://bit.ly/3VojWza
✅This Interactive Odoo dashboard module allow user to create their own odoo interactive dashboards for various purpose.
App download now :
Odoo 18 : https://bit.ly/3VojWza
Odoo 17 : https://bit.ly/4h9Z47G
Odoo 16 : https://bit.ly/3FJTEA4
Odoo 15 : https://bit.ly/3W7tsEB
Odoo 14 : https://bit.ly/3BqZDHg
Odoo 13 : https://bit.ly/3uNMF2t
Try Our website appointment booking odoo app : https://bit.ly/3SvNvgU
👉Want a Demo ?📧 [email protected]
➡️Contact us for Odoo ERP Set up : 091066 49361
👉Explore more apps: https://bit.ly/3oFIOCF
👉Want to know more : 🌐 https://www.axistechnolabs.com/
#odoo #odoo18 #odoo17 #odoo16 #odoo15 #odooapps #dashboards #dashboardsoftware #odooerp #odooimplementation #odoodashboardapp #bestodoodashboard #dashboardapp #odoodashboard #dashboardmodule #interactivedashboard #bestdashboard #dashboard #odootag #odooservices #odoonewfeatures #newappfeatures #odoodashboardapp #dynamicdashboard #odooapp #odooappstore #TopOdooApps #odooapp #odooexperience #odoodevelopment #businessdashboard #allinonedashboard #odooproducts
Not So Common Memory Leaks in Java WebinarTier1 app
This SlideShare presentation is from our May webinar, “Not So Common Memory Leaks & How to Fix Them?”, where we explored lesser-known memory leak patterns in Java applications. Unlike typical leaks, subtle issues such as thread local misuse, inner class references, uncached collections, and misbehaving frameworks often go undetected and gradually degrade performance. This deck provides in-depth insights into identifying these hidden leaks using advanced heap analysis and profiling techniques, along with real-world case studies and practical solutions. Ideal for developers and performance engineers aiming to deepen their understanding of Java memory management and improve application stability.
Apple Logic Pro X Crack FRESH Version 2025fs4635986
🌍📱👉COPY LINK & PASTE ON GOOGLE http://drfiles.net/ 👈🌍
Logic Pro X is a professional digital audio workstation (DAW) software for macOS, developed by Apple. It's a comprehensive tool for music creation, offering features for songwriting, beat making, editing, and mixing. Logic Pro X provides a wide range of instruments, effects, loops, and samples, enabling users to create a variety of musical styles.
Here's a more detailed breakdown:
Digital Audio Workstation (DAW):
Logic Pro X allows users to record, edit, and mix audio and MIDI tracks, making it a central hub for music production.
MIDI Sequencing:
It supports MIDI sequencing, enabling users to record and manipulate MIDI performances, including manipulating parameters like note velocity, timing, and dynamics.
Software Instruments:
Logic Pro X comes with a vast collection of software instruments, including synthesizers, samplers, and virtual instruments, allowing users to create a wide variety of sounds.
Audio Effects:
It offers a wide range of audio effects, such as reverbs, delays, EQs, compressors, and distortion, enabling users to shape and polish their mixes.
Recording Facilities:
Logic Pro X provides various recording facilities, allowing users to record vocals, instruments, and other audio sources.
Mixing and Mastering:
It offers tools for mixing and mastering, allowing users to refine their mixes and prepare them for release.
Integration with Apple Ecosystem:
Logic Pro X integrates well with other Apple products, such as GarageBand, allowing for seamless project transfer and collaboration.
Logic Remote:
It supports remote control via iPad or iPhone, enabling users to manipulate instruments and control mixing functions from another device.
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Ranjan Baisak
As software complexity grows, traditional static analysis tools struggle to detect vulnerabilities with both precision and context—often triggering high false positive rates and developer fatigue. This article explores how Graph Neural Networks (GNNs), when applied to source code representations like Abstract Syntax Trees (ASTs), Control Flow Graphs (CFGs), and Data Flow Graphs (DFGs), can revolutionize vulnerability detection. We break down how GNNs model code semantics more effectively than flat token sequences, and how techniques like attention mechanisms, hybrid graph construction, and feedback loops significantly reduce false positives. With insights from real-world datasets and recent research, this guide shows how to build more reliable, proactive, and interpretable vulnerability detection systems using GNNs.
🌱 Green Grafana 🌱 Essentials_ Data, Visualizations and Plugins.pdfImma Valls Bernaus
eady to harness the power of Grafana for your HackUPC project? This session provides a rapid introduction to the core concepts you need to get started. We'll cover Grafana fundamentals and guide you through the initial steps of building both compelling dashboards and your very first Grafana app. Equip yourself with the essential tools to visualize your data and bring your innovative ideas to life!
WinRAR Crack for Windows (100% Working 2025)sh607827
copy and past on google ➤ ➤➤ https://hdlicense.org/ddl/
WinRAR Crack Free Download is a powerful archive manager that provides full support for RAR and ZIP archives and decompresses CAB, ARJ, LZH, TAR, GZ, ACE, UUE, .
PDF Reader Pro Crack Latest Version FREE Download 2025mu394968
🌍📱👉COPY LINK & PASTE ON GOOGLE https://dr-kain-geera.info/👈🌍
PDF Reader Pro is a software application, often referred to as an AI-powered PDF editor and converter, designed for viewing, editing, annotating, and managing PDF files. It supports various PDF functionalities like merging, splitting, converting, and protecting PDFs. Additionally, it can handle tasks such as creating fillable forms, adding digital signatures, and performing optical character recognition (OCR).
Landscape of Requirements Engineering for/by AI through Literature ReviewHironori Washizaki
Hironori Washizaki, "Landscape of Requirements Engineering for/by AI through Literature Review," RAISE 2025: Workshop on Requirements engineering for AI-powered SoftwarE, 2025.
Why Orangescrum Is a Game Changer for Construction Companies in 2025Orangescrum
Orangescrum revolutionizes construction project management in 2025 with real-time collaboration, resource planning, task tracking, and workflow automation, boosting efficiency, transparency, and on-time project delivery.
Why Orangescrum Is a Game Changer for Construction Companies in 2025Orangescrum
Ad
Modern binary build systems - PyCon 2024
1. Henry Schreiner • May 17, 2024 • PyCon US
Modern binary build systems
2. About me
@henryiii
2
Bec
a
me involved in p
a
ck
a
ging vi
a
Scikit-HEP
W
a
nted to ship bin
a
ry extensions
(boost-histogr
a
m,
a
wkw
a
rd, iminuit)
Joined forces with cibuildwheel
Currently m
a
int
a
in 34+ p
a
ck
a
ges
21 in top 8,000 on PyPI
pybind11 (python_example, cmake_example, scikit_build_example) •
cibuildwheel • build • pipx • pyproject-metadata •
scikit-build (core, cmake, ninja, moderncmakedomain, example-projects) •
nox • validate-pyproject(-schema-store) • pytest GHA annotate-failures •
Plumbum •
fl
ake8-errmsg • check-sdist •
boost-histogram • Hist • UHI • Vector • GooFit • Particle • DecayLanguage •
uproot-browser • Conda-Forge ROOT •
Scienti
fi
c-Python/cookie • repo-review • meson-python •
POVM • hypernewsviewer •
CLI11 • beautifulhugo • Jekyll-Indico
https://iscinumpy.dev
(Slides will be posted here l
a
ter)
3. Bene
f
its?
3
Fast
Wrap existing libraries
Cross-language
Ship existing CLI tools on PyPI
Can release GIL
Of the top 8,000 p
a
ck
a
ges on PyPI:
6,433 ship
a
single wheel
896 ship multiple wheels (prob
a
bly bin
a
ries!)
671 don't ship
a
wheel (unknown)
Over 10%!
charset-normalizer 367 M
pyyaml 279 M
numpy 246 M
cryptography 238 M
c
f
207 M
pandas 195 M
protobuf 174 M
markupsafe 151 M
wrapt 120 M
pyarrow 110 M
sqlalchemy 104 M
aiohttp 102 M
scipy 101 M
multidict 97 M
psutil 96 M
yarl 95 M
frozenlist 90 M
pillow 89 M
grpcio 88 M
greenlet 88 M
pydantic-core 83 M
4. Pure Python packages
4
Build con
fi
guration One wheel, one sdist
Binding API Build con
fi
guration Many wheels
pybind11 (C++11)
n
a
nobind (C++17)
Cython (C, C++)
SWIG (C, C++)
PyO3 (Rust)
N
a
tive (C)
cibuildwheel
m
a
turin-
a
ction (Rust)
Scikit-build-core
meson-python
m
a
turin
Binary packages
h
a
tchling
setuptools
poetry-core
build
hynek/build-
a
nd-inspect-python-p
a
ck
a
ge
f
lit-core
pdm-b
a
ckend
...
7. cibuildwheel
New features
• CPython 3.13b1 (opt-in)
• Inherit for overrides (except con
f
ig-settings for now)
• Musllinux 1.2 def
a
ult
• Support Apple Silicon runners on GHA
• Addition
a
l
f
l
a
gs to build frontend
• Better reproducible build support
• E
a
sier loc
a
l runs
7
WIP:
Fix con
f
ig-settings inherit override bug
Free-thre
a
ded support (in m
a
nylinux now!)
Investig
a
ting uv support
8. Before PEP 517 (2017)
Setuptools / distutils
8
from setuptools import Extension, setup
setup(
name = "mylib",
version = "1.0.0",
ext_modules = [
Extension(
name = "mylib.foo",
sources = ["foo.c"],
),
]
)
Simple! Unless you need…
Third p
a
rty dependencies
Compiler speci
f
ic
f
l
a
gs, like C++ version
P
a
r
a
llel (
f
ile) compiles
C
a
ching / sm
a
rt recompiles
bdist_wheel customiz
a
tions (no public API)
Fortr
a
n
Other compilers
IDE support
Tooling integr
a
tion (debuggers, etc)
Cross-compil
a
tion
Setuptools isn’t trying to
a
dd fe
a
tures to support this
So everyone h
a
s to reinvent the wheel
NumPy h
a
d 13,000 LoC for building!
(MANIFEST.in omitted)
9. Before PEP 517 (2017)
Extending setuptools / distutils
9
Ex
a
mples of setuptools-b
a
sed builders
Scikit-build (cl
a
ssic)
setuptools-rust
pybind11’s setup_helper
cython (integr
a
ted)
Distutils -> setuptools h
a
s l
a
yered complexity
h
a
rd to debug
e
a
sy to bre
a
k on upd
a
te
h
a
rd to extend
10. Modern build system
Hooks for build backends
10
Simple st
a
nd
a
rdized API
Supports inst
a
lling build requirements (dyn
a
mic
a
lly too)
B
a
ckend is responsible for b
a
sic
a
lly everything
Edit
a
ble inst
a
lls
a
dded l
a
ter
11. Build backend hooks
11
Dyn
a
mic
a
lly request
dependencies per st
a
ge
get_requires_for_build_sdist(…)
get_requires_for_build_wheel(…)
get_requires_for_build_editable(…)
build_sdist(…)
build_wheel(…)
build_editable(…)
prepare_metadata_for_build_wheel()
Given source
a
nd con
f
ig,
m
a
ke *.t
a
r.gz
f
ile
And .whl
f
ile
And “edit
a
ble” vi
a
.whl
f
ile
Option
a
l get met
a
d
a
t
a
without build
12. Rise of PEP 517 build backends
The new era of Python packaging
12
Now we h
a
ve bin
a
ry ones too!
enscons (2017)
m
a
turin (2019)
meson-python (2021)
scikit-build-core (2022)
Pure-Python b
a
ckends were
f
irst:
f
lit-core (2017*)
poetry-core (2018*)
pdm-b
a
ckend (2020*)
h
a
tchling (2022)
setuptools (2022)
Speci
a
l mention: enscons w
a
s the
f
irst PEP 517 build b
a
ckend for bin
a
ries!
(We’ll focus on the other three tod
a
y)
13. History of meson-python
13
SciPy st
a
rted the project in prep
a
r
a
tion of Python 3.12
Other m
a
jor Scienti
f
ic Python libr
a
ries joined
NumPy went from 13K to 2K LoC for building
(Not counting forking meson (100K)
a
nd vendoring it)
15. Meson-Python
Features
15
C
a
n skip PEP 621
a
nd use Meson con
f
ig for quick projects
Sever
a
l options c
a
n be speci
f
ied in pyproject.toml or vi
a
con
f
ig-settings
Developed rebuild support for edit
a
ble inst
a
lls
Ninj
a
p
a
ck
a
ge
a
dded only if missing
16. Scikit-build
A family of tools
• Scikit-build-core
• Scikit-build (cl
a
ssic)
• Ninj
a
Python Distribution (pip inst
a
ll cm
a
ke)
• CM
a
ke Python Distribution (pip inst
a
ll ninj
a
with jobserver support)
• ModernCM
a
keDom
a
in (Sphinx plugin)
• Dyn
a
mic-Met
a
d
a
t
a
(WIP project for gener
a
l met
a
d
a
t
a
plugins)
16
Scikit-build-core funded vi
a
NSF gr
a
nt OAC 2209877
17. Scikit-build-core
CMake
17
example-project
├── example.cpp
├── pyproject.toml
└── CMakeLists.txt
[build-system]
requires = ["scikit-build-core", "pybind11"]
build-backend = "scikit_build_core.build"
[project]
name = "example"
version = "0.0.1"
cmake_minimum_required(VERSION 3.15…3.29)
project(example LANGUAGES CXX)
set(PYBIND11_NEWPYTHON ON)
find_package(pybind11 CONFIG REQUIRED)
pybind11_add_module(example example.cpp)
install(TARGETS example LIBRARY DESTINATION .)
pipx run build --installer=uv
#include <pybind11/pybind11.h>
namespace py = pybind11;
float square(float x) { return x * x; }
PYBIND11_MODULE(example, m) {
m.def("square", &square);
}
18. Scikit-build-core
Features
• Autom
a
tic inclusion of cm
a
ke/ninj
a
a
s needed
• Limited API / St
a
ble ABI
a
nd pythonless t
a
gs supported vi
a
con
f
ig option
• Support for writing out to extr
a
wheel folders (scripts, he
a
ders, d
a
t
a
, met
a
d
a
t
a
)
• Dedic
a
ted entrypoints for p
a
ck
a
ges to host CM
a
ke code
• Experiment
a
l edit
a
ble mode support, with option
a
l experiment
a
l
a
uto rebuilds on import
• Free-thre
a
ded Python support
18
19. Scikit-build-core con
f
ig system
A peek into the internals
19
D
a
t
a
cl
a
ss-b
a
sed con
f
ig system
Gener
a
tes JSONSchem
a
Gener
a
tes section in README using cog
Supports pyproject.toml, con
f
ig-settings,
a
nd environment v
a
ri
a
bles
@dataclasses.dataclass
class WheelSettings:
packages: Optional[List[str]] = None
"""
A list of packages to auto-copy into the wheel. If this is not set, it will
default to the first of ``src/<package>``, ``python/<package>``, or
``<package>`` if they exist. The prefix(s) will be stripped from the
package name inside the wheel.
"""
py_api: str = ""
"""
The Python tags. The default (empty string) will use the default Python
version. You can also set this to "cp37" to enable the CPython 3.7+ Stable
ABI / Limited API (only on CPython and if the version is sufficient,
otherwise this has no effect). Or you can set it to "py3" or "py2.py3" to
ignore Python ABI compatibility. The ABI tag is inferred from this tag.
"""
expand_macos_universal_tags: bool = False
"""
Fill out extra tags that are not required. This adds "x86_64" and "arm64"
to the list of platforms when "universal2" is used, which helps older
Pip's (before 21.0.1) find the correct wheel.
"""
21. Scikit-build-core
Dynamic metadata
21
[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.regex"
input = "src/mypackage/__init__.py"
[[tool.scikit-build.generate]]
location = "install"
path = "mypackage/_version.py"
template = '''
version = "${version}"
'''
Join us on scikit-build/dyn
a
mic-met
a
d
a
t
a
if you
a
re
interested in gener
a
lizing for multiple b
a
ckends!
22. Scikit-build-core
Overrides
22
[[tool.scikit-build.overrides]]
if.platform-system = "darwin"
cmake.version = ">=3.18"
Designed
a
fter cibuildwheel's overrides, inspired by mypy
M
a
tch top to bottom
C
a
n use if.
a
ny
C
a
n inherit with "
a
ppend", "prepend", or "none"
T
a
kes regex, speci
f
ier set, or bool
[[tool.scikit-build.overrides]]
if.state = "editable"
build-dir = "build"
[[tool.scikit-build.overrides]]
if.any.env.SET_FOO = true
if.any.env.FOO_SET = true
inherit.cmake.define = "append"
cmake.define.FOO = "1"
24. Scikit-build-core
Some projects
24
R
a
pids.
a
i
Added to
f
ile gener
a
tor
a
nd
deployed
a
cross
a
ll projects
[tool.scikit-build]
wheel.packages = ["zmq"]
wheel.license-files = ["licenses/LICENSE*"]
cmake.version = ">=3.15"
# only build/install the pyzmq component
cmake.targets = ["pyzmq"]
install.components = ["pyzmq"]
PyZMQ
Added to
f
ile gener
a
tor
a
nd
deployed
a
cross
a
ll projects
[tool.scikit-build]
minimum-version = "0.8"
build-dir = "build/{wheel_tag}"
cmake.version = "" # We are cmake, so don't request cmake
ninja.make-fallback = false
wheel.py-api = "py3"
wheel.expand-macos-universal-tags = true
wheel.install-dir = "cmake/data"
[[tool.scikit-build.generate]]
path = "cmake/_version.py"
template = '''
version = "${version}"
'''
cm
a
ke (python distributions)
Fun met
a
problem: we
a
re cm
a
ke!
25. Bonus: Scikit-build-core plugins
Scikit-build-core is also useful for creating plugins!
25
[build-system]
requires = ["hatchling", "scikit-build-core~=0.9.0"]
build-backend = "hatchling.build"
[project]
name = "hatchling_example"
version = "0.1.0"
[tool.hatch.build.targets.wheel.hooks.scikit-build]
experimental = true
This will
a
dd
a
CM
a
ke extension to
a
h
a
tchling project!
27. PyPI Stats
Looking at every pyproject.toml
27
tool.*:
poetry: 52183
black: 24730
pytest: 18229
isort: 18111
setuptools: 15210
mypy: 13030
ruff: 12213
coverage: 10749
setuptools_scm: 7006
hatch: 6900
pylint: 4261
pyright: 3635
flit: 3039
flake8: 2216
pdm: 1995
tox: 1577
semantic_release: 1553
cibuildwheel: 1474
codespell: 1431
maturin: 1207
poetry-dynamic-versioning: 1150
C
a
n look
a
t the most
popul
a
r tool sections:
This helped bl
a
ck
check the imp
a
ct
of
a
con
f
ig bug!
tool.black.line-length contents:
120: 5755
88: 3578
79: 2876
100: 2714
80: 834
...
C
a
n check to see wh
a
t
our users
a
re using
a
nd
setting!
*:
build-system: 136738
tool: 100937
project: 51268
options: 305
tools: 279
metadata: 202
coverage: 148
mypy: 127
requires: 119
flake8: 119
virtualenvs: 90
build-backend: 81
pytest: 76
dependencies: 67
bdist_wheel: 40
build: 36
pypi: 34
build_system: 32
dev-dependencies: 30
package: 30
bumpver: 28
manageprojects: 25
too: 25
...
Or typos:
Nothing p
a
st
here is v
a
lid!
(Use v
a
lid
a
te-pyproject)!
29. Maturin
Cargo (Rust)
29
A Rust-b
a
sed build system for C
a
rgo
example-project
├── src/lib.rs
├── Cargo.toml
└── pyproject.toml
[package]
name = "package"
version = "0.1.0"
edition = "2021"
[lib]
name = "example"
crate-type = ["cdylib"]
[dependencies.pyo3]
version = "0.21.1"
features = [
"extension-module",
"abi3-py38",
"experimental-declarative-modules",
]
use pyo3::prelude::*;
#[pymodule]
mod example {
use super::*;
#[pyfunction]
fn add(x: i64, y: i64) -> i64 {
x + y
}
}
[build-system]
requires = ["maturin~=1.5"]
build-backend = "maturin"
[project]
name = "example"
dynamic = ["version"]
pipx run build —installer=uv
maturin build --release
30. Maturin
Features
30
Written in Rust
(c
a
n build
a
p
a
ck
a
ge without running Python!)
Limited API doesn't even require Python
a
t
a
ll!
C
a
rgo's build-from-source p
a
ck
a
ging is perfect
for cross-compil
a
tion
a
nd m
a
king wheels!
CLI c
a
n cre
a
te
a
new project.
Why Rust?
Rust/C
a
rgo m
a
kes using
libr
a
ries
a
s e
a
sy
a
s Python!
Cross-compiles
a
re gre
a
t
(c
a
n
a
void most m
a
nylinux issues)
Tooling is f
a
nt
a
stic
(linter, form
a
tter, IDEs, etc)
PyO3 bindings
a
re gre
a
t
Single bin
a
ry
a
ppro
a
ch
works well for wheels
(And m
a
ybe some memory s
a
fety stu
ff
)
31. Maturin-Action
GitHub Action for Building
31
Gre
a
t
a
t cross-compiling with extensive support
(f
a
st)
Builds non-Python Rust p
a
rts once for
a
ll versions
Every wheel supported except musl s390x wheels
(some pl
a
tforms like 32-bit musl c
a
n't be done with
cibuildwheel since rust doesn't build c
a
rgo for them)
...
Compiling lexical-sort v0.3.1
Compiling taplo v0.13.0
Compiling pep508_rs v0.6.0
Compiling pyproject-fmt-rust v1.1.1 (/home/runner/...
Finished release [optimized] target(s) in 13.53s
📦 Including files matching "rust-toolchain.toml"
📦 Built wheel for abi3 Python ≥ 3.8 to dist/...
⚠ Warning: PyPy does not yet support abi3 so the build...
Compiling pyo3-build-config v0.21.2
Compiling pyo3-macros-backend v0.21.2
Compiling pyo3-ffi v0.21.2
Compiling pyo3 v0.21.2
Compiling pyo3-macros v0.21.2
Compiling pyproject-fmt-rust v1.1.1 (/home/runner/...
Finished release [optimized] target(s) in 4.25s
📦 Including files matching "rust-toolchain.toml"
📦 Built wheel for PyPy 3.8 to dist/pyproject_fmt_rust-...
Compiling pyo3-build-config v0.21.2
Compiling pyo3-macros-backend v0.21.2
Compiling pyo3-ffi v0.21.2
Compiling pyo3 v0.21.2
Compiling pyo3-macros v0.21.2
Compiling pyproject-fmt-rust v1.1.1 (/home/runner/...
Finished release [optimized] target(s) in 4.24s
...
33. Resources
Scienti
fi
c-python/cookie
33
11 b
a
ckends
Cookiecutter & copier supported
In sync with the dev guide
Gener
a
tion tested by nox
🎤 The name of your project
myprog
🎤 The name of your (GitHub?) org
henryiii
🎤 The url to your GitHub or GitLab repository
https://github.com/henryiii/myprog
🎤 Your name
Henry Schreiner
🎤 Your email
[email protected]
🎤 A short description of your project
A great package.
🎤 Select a license
BSD
🎤 Choose a build backend
Scikit-build-core - Compiled C++ (recommended)
🎤 Use version control for versioning
No
Copying from template version 2024.4.23
create .
create CMakeLists.txt
create .pre-commit-config.yaml
create pyproject.toml
create tests
create tests/test_package.py
create tests/test_compiled.py
create .git_archival.txt
create LICENSE
create docs
create docs/conf.py
create docs/index.md
create README.md
create .gitignore
create .github
create .github/workflows
create .github/workflows/cd.yml
create .github/workflows/ci.yml
create .github/CONTRIBUTING.md
create .github/dependabot.yml
create .gitattributes
create .copier-answers.yml
create noxfile.py
create .readthedocs.yaml
create src
create src/main.cpp
create src/myprog
create src/myprog/__init__.py
create src/myprog/_core.pyi
create src/myprog/py.typed
34. Resources
Repo-review
34
Python 3.10+ fr
a
mework
sp-repo-review: checks from guide
Supports WebAssembly
a
nd CLI
(
a
nd pre-commit, etc)
A checker for your checker con
f
ig!
Checks linked to integr
a
ted t
a
gs in guide
V
a
lid
a
te-pyproject
a
lso integr
a
ted
35. Summary
So much has happened in the last two years!
• Three f
a
nt
a
stic build-b
a
ckends
a
re now
a
v
a
il
a
ble for bin
a
ry projects
• Gre
a
t resources
a
v
a
il
a
ble for developing p
a
ck
a
ges
• You c
a
n ship C/C++/Rust code for
a
ll m
a
jor pl
a
tforms even for
a
sm
a
ll project
35
36. Credits and thanks
36
scikit-build te
a
m
Je
a
n-Christophe Fillion-Robin (Kitw
a
re)
M
a
tt McCormick (Kitw
a
re)
Cristi
a
n Le
meson-python te
a
m
R
a
lf Gommers
D
a
niele Nicolodi
Henry Schreiner
Thom
a
s Li
Filipe L
a
íns (Emeritus)
cibuildwheel te
a
m
Joe Rickerby
Y
a
nnick J
a
doul
M
a
tthieu D
a
rbois
Grzegorz Bokot
a
And th
a
nks to the m
a
turin developers for th
a
t f
a
nt
a
stic tool!
Thanks to my other team members!