flot


Nameflot JSON
Version 0.7.2 PyPI version JSON
download
home_page
SummaryFlot is a simple tool to easily build multiple packages (wheel and sdist) from a single repo without having to create a subdir or another repo for each package, and by simply listing which files to include.
upload_time2023-12-29 22:04:16
maintainer
docs_urlNone
author
requires_python>=3.8
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            **flot** is an easy tool to build Python packages (wheel and sdist) with no
magic and guesswork. Flot can also create one or more Python packages
from a single code tree, just by listing which files you want to include.

Because "Explicit is better than implicit" and "Simple is better than complex"

``flot`` takes the magic and guesswork away of which files are included in a
Python package: you just specify a list of paths or glob patterns for the files
you want to include or exclude in your package. No more mystery! Include data
files, multiple modules or any files as easily as listing their paths.

With ``flot`` you can also have multiple ``pyproject.toml`` files to enjoy the
benefits of a simpler monolithic code repo and still be able to easily share
and package multiple Pypi packages and foster the reuse of subsets of your larger
project, without having some imposed directory structure.

Unlike ``flot``, other Python build tools assume that you can only build a
single Python package from a given directory or repository and use a lot of
magic to find which module or file to include in your package.

Also, while ``flot`` promotes declarative builds, it is also possible to run
arbitrary Python scripts when you need more power.

See also `Why use Flot? <https://github.com/nexB/flot/blob/main/docs/rationale.rst>`_

Flot is derived from and based on a modified Flit https://github.com/pypa/flit/
by Thomas Kluyver @takluyver

It was started following this discussion https://github.com/pypa/flit/discussions/669


Install
-------

::

    pip install flot


Usage
-----

Say you're writing a module ``foobar`` - either as a single file ``foobar.py``,
or as a directory - and you want to distribute it.

1. Create a ``pyproject.toml`` file. It will look something like this::

       [build-system]
       requires = ["flot"]
       build-backend = "flot.buildapi"

       [project]
       name = "foobar"
       version = "1.0.0"
       description = "foobar frobinator"

       [tool.flot]
       includes = ["foobar.py"]

   You can edit this file to add other metadata, like URL for example to set up
   command line scripts or add your dependencies. See the ``pyproject.toml``
   documentation at https://github.com/nexB/flot/blob/main/docs/pyproject_toml.rst

2. Run this command to build your wheel in the dist/ directory::

       flot

Once your package is published to PyPI (I use the standard ``twine`` tool for this),
people can install it using ``pip`` or any other Python packaging tool just like
any other package. 

3. Say you're writing a second module ``baz`` as a single file ``baz.py``.
   Just create a second file named for instance ``baz-pyproject.toml``.
   It will look something like this::

       [build-system]
       requires = ["flot"]
       build-backend = "flot.buildapi"

       [project]
       name = "baz"
       version = "1.0.0"
       description = "baz frobinator"

       [tool.flot]
       includes = ["baz.py"]

4. Run this command to build a second wheel in the dist/ directory::

       flot --pyproject baz-pyproject.toml


