summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorSascha Peilicke <saschpe@gmx.de>2014-01-31 13:10:38 +0100
committerSascha Peilicke <saschpe@gmx.de>2014-01-31 13:10:38 +0100
commit25e349c27987e4fe9d342371b374812f266e3d4e (patch)
tree27a6967b3136a5ed12fda5585030df1589786eb5 /setup.py
parent5f9d4d675cbe903ebfacc3b72a67dc8754a55309 (diff)
downloadpython-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.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 17c4c7be..6f6d162f 100644
--- a/setup.py
+++ b/setup.py
@@ -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'] = {