Skip to content

Commit

Permalink
Add beta status to 'file' directive for reading dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Jun 19, 2022
1 parent 21d5b57 commit 645a53f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
1 change: 1 addition & 0 deletions changelog.d/3253.change.rst
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Enabled using ``file:`` for requirements in setup.cfg -- by :user:`akx`
(this feature is currently considered to be in **beta** stage).
1 change: 1 addition & 0 deletions changelog.d/3255.change.rst
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Enabled using ``file:`` for dependencies and optional-dependencies in pyproject.toml -- by :user:`akx`
(this feature is currently considered to be in **beta** stage).
2 changes: 1 addition & 1 deletion docs/build_meta.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ requirements.
and ``unzip -l dist/*.whl``.
On Windows systems, you can rename the ``.whl`` to ``.zip`` to be able to
inspect it from File Explorer. You can also use the above ``tar`` command in a
command prompt to inspect the `.tar.gz` file. Alternatively, there are GUI programs
command prompt to inspect the ``.tar.gz`` file. Alternatively, there are GUI programs
like `7-zip`_ that handle ``.tar.gz`` and ``.whl`` files.

In general, the backend script should be present in the ``.tar.gz`` (so the
Expand Down
8 changes: 4 additions & 4 deletions docs/userguide/declarative_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ Key Type Minimum Version No
======================= =================================== =============== ====================
zip_safe bool
setup_requires list-semi 36.7.0
install_requires file:, list-semi [#opt-6]_
extras_require file:, section [#opt-2]_, [#opt-6]_
install_requires file:, list-semi **BETA** [#opt-6]_
extras_require file:, section **BETA** [#opt-2]_, [#opt-6]_
python_requires str 34.4.0
entry_points file:, section 51.0.0
scripts list-comma
Expand All @@ -230,7 +230,7 @@ package_dir dict
package_data section [#opt-1]_
exclude_package_data section
namespace_packages list-comma [#opt-5]_
py_modules list-comma 34.4.0
py_modules list-comma 34.4.0
data_files section 40.6.0 [#opt-4]_
======================= =================================== =============== ====================

Expand Down Expand Up @@ -266,7 +266,7 @@ data_files section 40.6.0 [#
namespaces (:pep:`420`). Check :doc:`the Python Packaging User Guide
<PyPUG:guides/packaging-namespace-packages>` for more information.
.. [#opt-6] ``file:`` directives for reading requirements are supported since version 63.0.
.. [#opt-6] ``file:`` directives for reading requirements are supported since version 62.6.
The format for the file resembles a ``requirements.txt`` file,
however please keep in mind that all non-comment lines must conform with :pep:`508`
(``pip``-specify syntaxes, e.g. ``-c/-r/-e`` flags, are not supported).
Expand Down
14 changes: 9 additions & 5 deletions docs/userguide/pyproject_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,18 +180,18 @@ In the ``dynamic`` table, the ``attr`` directive [#directives]_ will read an
attribute from the given module [#attr]_, while ``file`` will read the contents
of all given files and concatenate them in a single string.

================= =================== =========================
========================== =================== =================================================================================================
Key Directive Notes
================= =================== =========================
========================== =================== =================================================================================================
``version`` ``attr``, ``file``
``readme`` ``file``
``description`` ``file`` One-line text
``classifiers`` ``file`` Multi-line text with one classifier per line
``entry-points`` ``file`` INI format following :doc:`PyPUG:specifications/entry-points`
(``console_scripts`` and ``gui_scripts`` can be included)
``dependencies`` ``file`` ``requirements.txt`` format (``#`` comments and blank lines excluded)
``optional-dependencies`` ``file`` ``requirements.txt`` format per group (``#`` comments and blank lines excluded)
========================== =================== =========================
``dependencies`` ``file`` ``requirements.txt`` format (``#`` comments and blank lines excluded) **BETA**
``optional-dependencies`` ``file`` ``requirements.txt`` format per group (``#`` comments and blank lines excluded) **BETA**
========================== =================== =================================================================================================

Supporting ``file`` for dependencies is meant for a convenience for packaging
applications with possibly strictly versioned dependencies.
Expand All @@ -203,6 +203,10 @@ Currently, when specifying ``optional-dependencies`` dynamically, all of the gro
must be specified dynamically; one can not specify some of them statically and
some of them dynamically.

Also note that the file format for specifying dependencies resembles a ``requirements.txt`` file,
however please keep in mind that all non-comment lines must conform with :pep:`508`
(``pip``-specify syntaxes, e.g. ``-c/-r/-e`` flags, are not supported).

----

.. rubric:: Notes
Expand Down

0 comments on commit 645a53f

Please sign in to comment.