Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add discussion How to modernize a setup.py project #1341

Closed

Conversation

sinoroc
Copy link
Contributor

@sinoroc sinoroc commented Nov 4, 2023

@sinoroc sinoroc force-pushed the add-discussion-modernize-setup-py-project branch 3 times, most recently from 77f99bc to 6752487 Compare November 4, 2023 19:23
Comment on lines 46 to 58
Where to start?
===============

The :term:`project` must contain a ``pyproject.toml`` file at the root of its source tree
that contains a ``[build-system]`` table like so:

.. code:: toml

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"


This is the standardized method of letting :term:`build frontends <Build Frontend>` know
that :ref:`setuptools` is the :term:`build backend <Build Backend>` for this project.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would note here that adding this enables built-time isolation by default which naturally leads into the next section (build-time dependencies).

Somewhere lower down there could be a section specifically about build isolation and how to disable it when using pip or build. That section could also say why you might want to disable build isolation e.g. to pin the versions of build requirements.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done :)

@sinoroc sinoroc force-pushed the add-discussion-modernize-setup-py-project branch from 6752487 to be97842 Compare November 5, 2023 18:43
========================================

Yes. This is strongly recommended.
The presence of a ``pyproject.toml`` file itself does not bring much.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use the :file: role for these?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done :)

How to handle packaging metadata?
=================================

All static metadata can be moved to a ``[project]`` table in the ``pyproject.toml`` file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe link to the Declaring project metdata spec here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done :)

@@ -0,0 +1,221 @@
==============================================
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
==============================================
.. _`modernize setup.py project`:
==============================================

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done :)

@sinoroc sinoroc force-pushed the add-discussion-modernize-setup-py-project branch from be97842 to 12c7a24 Compare November 6, 2023 20:56
Comment on lines 17 to 20
.. todo::

Add note that the presence of pyproject.toml changes the default behavior of pip
to use build isolation?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This todo is done now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!
removed

@sinoroc sinoroc force-pushed the add-discussion-modernize-setup-py-project branch from 12c7a24 to ef508ed Compare November 6, 2023 22:18
@sinoroc sinoroc closed this Nov 8, 2023
@sinoroc sinoroc deleted the add-discussion-modernize-setup-py-project branch November 8, 2023 21:08
@sinoroc
Copy link
Contributor Author

sinoroc commented Nov 8, 2023

Now at #1371

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants