Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.5
2 Name: flit
3 Version: 4.1.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 >=4.1.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 Import-Name: flit
32
33 **Flit** is a simple way to put Python packages and modules on PyPI.
34 It tries to require less thought about packaging and help you avoid common
35 mistakes.
36 See `Why use Flit? <https://flit.readthedocs.io/en/latest/rationale.html>`_ for
37 more about how it compares to other Python packaging tools.
38
39 Install
40 -------
41
42 ::
43
44 $ python3 -m pip install flit
45
46 Flit requires Python 3 and therefore needs to be installed using the Python 3
47 version of pip.
48
49 Python 2 modules can be distributed using Flit, but need to be importable on
50 Python 3 without errors.
51
52 Usage
53 -----
54
55 Say you're writing a module ``foobar`` — either as a single file ``foobar.py``,
56 or as a directory — and you want to distribute it.
57
58 1. Make sure that foobar's docstring starts with a one-line summary of what
59 the module is, and that it has a ``__version__``:
60
61 .. code-block:: python
62
63 """An amazing sample package!"""
64
65 __version__ = "0.1"
66
67 2. Install flit if you don't already have it::
68
69 python3 -m pip install flit
70
71 3. Run ``flit init`` in the directory containing the module to create a
72 ``pyproject.toml`` file. It will look something like this:
73
74 .. code-block:: ini
75
76 [build-system]
77 requires = ["flit_core >=3.2,<4"]
78 build-backend = "flit_core.buildapi"
79
80 [project]
81 name = "foobar"
82 authors = [{name = "Sir Robin", email = "[email protected]"}]
83 dynamic = ["version", "description"]
84
85 [project.urls]
86 Home = "https://github.com/sirrobin/foobar"
87
88 You can edit this file to add other metadata, for example to set up
89 command line scripts. See the
90 `pyproject.toml page <https://flit.readthedocs.io/en/latest/pyproject_toml.html#scripts-section>`_
91 of the documentation.
92
93 If you have already got a ``flit.ini`` file to use with older versions of
94 Flit, convert it to ``pyproject.toml`` by running ``python3 -m flit.tomlify``.
95
96 4. Run this command to upload your code to PyPI::
97
98 flit publish
99
100 Once your package is published, people can install it using pip just like
101 any other package. In most cases, pip will download a 'wheel' package, a
102 standard format it knows how to install. If you specifically ask pip to install
103 an 'sdist' package, it will install and use Flit in a temporary environment.
104
105
106 To install a package locally for development, run::
107
108 flit install [--symlink] [--python path/to/python]
109
110 Flit packages a single importable module or package at a time, using the import
111 name as the name on PyPI. All subpackages and data files within a package are
112 included automatically.
113