@@ -78,9 +78,34 @@ supports both installing your ``project.dependencies`` as well as your
78
78
``project.optional-dependencies ``. Thanks to the fact that this is an
79
79
official standard, you can use ``pip-compile `` to pin the dependencies
80
80
in projects that use modern standards-adhering packaging tools like
81
- `Hatch <https://hatch.pypa.io/ >`_ or `flit <https://flit.pypa.io/ >`_.
81
+ `Setuptools <https://setuptools.pypa.io >`_ , `Hatch <https://hatch.pypa.io/ >`_
82
+ or `flit <https://flit.pypa.io/ >`_.
82
83
83
- Suppose you have a Django application that is packaged using ``Hatch ``, and you
84
+ Suppose you have a 'foobar' Python application that is packaged using ``Setuptools ``,
85
+ and you want to pin it for production. You can declare the project metadata as:
86
+
87
+ .. code-block :: toml
88
+
89
+ [build-system]
90
+ requires = ["setuptools", "setuptools-scm"]
91
+ build-backend = "setuptools.build_meta"
92
+
93
+ [project]
94
+ name = "foobar"
95
+ description = "foobar description"
96
+ classifiers = [
97
+ "Programming Language :: Python",
98
+ "Programming Language :: Python :: 3",
99
+ ]
100
+ dynamic = ["version", "dependencies"]
101
+
102
+ [project.urls]
103
+ homepage = "https://github.com/xyz/foobar"
104
+
105
+ [tool.setuptools.dynamic]
106
+ dependencies = { file = [".config/requirements.in"] }
107
+
108
+ If you have a Django application that is packaged using ``Hatch ``, and you
84
109
want to pin it for production. You also want to pin your development tools
85
110
in a separate pin file. You declare ``django `` as a dependency and create an
86
111
optional dependency ``dev `` that includes ``pytest ``:
0 commit comments