freeprogrammingbooks.com

Pyconfigure

By Brandon Invergo

This manual documents pyconfigure (version 0.2.1, updated 21 August 2013) by Brandon Invergo.

Configuring and distributing Python packages is a central task in software development, particularly when projects extend beyond pure Python code. While the distutils module and its derivatives provide a standard mechanism through setup.py, they can present limitations for complex packages, especially those integrating languages such as C or Fortran.

In contrast, GNU software commonly relies on configure scripts and Makefiles, offering a language-agnostic and flexible build system. Tools that bridge these two approaches are valuable for developers who need both Python packaging support and the robustness of traditional GNU configuration workflows.

About the book

This manual documents pyconfigure (version 0.2.1, updated 21 August 2013) by Brandon Invergo. The book explains how pyconfigure enables the configuration and installation of Python packages using GNU-style configure scripts and Makefile recipes.

The content is intended for developers working with Python packages, particularly those managing complex build environments or multi-language projects. Readers are expected to have familiarity with Python packaging practices and general software build systems. The material focuses on technical implementation details, including configuration scripts, macros, and integration with existing project structures.

The manual is distributed under the GNU Free Documentation License, Version 1.2 or later.

What you will learn

Readers will understand how pyconfigure integrates GNU build conventions into Python package development. The manual covers how to install and invoke pyconfigure, how to configure package metadata, and how to customize build processes using Autoconf and Makefile templates.

The book explains:

  • How Python packages are configured using GNU-style workflows
  • How to invoke pyconf and manage PKG-INFO metadata
  • How to adapt existing projects to use pyconfigure
  • How to customize configuration through configure.ac, Makefile.in, and setup.py.in
  • How to verify Python versions, check for modules or functions, and write test programs
  • How Autoconf macros and Sphinx documentation builds integrate into the process

This makes the manual relevant for developers building cross-language packages or those seeking more flexible configuration mechanisms than standard distutils alone.

Table of contents

  • 1 Introduction
    1.1 Configuring Python packages
  • 2 Installation
  • 3 Invoking pyconf
    3.1 PKG-INFO metadata
  • 4 Existing projects
  • 5 Customization
    5.1 configure.ac
    5.1.1 Required macros
    5.1.2 Verifying the Python version
    5.1.3 Checking for a module or function
    5.1.4 Writing test programs
    5.1.5 Using Sphinx build to build documentation
    5.2 Makefile.in
    5.2.1 Makefile.in (distutils)
    5.2.2 Makefile.in (Make)
    5.3 setup.py.in
  • 6 Appendix
    6.1 Autoconf macros
  • Appendix A GNU Free Documentation License

Book details

  • Title: pyconfigure (version 0.2.1)
  • Author(s): Brandon Invergo
  • Main category: Software Engineering
  • Language: English
  • License: GNU Free Documentation License, Version 1.2 or later

More books in: Software Engineering


Legal notice: This book is shared for educational purposes only. The content is distributed under Creative Commons licenses or with explicit permission from the author. FreeProgrammingBooks may host files that comply with their respective licenses.

Want more free books?

Join our channels and receive free books, courses and tech news.