You now have a second wheel built from the same tree with different content.


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "flot",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Philippe Ombredanne <pombredanne@nexb.com>",
    "keywords": "",
    "author": "",
    "author_email": "Philippe Ombredanne <pombredanne@nexb.com>, Thomas Kluyver <thomas@kluyver.me.uk>",
    "download_url": "https://files.pythonhosted.org/packages/43/92/e544a5ed179e4cf906c1c28191416a3285ea199b48eb5d6e0d364be11a28/flot-0.7.2.tar.gz",
    "platform": null,
    "description": "**flot** is an easy tool to build Python packages (wheel and sdist) with no\nmagic and guesswork. Flot can also create one or more Python packages\nfrom a single code tree, just by listing which files you want to include.\n\nBecause \"Explicit is better than implicit\" and \"Simple is better than complex\"\n\n``flot`` takes the magic and guesswork away of which files are included in a\nPython package: you just specify a list of paths or glob patterns for the files\nyou want to include or exclude in your package. No more mystery! Include data\nfiles, multiple modules or any files as easily as listing their paths.\n\nWith ``flot`` you can also have multiple ``pyproject.toml`` files to enjoy the\nbenefits of a simpler monolithic code repo and still be able to easily share\nand package multiple Pypi packages and foster the reuse of subsets of your larger\nproject, without having some imposed directory structure.\n\nUnlike ``flot``, other Python build tools assume that you can only build a\nsingle Python package from a given directory or repository and use a lot of\nmagic to find which module or file to include in your package.\n\nAlso, while ``flot`` promotes declarative builds, it is also possible to run\narbitrary Python scripts when you need more power.\n\nSee also `Why use Flot? <https://github.com/nexB/flot/blob/main/docs/rationale.rst>`_\n\nFlot is derived from and based on a modified Flit https://github.com/pypa/flit/\nby Thomas Kluyver @takluyver\n\nIt was started following this discussion https://github.com/pypa/flit/discussions/669\n\n\nInstall\n-------\n\n::\n\n    pip install flot\n\n\nUsage\n-----\n\nSay you're writing a module ``foobar`` - either as a single file ``foobar.py``,\nor as a directory - and you want to distribute it.\n\n1. Create a ``pyproject.toml`` file. It will look something like this::\n\n       [build-system]\n       requires = [\"flot\"]\n       build-backend = \"flot.buildapi\"\n\n       [project]\n       name = \"foobar\"\n       version = \"1.0.0\"\n       description = \"foobar frobinator\"\n\n       [tool.flot]\n       includes = [\"foobar.py\"]\n\n   You can edit this file to add other metadata, like URL for example to set up\n   command line scripts or add your dependencies. See the ``pyproject.toml``\n   documentation at https://github.com/nexB/flot/blob/main/docs/pyproject_toml.rst\n\n2. Run this command to build your wheel in the dist/ directory::\n\n       flot\n\nOnce your package is published to PyPI (I use the standard ``twine`` tool for this),\npeople can install it using ``pip`` or any other Python packaging tool just like\nany other package. \n\n3. Say you're writing a second module ``baz`` as a single file ``baz.py``.\n   Just create a second file named for instance ``baz-pyproject.toml``.\n   It will look something like this::\n\n       [build-system]\n       requires = [\"flot\"]\n       build-backend = \"flot.buildapi\"\n\n       [project]\n       name = \"baz\"\n       version = \"1.0.0\"\n       description = \"baz frobinator\"\n\n       [tool.flot]\n       includes = [\"baz.py\"]\n\n4. Run this command to build a second wheel in the dist/ directory::\n\n       flot --pyproject baz-pyproject.toml\n\n\nYou now have a second wheel built from the same tree with different content.\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Flot is a simple tool to easily build multiple packages (wheel and sdist) from a single repo without having to create a subdir or another repo for each package, and by simply listing which files to include.",
    "version": "0.7.2",
    "project_urls": {
        "Source": "https://github.com/nexB/flot"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "54989fc7924de9ebff67602f6934fff7411d089468d5aee878d7fd2f9d8be1f5",
                "md5": "463625d6e51af36d712ad835b9f8c664",
                "sha256": "0f2d7d787f6072e96528228b6eeb2baf383b3fe7e9b344d704a48a5b8ed64fbd"
            },
            "downloads": -1,
            "filename": "flot-0.7.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "463625d6e51af36d712ad835b9f8c664",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 21905,
            "upload_time": "2023-12-29T22:04:14",
            "upload_time_iso_8601": "2023-12-29T22:04:14.516915Z",
            "url": "https://files.pythonhosted.org/packages/54/98/9fc7924de9ebff67602f6934fff7411d089468d5aee878d7fd2f9d8be1f5/flot-0.7.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4392e544a5ed179e4cf906c1c28191416a3285ea199b48eb5d6e0d364be11a28",
                "md5": "c0f7fdef79d5ebbccca49fb084c745c1",
                "sha256": "9e67acd59d78b216c2779f6acc42e104f9a46d0589b8b1e96ae1b21eaf1852fe"
            },
            "downloads": -1,
            "filename": "flot-0.7.2.tar.gz",
            "has_sig": false,
            "md5_digest": "c0f7fdef79d5ebbccca49fb084c745c1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 43863,
            "upload_time": "2023-12-29T22:04:16",
            "upload_time_iso_8601": "2023-12-29T22:04:16.166834Z",
            "url": "https://files.pythonhosted.org/packages/43/92/e544a5ed179e4cf906c1c28191416a3285ea199b48eb5d6e0d364be11a28/flot-0.7.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-29 22:04:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nexB",
    "github_project": "flot",
    "github_not_found": true,
    "lcname": "flot"
}
        
Elapsed time: 0.53438s