From 023c0da87998c00bf0a15e036c1963411cc61b90 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Thu, 4 May 2023 23:32:55 +0200 Subject: [PATCH] Add deprecation warning about setup.py --- docs/source/int_source.rst | 13 ++++++++----- setup.py | 8 ++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/docs/source/int_source.rst b/docs/source/int_source.rst index f9075467..3ae3bfaf 100644 --- a/docs/source/int_source.rst +++ b/docs/source/int_source.rst @@ -25,6 +25,14 @@ running: python setup.py help +.. warning:: + + Calling ``setup.py install`` has been deprecated for a while, and this approach is no longer + actively supported in novelWriter either. + + In a future version, the packaging and asset build tools part of the current ``setup.py`` file + will be moved to another script and the ``setup.py`` file removed entirely. + .. _a_source_depend: @@ -96,11 +104,6 @@ install, here with example version number 2.0.7, but your may be different: pip install --user dist/novelWriter-2.0.7-py3-none-any.whl -.. warning:: - - Calling ``setup.py install`` has been deprecated for a while, and this approach is no longer - actively supported in novelWriter either. - .. _a_source_i18n: diff --git a/setup.py b/setup.py index b9baf406..a11eb5e5 100755 --- a/setup.py +++ b/setup.py @@ -2064,6 +2064,14 @@ if __name__ == "__main__": # Run the standard setup import setuptools # noqa: F401 + import warnings # noqa: F401 + warnings.warn( + "The setuptools section of setup.py is deprecated and will be removed " + "in a future release and the setup.py file will be renamed to avoid " + "conflicts with build tools. Please don't use the 'setup.py install' " + "command, and instead use the pip and build commands.", + DeprecationWarning + ) setuptools.setup() # END Main