Fix development installs with
flit install --symlinkand
--pth-file, which were broken in 3.5.0, especially for packages using a
srcfolder (PR #472).
You can now use Flit to distribute a module or package inside a namespace package (as defined by PEP 420). To do this, specify the import name of the concrete, inner module you are packaging - e.g.
name = "sphinxcontrib.foo"- either in the
[project]table, or under
[tool.flit.module]if you want to use a different name on PyPI (PR #468).
Flit no longer generates a
setup.pyfile in sdists (
.tar.gzpackages) by default (PR #462). Modern packaging tools don’t need this. You can use the
--setup-pyflag to keep adding it for now, but this will probably be removed at some point in the future.
flit inithandles authors’ names with non-ASCII characters (PR #460).
flit initgenerates a LICENSE file, the new
pyproject.tomlnow references it (PR #467).
Python 3.6 or above is now required, both for
flit publish, and a warning when neither this nor
--no-setup-pyare specified (PR #431). A future version will stop generating
setup.pyfiles in sdists by default.
flit publishto specify an alternative path to a
.pypircconfig file describing package indexes (PR #434).
Fix installing dependencies specified in a
[project]table (PR #433).
PKG-INFOfiles in sdists are now generated the same way as
METADATAin wheels, fixing some issues with sdists (PR #410).
flit publishnow sends SHA-256 hashes, fixing uploads to GitLab package repositories (PR #416).
Experimental support for specifying metadata in a
pyproject.tomlas specified by PEP 621 (PR #393). If you try using this, please specify
requires = ["flit_core >=3.2.0,<3.3"]in the
[build-system]table for now, in case it needs to change for the next release.
Fix writing METADATA file with multi-line information in certain fields such as
Fix building wheel when a directory such as LICENSES appears in the project root directory (PR #401).
Projects must now provide Flit with information in
pyproject.tomlfiles, not the older
flit.iniformat (PR #338).
flit_coreonce again requires Python 3 (>=3.4). Packages that support Python 2 can still be built by
flit_core2.x, but can’t rely on new features (PR #342).
flit installfromcommand was removed (PR #334). You can use
pip install git+https://github.com/...instead.
Features and fixes:
Fix building sdists from a git repository with non-ASCII characters in filenames (PR #346).
Fix identifying the version number when the code contains a subscript assignment before
__version__ =(PR #348).
Script entry points can now use a class method (PR #359).
Set suitable permission bits on metadata files in wheels (PR #256).
Fixed line endings in the
RECORDfile when installing on Windows (PR #368).
flit initwill check for a README in the root of the project and automatically set it as
Pygments is not required for checking reStructuredText READMEs (PR #357).
Packages where the version number can be recognised without executing their code don’t need their dependencies installed to build, which should make them build faster (PR #361).
Ensure the installed
RECORDfile is predictably ordered (PR #366).
Fix selecting files from a git submodule to include in an sdist (PR #324).
Fix checking classifiers when no writeable cache directory is available (PR #319).
Better errors when trying to install to a mis-spelled or missing Python interpreter (PR #331).
upload(PR #322). Passing the option like this is deprecated, and you should now pass it after
Allow underscores in package names with Python 2 (PR #305).
--no-setup-pyoption to build sdists without a backwards-compatible
setup.pyfile (PR #311).
Fix the generated
setup.pyfile for packages using a
src/layout (PR #303).
Fix detecting when more than one file matches the module name specified (PR #307).
Fix installing to a venv on Windows with the
--pythonoption (PR #300).
Don’t echo the command in scripts installed with
--pth-fileon Windows (PR #310).
Use compression when adding files to wheels.
intreehooksshim package to load its bootstrapping backend, until a released version of pip supports the standard
The build backend works on Python 2, so tools like pip should be able to install
packages built with flit from source on Python 2.
flit command requires Python 3.5 or above.
You will need to change the build-system table in your
to look like this:
[build-system] requires = ["flit_core >=2,<4"] build-backend = "flit_core.buildapi"
Other changes include:
Support for storing your code under a
src/folder (PR #260). You don’t need to change any configuration if you do this.
Options to control what files are included in an sdist - see Sdist section for the details.
Requirements can specify a URL ‘direct reference’, as an alternative to a version number, with the syntax defined in PEP 440:
requests @ https://example.com/requests-2.22.0.tar.gz.
Fix the shebang of scripts installed with the
--pythonoption and the
--symlinkflag (PR #286).
--deps developnow installs normal dependencies as well as development dependencies.
Author email is no longer required in the metadata table (PR #289).
More error messages are now shown without a traceback (PR #254)
Fix for building sdists from a subdirectory in a Mercurial repository (PR #233).
Fix for getting the docstring and version from modules defining their encoding (PR #239).
Fix for installing packages with
flit installfrom(PR #221).
Packages with requirements no longer get a spurious
Provides-Extra: .nonemetadata entry (#228).
Better check of whether
python-requiresincludes any Python 2 version (PR #232).
Better check of home page URLs in
flit init(PR #230).
Better error message when the description file is not found (PR #234).
Updated a help message to refer to
Improve tests of
flit init(PR #229).
Fix for installing packages with
requests_downloadan extra dependency, to avoid a circular build dependency. To use
flit installfrom, you can install with
pip install flit[installfrom]. Note that the
installfromsubcommand is deprecated, as it will soon be possible to use pip to install Flit projects directly from a VCS URL.
Fixes for packages specifying
requires-extra: sdists should now work, and environment markers can be used together with
flit installfromwithout a config file present in the working directory.
The error message for a missing or empty docstring tells you what file the docstring should be in.
Improvements to documentation on version selectors for requirements.
Packages can now have ‘extras’, specified as
requires-extrain the pyproject.toml file. These are additional dependencies for optional features.
home-pagemetadata field is no longer required.
Additional project URLs are now validated.
flit -Vis now equivalent to
Various improvements to documentation.
The description file may now be written in reStructuredText, Markdown or plain text. The file extension should indicate which of these formats it is (
.txt). Previously, only reStructuredText was officially supported.
Multiple links (e.g. documentation, bug tracker) can now be specified in a new [tool.flit.metadata.urls] section of
Dependencies are now correctly installed to the target Python when you use the
Dependencies are only installed to the Python where Flit is running if it fails to get the docstring and version number without them.
The commands deprecated in 0.13—
flit register—have been removed.
Although version 1.0 sounds like a milestone, there’s nothing that makes this release especially significant. It doesn’t represent a step change in stability or completeness. Flit has been gradually maturing for some time, and I chose this point to end the series of 0.x version numbers.
Better validation of several metadata fields (
home-page), and of the version number.
FLIT_ALLOW_INVALIDenvironment variable to ignore validation failures in case they go wrong.
flit sdistsubcommands: use flit build.
flit register: you can no longer register a package separately from uploading it.
Fix building and installing packages with a
-in the distribution name.
Fix numbering in README.
New tool to convert
python3 -m flit.tomlify
Use the PAX tar format for sdists, as specified by PEP 517.
Restore dependency on
Add some missing options to documentation of
Rearrange environment variables in the docs.
Switch the config to
pyproject.tomlby default instead of
flit.ini, and implement the PEP 517 API.
A new option
--pth-fileallows for development installation on Windows (where
--symlinkusually won’t work).
Normalise file permissions in the zip file, making builds more reproducible across different systems.
Sdists (.tar.gz packages) can now also be reproducibly built by setting
For most modules, Flit can now extract the version number and docstring without importing it. It will still fall back to importing where getting these from the AST fails.
flit buildwill build the wheel from the sdist, helping to ensure that files aren’t left out of the sdist.
All list fields in the INI file now ignore blank lines (
Fix the path separator in the
RECORDfile of a wheel built on Windows.
Some minor fixes to building reproducible wheels.
If building a wheel fails, the temporary file created will be cleaned up.
Various improvements to docs and README.
Explicitly open various files as UTF-8, rather than relying on locale encoding.
Link to docs from README.
Better test coverage, and a few minor fixes for problems revealed by tests.
Fixed a bug causing failed uploads when the password is entered in the terminal.
A couple of behaviour changes when uploading to warehouse.
Fixed a bug when you use flit to build an sdist from a subdirectory inside a VCS checkout. The VCS is now correctly detected.
Fix the rst checker for newer versions of docutils, by upgrading the bundled copy of readme_renderer.
Flit can now build sdists (tarballs) and upload them to PyPI, if your code is in a git or mercurial repository. There are new commands:
flit buildbuilds both a wheel and an sdist.
flit publishbuilds and uploads a wheel and an sdist.
Smarter ways of getting the information needed for upload:
If you have the keyring package installed, flit can use it to store your password, rather than keeping it in plain text in
~/.pypircdoes not already exist, and you are prompted for your username, flit will write it into that file.
Include ‘LICENSE’ or ‘COPYING’ files in wheels.
flit install --symlinkinside a virtualenv.
Downstream packagers can use the
FLIT_NO_NETWORKenvironment variable to stop flit downloading data from the network.
flit installfromnow take an optional
--pythonargument, with the path to the Python executable you want to install it for. Using this, you can install modules to Python 2.
Installing a module normally (without
--symlink) builds a wheel and uses pip to install it, which should work better in some corner cases.
flit installfromsubcommand to install a project from a source archive, such as from Github.
Reproducible builds - you can produce byte-for-byte identical wheels.
A warning for non-canonical version numbers according to PEP 440.
Fix for installing projects on Windows.
Better error message when module docstring is only whitespace.
dev-requiresfield in the config file for development requirements, used when doing
flit installto control which dependencies are installed.
Flit can now be invoked with
python -m flit.
flit installnow ensures requirements specified in
flit.iniare installed, using pip.
If you specify a description file, flit now warns you if it’s not valid reStructuredText (since invalid reStructuredText is treated as plain text on PyPI).
Improved the error message for mis-spelled keys in
flit initcommand to quickly define the essential basic metadata for a package.
Support for entry points.
flit registercommand to register a package without uploading it, for when you want to claim a name before you’re ready to release.
--repositoryoption for specifying an alternative PyPI instance.
--debugflag to show debug-level log messages.
Better error messages when the module docstring or
Users can now specify
dist-namein the config file if they need to use different names on PyPI and for imports.
Classifiers are now checked against a locally cached list of valid classifiers.
Packages can be locally installed into environments for development.
Local installation now creates a PEP 376
.dist-infofolder instead of