Skip to content

Commit f2e5ab6

Browse files
committed
remove some problematic dependencies in PP_MAINTAINER mode
debian/ubuntu do not ship .egg-info files for roman, greenlet. fpm can't handle 'odfpy<...'
1 parent 662e104 commit f2e5ab6

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

setup.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
***********************************************************************
1414
""")
1515

16+
17+
from distutils.util import strtobool
18+
PP_MAINTAINER = strtobool(os.environ.get("PP_MAINTAINER", "0"))
19+
20+
1621
try:
1722
from setuptools import setup, Extension
1823
except ImportError:
@@ -28,7 +33,7 @@ def get_version():
2833

2934

3035
def checkpil():
31-
if "PP_MAINTAINER" in os.environ:
36+
if PP_MAINTAINER:
3237
return
3338

3439
try:
@@ -71,11 +76,14 @@ def main():
7176
if os.path.exists('Makefile'):
7277
build_deps() # this is a git clone
7378

74-
install_requires = ["pyparsing>=1.4.11", "odfpy>=0.9, <0.10",
75-
"gevent", "timelib>=0.2", "bottle>=0.10",
76-
"pyPdf>=1.12", "apipkg>=1.2", "qserve>=0.2.7",
77-
"roman", "lxml", "py>=1.4", "sqlite3dbm",
78-
"simplejson>=2.3"]
79+
install_requires = ["pyparsing>=1.4.11", "timelib>=0.2",
80+
"bottle>=0.10", "pyPdf>=1.12", "apipkg>=1.2",
81+
"qserve>=0.2.7", "lxml", "py>=1.4",
82+
"sqlite3dbm", "simplejson>=2.3"]
83+
84+
if not PP_MAINTAINER:
85+
install_requires += ["roman", "gevent", "odfpy>=0.9, <0.10"]
86+
7987

8088
ext_modules = []
8189
ext_modules.append(Extension("mwlib._uscan", ["mwlib/_uscan.cc"]))

0 commit comments

Comments
 (0)