Giter Site home page Giter Site logo

setl's Introduction

Setl

Travis CI Status

Documentation Status

Setl (pronounced like settle) is a simple way to work with PEP 518 projects with Setuptools as the backend.

The interface is strongly influenced by Flit.

Install

The recommended install method is pipx:

pipx install setl

Setl needs to be installed with Python 3.7 or later, but can be used to build projects using older Python with the --python option.

Quickstart for Setuptools Veterans

Aside from the usual Setuptools configurations, you need to create a file pyproject.toml beside setup.py, with the following content:

[build-system]
requires = ["setuptools>=43", "wheel"]

Command comparisons to Setuptools:

Setl Setuptools approximation
setl develop setup.py develop
setl build setup.py egg_info build
setl publish
setup.py egg_info build sdist bdist_wheel
twine upload

But Why?

The main difference is how build and runtime dependencies are installed.

Traditionally Setuptools projects use setup_requires, but that has various problems and is discouraged in favour of using PEP 518 to specify build time dependencies instead. But Setuptools's project management commands do not handle PEP 518 declarations, leaving the user to install those build dependencies manually before using setup.py. Setl commands mimic pip's build setup before calling their setup.py counterparts, so the build environment stays up-to-date.

Similarly, setup.py develop installs runtime dependencies with easy_install, instead of pip. It therefore does not respect PEP 518 declarations in those dependencies, and may even fail if one of the dependencies does not support the "legacy mode" build process. setl develop works around this by pip install-ing runtime dependencies before calling setup.py develop --no-deps, so dependencies are installed in the modern format.

The rest are more about providing more useful defaults. It is easy to forget to re-build egg-info when you modify metadata, so Setl tries to be helpful. Nowadays people almost always want to build both sdist and wheel, so Setl does it by default. The PyPA recommends against using setup.py upload, so Setl bundles Twine for uploading instead. Nothing rocket science.

Next Steps

  • Read the documentation for detailed command descriptions and inner workings.
  • View the source and help contribute to the project.

setl's People

Contributors

uranusjr avatar

Watchers

 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.