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 <jonata...@gmail.com>
To: distutils-...@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 -- distutils-...@python.org
To unsubscribe send an email to distutils-sig-le...@python.org
https://mail.python.org/mailman3/lists/distutils-sig.python.org/
Message archived at https://mail.python.org/archives/list/distutils-...@python.org/message/UGKNY6C2Y4J5VEA4S2MG77I24QNCN4VL/

--
You received this message because you are subscribed to the Google Groups 
"pypa-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pypa-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pypa-dev/9c02d2a2-d24b-af1a-76e2-4475188caea7%40changeset.nyc.

Reply via email to