Permalink
Browse files

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)
  • Loading branch information...
fyfe committed Jan 12, 2018
1 parent dfabe89 commit b4c0be2c9b22684240166b6f8ebceeae795a1c2f
Showing with 11 additions and 0 deletions.
  1. +1 −0 mysql-requirements.txt
  2. +1 −0 postgresql-requirements.txt
  3. +9 −0 setup.py
@@ -0,0 +1 @@
mysqlclient>=1.3.11
@@ -0,0 +1 @@
psycopg2>=2.5.4
@@ -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 @@ def get_requirements(requirements_file):
install_requires=INSTALL_REQUIRES,
use_scm_version=True,
setup_requires=["setuptools_scm"],
extras_require={
"ldap": LDAP_REQUIRES,
"mysql": MYSQL_REQUIRES,
"postgresql": POSTGRESQL_REQUIRES,
},
)

0 comments on commit b4c0be2

Please sign in to comment.