-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #144 from fyfe/prepeare-for-release
prepare for release
- Loading branch information
Showing
7 changed files
with
90 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
__version__ = "1.2.3" | ||
# -*- coding: utf-8 -*- | ||
|
||
"""DMARC related tools for Modoboa.""" | ||
|
||
from __future__ import unicode_literals | ||
|
||
from pkg_resources import get_distribution, DistributionNotFound | ||
|
||
|
||
try: | ||
__version__ = get_distribution(__name__).version | ||
except DistributionNotFound: | ||
# package is not installed | ||
pass | ||
|
||
default_app_config = "modoboa_webmail.apps.WebmailConfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
modoboa>=1.8.2 | ||
modoboa>=1.10.0 | ||
chardet | ||
lxml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
[bdist_wheel] | ||
universal = 1 | ||
[pep8] | ||
max-line-length = 80 | ||
exclude = migrations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,71 @@ | ||
"""Setup script for modoboa-admin.""" | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import re | ||
import os | ||
from setuptools import setup, find_packages | ||
|
||
from modoboa_webmail import __version__ | ||
""" | ||
A setuptools based setup module. | ||
ROOT = os.path.dirname(__file__) | ||
See: | ||
https://packaging.python.org/en/latest/distributing.html | ||
""" | ||
|
||
from __future__ import unicode_literals | ||
|
||
PIP_REQUIRES = os.path.join(ROOT, "requirements.txt") | ||
import io | ||
from os import path | ||
from pip.req import parse_requirements | ||
from setuptools import setup, find_packages | ||
|
||
|
||
def parse_requirements(*filenames): | ||
""" | ||
We generate our install_requires from the pip-requires and test-requires | ||
files so that we don't have to maintain the dependency definitions in | ||
two places. | ||
""" | ||
def get_requirements(requirements_file): | ||
"""Use pip to parse requirements file.""" | ||
requirements = [] | ||
for f in filenames: | ||
for line in open(f, 'r').read().split('\n'): | ||
# Comment lines. Skip. | ||
if re.match(r'(\s*#)|(\s*$)', line): | ||
continue | ||
# Editable matches. Put the egg name into our reqs list. | ||
if re.match(r'\s*-e\s+', line): | ||
pkg = re.sub(r'\s*-e\s+.*#egg=(.*)$', r'\1', line) | ||
requirements.append("%s" % pkg) | ||
# File-based installs not supported/needed. Skip. | ||
elif re.match(r'\s*-f\s+', line): | ||
pass | ||
else: | ||
requirements.append(line) | ||
if path.isfile(requirements_file): | ||
for req in parse_requirements(requirements_file, session="hack"): | ||
# check markers, such as | ||
# | ||
# rope_py3k ; python_version >= '3.0' | ||
# | ||
if req.match_markers(): | ||
requirements.append(str(req.req)) | ||
return requirements | ||
|
||
|
||
def parse_dependency_links(*filenames): | ||
""" | ||
We generate our dependency_links from the pip-requires and test-requires | ||
files for the dependencies pulled from github (prepended with -e). | ||
""" | ||
dependency_links = [] | ||
for f in filenames: | ||
for line in open(f, 'r').read().split('\n'): | ||
if re.match(r'\s*-[ef]\s+', line): | ||
line = re.sub(r'\s*-[ef]\s+', '', line) | ||
line = re.sub(r'\s*git\+https', 'http', line) | ||
line = re.sub(r'\.git#', '/tarball/master#', line) | ||
dependency_links.append(line) | ||
return dependency_links | ||
|
||
|
||
def read(fname): | ||
"""A simple function to read the content of a file.""" | ||
return open(os.path.join(ROOT, fname)).read() | ||
if __name__ == "__main__": | ||
HERE = path.abspath(path.dirname(__file__)) | ||
INSTALL_REQUIRES = get_requirements(path.join(HERE, "requirements.txt")) | ||
|
||
with io.open(path.join(HERE, "README.rst"), encoding="utf-8") as readme: | ||
LONG_DESCRIPTION = readme.read() | ||
|
||
setup( | ||
name="modoboa-webmail", | ||
version=__version__, | ||
url='http://modoboa.org/', | ||
license='MIT', | ||
description="The webmail of Modoboa", | ||
long_description=read('README.rst'), | ||
author='Antoine Nguyen', | ||
author_email='tonio@ngyn.org', | ||
packages=find_packages(), | ||
include_package_data=True, | ||
install_requires=parse_requirements(PIP_REQUIRES), | ||
dependency_links=parse_dependency_links(PIP_REQUIRES), | ||
classifiers=['Development Status :: 5 - Production/Stable', | ||
'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-webmail", | ||
description="The webmail of Modoboa", | ||
long_description=LONG_DESCRIPTION, | ||
license="MIT", | ||
url="http://modoboa.org/", | ||
author="Antoine Nguyen", | ||
author_email="tonio@ngyn.org", | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Web Environment", | ||
"Framework :: Django :: 1.11", | ||
"Intended Audience :: System Administrators", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 2", | ||
"Programming Language :: Python :: 2.7", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.4", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.6", | ||
"Topic :: Communications :: Email", | ||
"Topic :: Internet :: WWW/HTTP", | ||
], | ||
keywords="email webmail", | ||
packages=find_packages(exclude=["docs", "test_project"]), | ||
include_package_data=True, | ||
zip_safe=False, | ||
install_requires=INSTALL_REQUIRES, | ||
use_scm_version=True, | ||
setup_requires=["setuptools_scm"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
factory-boy>=2.4 | ||
testfixtures==4.7.0 | ||
psycopg2>=2.5.4 | ||
mysqlclient>=1.3.3 |