environment markers are not supported until 36.2.0. on centos7, the
build fails like:
+ python setup.py sdist --formats=bztar
error in ceph-deploy setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers
Signed-off-by: Kefu Chai <kchai@redhat.com>
import os
import sys
import ceph_deploy
-
+import pkg_resources
+import setuptools
def read(fname):
path = os.path.join(os.path.dirname(__file__), fname)
return f.read()
-install_requires = [
- "remoto >= 1.1.4",
- "configparser;python_version<'3.0'",
- "setuptools < 45.0.0;python_version<'3.0'",
- "setuptools;python_version>='3.0'"]
+if (pkg_resources.parse_version(setuptools.__version__) >=
+ pkg_resources.parse_version('36.2.0')):
+ install_requires = [
+ "remoto >= 1.1.4",
+ "configparser;python_version<'3.0'",
+ "setuptools < 45.0.0;python_version<'3.0'",
+ "setuptools;python_version>='3.0'"]
+else:
+ install_requires = [
+ "remoto >= 1.1.4",
+ "configparser",
+ "setuptools < 45.0.0"]
setup(
name='ceph-deploy',