Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.4
2 Name: flit
3 Version: 3.12.0
4 Summary: A simple packaging tool for simple packages.
5 Author-email: Thomas Kluyver <[email protected]>
6 Requires-Python: >=3.8
7 Description-Content-Type: text/x-rst
8 License-Expression: BSD-3-Clause
9 Classifier: Intended Audience :: Developers
10 Classifier: Programming Language :: Python :: 3
11 Classifier: Topic :: Software Development :: Libraries :: Python Modules
12 License-File: LICENSE
13 Requires-Dist: flit_core >=3.12.0
14 Requires-Dist: requests
15 Requires-Dist: docutils
16 Requires-Dist: tomli-w
17 Requires-Dist: pip
18 Requires-Dist: sphinx ; extra == "doc"
19 Requires-Dist: sphinxcontrib_github_alt ; extra == "doc"
20 Requires-Dist: pygments-github-lexers ; extra == "doc"
21 Requires-Dist: testpath ; extra == "test"
22 Requires-Dist: responses ; extra == "test"
23 Requires-Dist: pytest>=2.7.3 ; extra == "test"
24 Requires-Dist: pytest-cov ; extra == "test"
25 Requires-Dist: tomli ; extra == "test"
26 Project-URL: Changelog, https://flit.pypa.io/en/stable/history.html
27 Project-URL: Documentation, https://flit.pypa.io
28 Project-URL: Source, https://github.com/pypa/flit
29 Provides-Extra: doc
30 Provides-Extra: test
31
32 **Flit** is a simple way to put Python packages and modules on PyPI.
33 It tries to require less thought about packaging and help you avoid common
34 mistakes.
35 See `Why use Flit? <https://flit.readthedocs.io/en/latest/rationale.html>`_ for
36 more about how it compares to other Python packaging tools.
37
38 Install
39 -------
40
41 ::
42
43 $ python3 -m pip install flit
44
45 Flit requires Python 3 and therefore needs to be installed using the Python 3
46 version of pip.
47
48 Python 2 modules can be distributed using Flit, but need to be importable on
49 Python 3 without errors.
50
51 Usage
52 -----
53
54 Say you're writing a module ``foobar`` — either as a single file ``foobar.py``,
55 or as a directory — and you want to distribute it.
56
57 1. Make sure that foobar's docstring starts with a one-line summary of what
58 the module is, and that it has a ``__version__``:
59
60 .. code-block:: python
61
62 """An amazing sample package!"""
63
64 __version__ = "0.1"
65
66 2. Install flit if you don't already have it::
67
68 python3 -m pip install flit
69
70 3. Run ``flit init`` in the directory containing the module to create a
71 ``pyproject.toml`` file. It will look something like this:
72
73 .. code-block:: ini
74
75 [build-system]
76 requires = ["flit_core >=3.2,<4"]
77 build-backend = "flit_core.buildapi"
78
79 [project]
80 name = "foobar"
81 authors = [{name = "Sir Robin", email = "[email protected]"}]
82 dynamic = ["version", "description"]
83
84 [project.urls]
85 Home = "https://github.com/sirrobin/foobar"
86
87 You can edit this file to add other metadata, for example to set up
88 command line scripts. See the
89 `pyproject.toml page <https://flit.readthedocs.io/en/latest/pyproject_toml.html#scripts-section>`_
90 of the documentation.
91
92 If you have already got a ``flit.ini`` file to use with older versions of
93 Flit, convert it to ``pyproject.toml`` by running ``python3 -m flit.tomlify``.
94
95 4. Run this command to upload your code to PyPI::
96
97 flit publish
98
99 Once your package is published, people can install it using *pip* just like
100 any other package. In most cases, pip will download a 'wheel' package, a
101 standard format it knows how to install. If you specifically ask pip to install
102 an 'sdist' package, it will install and use Flit in a temporary environment.
103
104
105 To install a package locally for development, run::
106
107 flit install [--symlink] [--python path/to/python]
108
109 Flit packages a single importable module or package at a time, using the import
110 name as the name on PyPI. All subpackages and data files within a package are
111 included automatically.
112