<NME> setup.py
<BEF> #!/usr/bin/env python

"""
A setuptools based setup module.

See:
https://packaging.python.org/en/latest/distributing.html
ROOT = os.path.dirname(__file__)
PIP_REQUIRES = os.path.join(ROOT, "requirements.txt")

def parse_requirements(*filenames):
    """
    We generate our install_requires from the pip-requires and test-requires
    # pip >= 10
    from pip._internal.req import parse_requirements

from setuptools import find_packages, setup


def get_requirements(requirements_file):
    """Use pip to parse requirements file."""
    requirements = []
    if path.isfile(requirements_file):
        for req in parse_requirements(requirements_file, session="hack"):
            try:
                if req.markers:
                    requirements.append("%s;%s" % (req.req, req.markers))
                else:
                    requirements.append("%s" % req.req)
            except AttributeError:
                requirements.append(line)
    return requirements

def parse_dependency_links(*filenames):
    """
    We generate our dependency_links from the pip-requires and test-requires
    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 open(path.join(HERE, "README.rst")) as readme:
        LONG_DESCRIPTION = readme.read()

                dependency_links.append(line)
    return dependency_links

def read(fname):
    return open(os.path.join(ROOT, fname)).read()

setup(name="modoboa",
      version='1.0.0',
      url='http://modoboa.org/',
      license='MIT',
      description="Mail hosting made simple",
      long_description=read('README.rst'),
      author='Antoine Nguyen',
      author_email='tonio@ngyn.org',
      packages=find_packages(),
      include_package_data=True,
      scripts=["modoboa/bin/modoboa-admin.py"],
      zip_safe=False,
      install_requires=parse_requirements(PIP_REQUIRES),
      dependency_links=parse_dependency_links(PIP_REQUIRES),
      classifiers=['Development Status :: 4 - Beta',
                   'Framework :: Django',
                   'Intended Audience :: System Administrators',
                   'License :: OSI Approved :: MIT License',
                   'Operating System :: OS Independent',
                   'Programming Language :: Python',
                   'Topic :: Internet :: WWW/HTTP']
)
        include_package_data=True,
        zip_safe=False,
        scripts=["bin/modoboa-admin.py"],
        install_requires=INSTALL_REQUIRES,
        use_scm_version={
            "local_scheme": local_scheme
        },
        python_requires=">=3.7",
        setup_requires=["setuptools_scm>6.4"],
        extras_require={
            "ldap": LDAP_REQUIRES,
            "mysql": MYSQL_REQUIRES,
            "postgresql": POSTGRESQL_REQUIRES,
            "argon2": ["argon2-cffi >= 16.1.0"],
        },
    )

<MSG> Merge branch 'master' into feature/score-and-sorting-in-quarantine

Conflicts:
	modoboa/extensions/amavis/views.py

<DFF> @@ -8,6 +8,7 @@ from setuptools import setup, find_packages
 ROOT = os.path.dirname(__file__)
 PIP_REQUIRES = os.path.join(ROOT, "requirements.txt")
 
+
 def parse_requirements(*filenames):
     """
     We generate our install_requires from the pip-requires and test-requires
@@ -31,6 +32,7 @@ def parse_requirements(*filenames):
                 requirements.append(line)
     return requirements
 
+
 def parse_dependency_links(*filenames):
     """
     We generate our dependency_links from the pip-requires and test-requires
@@ -46,28 +48,30 @@ def parse_dependency_links(*filenames):
                 dependency_links.append(line)
     return dependency_links
 
+
 def read(fname):
     return open(os.path.join(ROOT, fname)).read()
 
-setup(name="modoboa",
-      version='1.0.0',
-      url='http://modoboa.org/',
-      license='MIT',
-      description="Mail hosting made simple",
-      long_description=read('README.rst'),
-      author='Antoine Nguyen',
-      author_email='tonio@ngyn.org',
-      packages=find_packages(),
-      include_package_data=True,
-      scripts=["modoboa/bin/modoboa-admin.py"],
-      zip_safe=False,
-      install_requires=parse_requirements(PIP_REQUIRES),
-      dependency_links=parse_dependency_links(PIP_REQUIRES),
-      classifiers=['Development Status :: 4 - Beta',
-                   'Framework :: Django',
-                   'Intended Audience :: System Administrators',
-                   'License :: OSI Approved :: MIT License',
-                   'Operating System :: OS Independent',
-                   'Programming Language :: Python',
-                   'Topic :: Internet :: WWW/HTTP']
+setup(
+    name="modoboa",
+    version='1.0.1',
+    url='http://modoboa.org/',
+    license='MIT',
+    description="Mail hosting made simple",
+    long_description=read('README.rst'),
+    author='Antoine Nguyen',
+    author_email='tonio@ngyn.org',
+    packages=find_packages(),
+    include_package_data=True,
+    scripts=["bin/modoboa-admin.py"],
+    zip_safe=False,
+    install_requires=parse_requirements(PIP_REQUIRES),
+    dependency_links=parse_dependency_links(PIP_REQUIRES),
+    classifiers=['Development Status :: 4 - Beta',
+                 'Framework :: Django',
+                 'Intended Audience :: System Administrators',
+                 'License :: OSI Approved :: MIT License',
+                 'Operating System :: OS Independent',
+                 'Programming Language :: Python',
+                 'Topic :: Internet :: WWW/HTTP']
 )

Merge branch 'master' into feature/score-and-sorting-in-quarantine