Fwd: [Distutils] [setuptools] Install entry point only if extras_require are satisfied?

12 views
Skip to first unread message

Sumana Harihareswara

unread,
Mar 5, 2020, 9:36:25 AM3/5/20
to pypa-dev
Forwarding/cross-posting in case any of you can help.


-------- Forwarded Message --------
Subject: [Distutils] [setuptools] Install entry point only if
extras_require are satisfied?
Date: Sat, 29 Feb 2020 08:00:05 +0100
From: Jonatan Palsson <jona...@gmail.com>
To: distut...@python.org

Hi,

I'm modifying a python project which uses setuptools for installation.
The project installs an entry point as such:

setup_args["entry_points"] = { "console_scripts": ["w1thermsensor
= w1thermsensor.cli:cli [CLI]"] }

where [CLI] is a reference to an extra_requires entry. This entry
looks like this:

extras_require=dict(CLI="click>=7.0")

With these two lines, the current behavior is that the w1thermsensor
entry point is *always* installed when "setup.py install" is invoked,
but the entry point will cause an error if its dependencies are not
available.

I would like to change the behavior, so that the entry point is *not
installed* if the extra dependencies are not available (and perhaps
also show a warning, indicating that this entry point has not been
installed).

How can I do this?

Cheers,
Jonatan
--
Distutils-SIG mailing list -- distut...@python.org
To unsubscribe send an email to distutils...@python.org
https://mail.python.org/mailman3/lists/distutils-sig.python.org/
Message archived at
https://mail.python.org/archives/list/distut...@python.org/message/UGKNY6C2Y4J5VEA4S2MG77I24QNCN4VL/
Reply all
Reply to author
Forward
0 new messages