mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
add extra optional packages
Add the ability to install optional packages when installing modoboa. For example if I wanted to use modoboa with PostgreSQL `pip install modoboa[postgresql]`, or if I wanted MySQL and LDAP support `pip install modoboa[mysql,ldap]` mysqlclient minimum version has been pined to 1.3.11 due to an issue with MariaDB 10 (#1341)
This commit is contained in:
@@ -33,6 +33,10 @@ def get_requirements(requirements_file):
|
||||
if __name__ == "__main__":
|
||||
HERE = path.abspath(path.dirname(__file__))
|
||||
INSTALL_REQUIRES = get_requirements(path.join(HERE, "requirements.txt"))
|
||||
MYSQL_REQUIRES = get_requirements(path.join(HERE, "mysql-requirements.txt"))
|
||||
POSTGRESQL_REQUIRES = get_requirements(
|
||||
path.join(HERE, "postgresql-requirements.txt"))
|
||||
LDAP_REQUIRES = get_requirements(path.join(HERE, "ldap-requirements.txt"))
|
||||
|
||||
with io.open(path.join(HERE, "README.rst"), encoding="utf-8") as readme:
|
||||
LONG_DESCRIPTION = readme.read()
|
||||
@@ -69,4 +73,9 @@ if __name__ == "__main__":
|
||||
install_requires=INSTALL_REQUIRES,
|
||||
use_scm_version=True,
|
||||
setup_requires=["setuptools_scm"],
|
||||
extras_require={
|
||||
"ldap": LDAP_REQUIRES,
|
||||
"mysql": MYSQL_REQUIRES,
|
||||
"postgresql": POSTGRESQL_REQUIRES,
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user