Giter Club home page Giter Club logo

setuptools_configure's Introduction

setuptools_configure

setuptools_configure adds a configure step to setuptools-based projects, that allows you to define variables that can be substituted in the distribution metadata or any project file.

Every major build system like autotools, cmake or scons, includes facilities to configure builds.

Basic Usage

..code:: python

from setuptools_configure import setup

setup(name='my-project',

version='1.0', substitutions={

'': '',

}, )

Predefined Variables

setuptools_configure already predefines the following variables for you. You may overwrite these variables.

PACKAGE_NAME
The value given to the name keyword argument of the setup function.
PACKAGE_VERSION, PACKAGE_AUTHOR, PACKAGE_AUTHOR_EMAIL, PACKAGE_URL
Like PACKAGE_NAME.

Configuring Files

Exporting to Python

Most of the time, you want to be able to access the build configuration during the runtime of your code. You could write a template, e.g constants.py.in and declare it in configure_files. However, this is tedious and error-prone, as you have to

You can declare constants_module which contains all substitution variables and their values and which will be generated automatically by setuptools_configure during the configure step.

Dynamic Variables

Caching

Limitations

Most setuptools extensions can be used without importing them directly in the setup.py file.

Either they are just installed and their commands and keywords are available through pkg_resources entry point mechanism or they can be depended on explicitly with the setup_requires keyword argument of the setup function.

setuptools_configure however can not work this way, due to the implementation of distutils and setuptools.

A custom setup function is necessary, that is executed before setuptools does anything. This means that you have to have setuptools_configure installed before you can run setup.py.

Changelog

0.1.0 (2016-07-28)

  • Initial release

setuptools_configure's People

Contributors

sebschrader avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.