From 2e31dd2ad3bdb67a2b66ad1227110c1c29a1add6 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Mon, 24 Aug 2015 17:17:31 +0100 Subject: [PATCH 1/7] Add tox.ini file for synapse --- MANIFEST.in | 5 +++++ setup.py | 5 ----- tox.ini | 25 +++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 tox.ini diff --git a/MANIFEST.in b/MANIFEST.in index a9b543af82..d1b6b69633 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -12,4 +12,9 @@ recursive-include demo *.py recursive-include demo *.sh recursive-include docs * recursive-include scripts * +recursive-include scripts-dev * recursive-include tests *.py + +recursive-include static *.css +recursive-include static *.html +recursive-include static *.js diff --git a/setup.py b/setup.py index 16ccc0f1b8..8ad20df7cb 100755 --- a/setup.py +++ b/setup.py @@ -47,11 +47,6 @@ setup( packages=find_packages(exclude=["tests", "tests.*"]), description="Reference Synapse Home Server", install_requires=dependencies['requirements'](include_conditional=True).keys(), - setup_requires=[ - "Twisted>=15.1.0", # Here to override setuptools_trial's dependency on Twisted>=2.4.0 - "setuptools_trial", - "mock" - ], dependency_links=dependencies["DEPENDENCY_LINKS"], include_package_data=True, zip_safe=False, diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000000..a1e0ac70d3 --- /dev/null +++ b/tox.ini @@ -0,0 +1,25 @@ +[tox] +envlist = packaging, py27, pep8 + +[testenv] +deps = + coverage + Twisted>=15.1 + mock +commands = + coverage run --source=./synapse {envbindir}/trial tests + coverage report -m +install_command = + pip install --process-dependency-links --pre {opts} {packages} + +[testenv:packaging] +deps = + check-manifest +commands = + check-manifest + +[testenv:pep8] +basepython = python2.7 +deps = + flake8 +commands = flake8 synapse From 12b1a47ba4a4f7eb8f2745a3ef3c5c90e9197b0e Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Tue, 25 Aug 2015 14:22:33 +0100 Subject: [PATCH 2/7] Only include demo/demo.tls.dh. Don't include any other dh file --- MANIFEST.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index d1b6b69633..621e34cb76 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,13 +3,13 @@ include LICENSE include VERSION include *.rst include demo/README +include demo/demo.tls.dh +include demo/*.py +include demo/*.sh recursive-include synapse/storage/schema *.sql recursive-include synapse/storage/schema *.py -recursive-include demo *.dh -recursive-include demo *.py -recursive-include demo *.sh recursive-include docs * recursive-include scripts * recursive-include scripts-dev * @@ -18,3 +18,5 @@ recursive-include tests *.py recursive-include static *.css recursive-include static *.html recursive-include static *.js + +prune demo/etc From d046adf4ecf0737dc111a93d1f1ae7f41bc1bccb Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Tue, 25 Aug 2015 15:44:05 +0100 Subject: [PATCH 6/7] Set PYTHONDONTWRITEBYTECODE in the tox environment so that we don't spew .pyc files everywhere --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index a1e0ac70d3..58cf9613cb 100644 --- a/tox.ini +++ b/tox.ini @@ -6,6 +6,8 @@ deps = coverage Twisted>=15.1 mock +setenv = + PYTHONDONTWRITEBYTECODE = no_byte_code commands = coverage run --source=./synapse {envbindir}/trial tests coverage report -m From 3a20cdcd27fa0006ff15156ef07602c816d86643 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Tue, 25 Aug 2015 15:45:03 +0100 Subject: [PATCH 7/7] Add .tox to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 960183a794..4c336b710d 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ build/ localhost-800*/ static/client/register/register_config.js +.tox