Commits

Ralf Schmitt committed 6dcc729

do not embed libev and c-ares if environment variable gevent_embed is set to no

It was previously possible to do the same by removing the source
repositories. But that's not easy to do when installing with pip.

The following command now installs without the embedded libraries:

,----
| gevent_embed=no pip install gevent
`----

  • Participants
  • Parent commits 4752386

Comments (0)

Files changed (1)

 __version__ = re.search("__version__\s*=\s*'(.*)'", open('gevent/__init__.py').read(), re.M).group(1)
 assert __version__
 
-libev_embed = os.path.exists('libev')
-ares_embed = os.path.exists('c-ares')
+embed = os.environ.get("gevent_embed", "yes").lower().strip() not in ("0", "no", "off")
+libev_embed = embed and os.path.exists('libev')
+ares_embed = embed and os.path.exists('c-ares')
 define_macros = []
 libraries = []
 libev_configure_command = ["/bin/sh", abspath('libev/configure'), '> configure-output.txt']