Skip to content

Commit df1602a

Browse files
authored
add python_requires example
1 parent 0c302d2 commit df1602a

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

docs/userguide/dependency_management.rst

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,4 +341,25 @@ In some cases, you might need to specify the minimum required python version.
341341
This is handled with the ``python_requires`` keyword supplied to ``setup.cfg``
342342
or ``setup.py``.
343343

344-
Example WIP
344+
345+
.. tab:: setup.cfg
346+
347+
.. code-block:: ini
348+
349+
[metadata]
350+
name = Project-B
351+
#...
352+
353+
[options]
354+
#...
355+
python_requires = >=3.6
356+
357+
.. tab:: setup.py
358+
359+
.. code-block:: python
360+
361+
setup(
362+
name="Project-B",
363+
python_requires=[">=3.6"],
364+
...,
365+
)

0 commit comments

Comments
 (0)