Flit command line interface¶
All operations use the
flit command, followed by one of a number of
Path to a config file specifying the module to build. The default is
Name of a repository to upload packages to. Should match a section in
~/.pypirc. The default is
pypi. See Controlling package uploads.
Show the version of Flit in use.
Show help on the command-line interface.
Show more detailed logs about what flit is doing.
Build a wheel and an sdist (tarball) from the package.
Limit to building either
Build a wheel and an sdist (tarball) from the package, and upload them to PyPI or another repository.
Limit to publishing either
sdist. You should normally publish the two formats together.
Install the package on your system.
Symlink the module into site-packages rather than copying it, so that you can test changes without reinstalling the module.
.pthfile in site-packages rather than copying the module, so you can test changes without reinstalling. This is a less elegant alternative to
--symlink, but it works on Windows, which typically doesn’t allow symlinks.
Which dependencies to install. One of
Do a user-local installation. This is the default if flit is not in a virtualenv or conda env (if the environment’s library directory is read-only and
Install into the environment. This is the default in a virtualenv or conda env (if the environment’s library directory is writable or
<path to python>¶
Install for another Python, identified by the path of the python executable. The default is to install the module for the copy of Python that is running Flit. Using this option, you can install a module for Python 2, for instance.
Create a new
pyproject.toml config file by prompting for information about
the module in the current directory.
New in version 0.10.
Setting this to any non-empty value will stop flit from making network connections (unless you explicitly ask to upload a package). This is intended for downstream packagers, so if you use this, it’s up to you to ensure any necessary dependencies are installed.
flit installwill fail when run as root on POSIX systems, because installing Python modules systemwide is not recommended. Setting this to any non-empty value allows installation as root. It has no effect on Windows.
New in version 0.11.
Set a username, password, and index URL for uploading packages. See uploading packages with environment variables for more information.
New in version 0.13.
Setting this to any non-empty value tells Flit to continue if it detects invalid metadata, instead of failing with an error. Problems will still be reported in the logs, but won’t cause Flit to stop.
If the metadata is invalid, uploading the package to PyPI may fail. This environment variable provides an escape hatch in case Flit incorrectly rejects your valid metadata. If you need to use it and you believe your metadata is valid, please open an issue.