# HG changeset patch # User Franz Glasner # Date 1556903197 -7200 # Node ID 781b8dc1883f4b70ef0008f896853e0122dcbcff # Parent d1103f0f9166e10f1ef771b65c3e7da0bf9b55f6 Use the pip "extras" feature to install optional features (e.g. PyYAML) diff -r d1103f0f9166 -r 781b8dc1883f setup.py --- a/setup.py Fri May 03 10:42:54 2019 +0200 +++ b/setup.py Fri May 03 19:06:37 2019 +0200 @@ -26,6 +26,13 @@ with open(os.path.join(pkg_root, "README.txt"), "rt") as rf: long_description = rf.read() +yaml_requirements = [ + "PyYAML>=3.0", +] + +all_requirements = [] +all_requirements.extend(yaml_requirements) + setup( name="ConfigMix", version=version, @@ -58,5 +65,9 @@ "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules" ], - install_requires = ["PyYAML>=3.0"], + extras_require={ + "yaml": yaml_requirements, + "all" : all_requirements, + }, + tests_require=all_requirements, )