diff options
author | Sascha Peilicke <saschpe@gmx.de> | 2014-01-31 13:10:38 +0100 |
---|---|---|
committer | Sascha Peilicke <saschpe@gmx.de> | 2014-01-31 13:10:38 +0100 |
commit | 25e349c27987e4fe9d342371b374812f266e3d4e (patch) | |
tree | 27a6967b3136a5ed12fda5585030df1589786eb5 /setup.py | |
parent | 5f9d4d675cbe903ebfacc3b72a67dc8754a55309 (diff) | |
download | python-lxml-25e349c27987e4fe9d342371b374812f266e3d4e.tar.gz |
Add 'fast' extra_require
Allows other projects to demand a Cython-compiled lxml without having to
add Cython to their own list of dependencies. By specifying
extra_require, other projects just have to add this to their setup.py:
install_requires = ["lxml[fast]"],
They don't need to track the correct version anymore. And they don't
need to fix should lxml move to Shed_Skin or another Py-to-C compiler.
See http://pythonhosted.org/setuptools/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -49,6 +49,11 @@ extra_options = {} if 'setuptools' in sys.modules: extra_options['zip_safe'] = False + import pkg_resources + extra_options['extra_require'] = { + 'fast': map(str, pkg_resources.parse_requirements(open("requirements.txt", "r"))) + } + extra_options.update(setupinfo.extra_setup_args()) extra_options['package_data'] = { |