File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 1414 sys .stderr .write ("ERROR: planemo requires at least Python Version 2.7\n " )
1515 sys .exit (1 )
1616
17+ # Allow installer to turn off dependency on lxml by setting the environment variable
18+ # PLANEMO_REQUIRE_LXML to "0". lxml should be considered optional if xmllint is
19+ # available on the PATH - but python doesn't really provide me a fantastic way to
20+ # express that.
21+ DEFAULT_PLANEMO_REQUIRE_LXML = 1
22+ PLANEMO_REQUIRE_LXML = os .environ .get ("PLANEMO_REQUIRE_LXML" , "%d" % DEFAULT_PLANEMO_REQUIRE_LXML ) != "0"
23+
1724SOURCE_DIR = "planemo"
1825
1926_version_re = re .compile (r'__version__\s+=\s+(.*)' )
@@ -81,6 +88,8 @@ def get_var(var_name):
8188if os .path .exists ("requirements.txt" ):
8289 requirements = [ r for r in open ("requirements.txt" ).read ().split ("\n " ) if ";" not in r ]
8390 py27_requirements = [ r .split (";" , 1 )[0 ].strip () for r in open ("requirements.txt" ).read ().split ("\n " ) if ";" in r ]
91+ if not PLANEMO_REQUIRE_LXML :
92+ requirements .remove ("lxml" )
8493else :
8594 # In tox, it will cover them anyway.
8695 requirements = []
You can’t perform that action at this time.
0 commit comments