summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MANIFEST.in22
-rw-r--r--docs/conf.py4
-rw-r--r--pavement.py24
-rw-r--r--tests/CrypterPluginTester.py4
-rw-r--r--tests/HosterPluginTester.py8
-rw-r--r--tests/api/ApiProxy.py4
-rw-r--r--tests/api/ApiTester.py4
-rw-r--r--tests/api/test_JSONBackend.py4
-rw-r--r--tests/api/test_WebSocketBackend.py4
-rw-r--r--tests/api/test_noargs.py2
-rw-r--r--tests/helper/PluginTester.py4
-rw-r--r--tests/helper/Stubs.py18
-rw-r--r--tests/manager/test_configManager.py8
-rw-r--r--tests/manager/test_filemanager.py6
-rw-r--r--tests/manager/test_interactionManager.py4
-rw-r--r--tests/other/test_configparser.py2
-rw-r--r--tests/other/test_filedatabase.py4
-rwxr-xr-xtests/plugin_tests.sh2
-rwxr-xr-xtests/pyflakes.sh2
-rwxr-xr-xtests/quit_pyload.sh2
-rwxr-xr-xtests/run_pyload.sh2
21 files changed, 75 insertions, 59 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 000000000..cda6ee45e
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,22 @@
+include README.md LICENSE.md CLA pavement.py setup.py paver-minilib.zip
+
+recursive-include pyload *.py
+recursive-include pyload/plugins *_2*.pyc
+
+recursive-include pyload/remote *
+
+recursive-include pyload/web .bowerrc .jshintrc Gruntfile.js package.json
+prune pyload/web/node_modules
+
+recursive-include pyload/web/dist *
+recursive-include pyload/web/app *
+prune pyload/web/app/components
+
+recursive-include docs Makefile *.py *.conf *.rst *.svg *.png
+
+recursive-include tests *.py *.txt *.sh
+
+recursive-include locale *.pot *.mo
+
+recursive-exclude * __pycache__
+recursive-exclude * *.py[co] \ No newline at end of file
diff --git a/docs/conf.py b/docs/conf.py
index 8bd7c5f56..006dec5b6 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -129,12 +129,12 @@ html_theme = 'default'
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
-html_logo = join(dir_name, "pyload", "web", "static", "img", "default", "logo.png")
+html_logo = join(dir_name, "pyload", "web", "app", "images", "default", "logo.png")
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
-html_favicon = join(dir_name, "pyload", "web", "static", "img", "favicon.ico")
+html_favicon = join(dir_name, "pyload", "web", "app", "favicon.ico")
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
diff --git a/pavement.py b/pavement.py
index 3682281b3..a458194b7 100644
--- a/pavement.py
+++ b/pavement.py
@@ -32,7 +32,6 @@ PROJECT_DIR = path(__file__).dirname()
sys.path.append(PROJECT_DIR)
options = environment.options
-path('pyload').mkdir()
extradeps = []
if sys.version_info <= (2, 5):
@@ -68,7 +67,7 @@ setup(
#setup_requires=["setuptools_hg"],
test_suite='nose.collector',
tests_require=['nose', 'websocket-client >= 0.8.0', 'requests >= 1.2.2'],
- scripts=['pyload.py', 'pyload-cli.py'],
+ scripts=['pyload.py', 'pyload-cli.py'],
# entry_points={
# 'console_scripts': [
# 'pyload = pyload:main',
@@ -109,11 +108,12 @@ options(
xargs = ["--from-code=utf-8", "--copyright-holder=pyLoad Team", "--package-name=pyLoad",
"--package-version=%s" % options.version, "--msgid-bugs-address='bugs@pyload.org'"]
+
@task
@needs('cog')
def html():
"""Build html documentation"""
- module = path("docs") / "module"
+ module = path("docs") / "pyload"
module.rmtree()
call_task('paver.doctools.html')
@@ -131,7 +131,7 @@ def sdist():
def apitypes(options):
""" Generate data types stubs """
- outdir = PROJECT_DIR / "module" / "remote"
+ outdir = PROJECT_DIR / "pyload" / "remote"
if (outdir / "gen-py").exists():
(outdir / "gen-py").rmtree()
@@ -147,10 +147,10 @@ def apitypes(options):
(outdir / "gen-py").move(outdir / "thriftgen")
#create light ttypes
- from module.remote.create_apitypes import main
+ from pyload.remote.create_apitypes import main
main()
- from module.remote.create_jstypes import main
+ from pyload.remote.create_jstypes import main
main()
@@ -162,13 +162,15 @@ def webapp():
# npm install
# bower install
+
@task
def generate_locale():
""" Generates localisation files """
+ # TODO restructure, many references are outdated
EXCLUDE = ["BeautifulSoup.py", "module/gui", "module/cli", "web/locale", "web/ajax", "web/cnl", "web/pyload",
"setup.py"]
- makepot("core", path("module"), EXCLUDE, "./pyLoadCore.py\n")
+ makepot("core", path("pyload"), EXCLUDE, "./pyLoadCore.py\n")
makepot("cli", path("module") / "cli", [], includes="./pyLoadCli.py\n")
makepot("setup", "", [], includes="./module/setup.py\n")
@@ -230,14 +232,6 @@ def clean_env():
@task
-@needs('generate_setup', 'get_source', 'virtualenv')
-def env_install():
- """Install pyLoad into the virtualenv"""
- venv = options.virtualenv
- call([path(venv.dir) / "bin" / "easy_install", "."])
-
-
-@task
def clean():
"""Cleans build directories"""
path("build").rmtree()
diff --git a/tests/CrypterPluginTester.py b/tests/CrypterPluginTester.py
index 67e5ddebc..42585939e 100644
--- a/tests/CrypterPluginTester.py
+++ b/tests/CrypterPluginTester.py
@@ -8,8 +8,8 @@ from logging import log, DEBUG
from helper.Stubs import Core
from helper.PluginTester import PluginTester
-from module.plugins.Base import Fail
-from module.utils import accumulate, to_int
+from pyload.plugins.Base import Fail
+from pyload.utils import accumulate, to_int
class CrypterPluginTester(PluginTester):
@nottest
diff --git a/tests/HosterPluginTester.py b/tests/HosterPluginTester.py
index 627494a3f..0639adab7 100644
--- a/tests/HosterPluginTester.py
+++ b/tests/HosterPluginTester.py
@@ -12,10 +12,10 @@ from nose.tools import nottest
from helper.Stubs import Core
from helper.PluginTester import PluginTester
-from module.datatypes.PyFile import PyFile
-from module.plugins.Base import Fail
-from module.utils import accumulate
-from module.utils.fs import save_join, join, exists, listdir, remove, stat
+from pyload.datatypes.PyFile import PyFile
+from pyload.plugins.Base import Fail
+from pyload.utils import accumulate
+from pyload.utils.fs import save_join, join, exists, listdir, remove, stat
DL_DIR = join("Downloads", "tmp")
diff --git a/tests/api/ApiProxy.py b/tests/api/ApiProxy.py
index 5a091dbee..4bea0f5a3 100644
--- a/tests/api/ApiProxy.py
+++ b/tests/api/ApiProxy.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
-from module.remote.apitypes_debug import classes, methods
+from pyload.remote.apitypes_debug import classes, methods
class ApiProxy:
""" Proxy that does type checking on the api """
@@ -62,7 +62,7 @@ class ApiProxy:
if __name__ == "__main__":
- from module.remote.JSONClient import JSONClient
+ from pyload.remote.JSONClient import JSONClient
api = ApiProxy(JSONClient(), "User", "test")
api.getServerVersion() \ No newline at end of file
diff --git a/tests/api/ApiTester.py b/tests/api/ApiTester.py
index b17a7655e..39973b52f 100644
--- a/tests/api/ApiTester.py
+++ b/tests/api/ApiTester.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
-from module.remote.JSONClient import JSONClient
-from module.remote.WSClient import WSClient
+from pyload.remote.JSONClient import JSONClient
+from pyload.remote.WSClient import WSClient
from ApiProxy import ApiProxy
diff --git a/tests/api/test_JSONBackend.py b/tests/api/test_JSONBackend.py
index e99b97827..4efc65d2a 100644
--- a/tests/api/test_JSONBackend.py
+++ b/tests/api/test_JSONBackend.py
@@ -7,8 +7,8 @@ import requests
import json
-from module.remote.apitypes import Forbidden
-from module.remote.JSONClient import JSONClient
+from pyload.remote.apitypes import Forbidden
+from pyload.remote.JSONClient import JSONClient
class TestJSONBackend:
diff --git a/tests/api/test_WebSocketBackend.py b/tests/api/test_WebSocketBackend.py
index 3c714a5e2..679654fc9 100644
--- a/tests/api/test_WebSocketBackend.py
+++ b/tests/api/test_WebSocketBackend.py
@@ -2,8 +2,8 @@
from nose.tools import raises
-from module.remote.apitypes import Forbidden
-from module.remote.WSClient import WSClient
+from pyload.remote.apitypes import Forbidden
+from pyload.remote.WSClient import WSClient
class TestWebSocketBackend:
diff --git a/tests/api/test_noargs.py b/tests/api/test_noargs.py
index 12da0b417..e84946e45 100644
--- a/tests/api/test_noargs.py
+++ b/tests/api/test_noargs.py
@@ -4,7 +4,7 @@ import inspect
from ApiTester import ApiTester
-from module.remote.apitypes import Iface
+from pyload.remote.apitypes import Iface
IGNORE = ('quit', 'restart')
diff --git a/tests/helper/PluginTester.py b/tests/helper/PluginTester.py
index ef61385be..9312eb7bf 100644
--- a/tests/helper/PluginTester.py
+++ b/tests/helper/PluginTester.py
@@ -15,8 +15,8 @@ from json import loads
from Stubs import Thread, Core, noop
-from module.network.RequestFactory import getRequest, getURL
-from module.plugins.Hoster import Hoster, Abort, Fail
+from pyload.network.RequestFactory import getRequest, getURL
+from pyload.plugins.Hoster import Hoster, Abort, Fail
def _wait(self):
""" waits the time previously set """
diff --git a/tests/helper/Stubs.py b/tests/helper/Stubs.py
index 4c7c178ed..2c356ba3e 100644
--- a/tests/helper/Stubs.py
+++ b/tests/helper/Stubs.py
@@ -6,19 +6,19 @@ from time import strftime
from traceback import format_exc
from collections import defaultdict
-sys.path.append(abspath(join(dirname(__file__), "..", "..", "module", "lib")))
+sys.path.append(abspath(join(dirname(__file__), "..", "..", "pyload", "lib")))
sys.path.append(abspath(join(dirname(__file__), "..", "..")))
import __builtin__
-from module.Api import Role
-from module.datatypes.User import User
-from module.datatypes.PyPackage import PyPackage
-from module.threads.BaseThread import BaseThread
-from module.config.ConfigParser import ConfigParser
-from module.network.RequestFactory import RequestFactory
-from module.PluginManager import PluginManager
-from module.utils.JsEngine import JsEngine
+from pyload.Api import Role
+from pyload.datatypes.User import User
+from pyload.datatypes.PyPackage import PyPackage
+from pyload.threads.BaseThread import BaseThread
+from pyload.config.ConfigParser import ConfigParser
+from pyload.network.RequestFactory import RequestFactory
+from pyload.PluginManager import PluginManager
+from pyload.utils.JsEngine import JsEngine
from logging import log, DEBUG, INFO, WARN, ERROR
diff --git a/tests/manager/test_configManager.py b/tests/manager/test_configManager.py
index af473a0d2..97b43dd66 100644
--- a/tests/manager/test_configManager.py
+++ b/tests/manager/test_configManager.py
@@ -7,10 +7,10 @@ from nose.tools import raises
from tests.helper.Stubs import Core
-from module.Api import InvalidConfigSection
-from module.database import DatabaseBackend
-from module.config.ConfigParser import ConfigParser
-from module.config.ConfigManager import ConfigManager
+from pyload.Api import InvalidConfigSection
+from pyload.database import DatabaseBackend
+from pyload.config.ConfigParser import ConfigParser
+from pyload.config.ConfigManager import ConfigManager
adminUser = None
normalUser = 1
diff --git a/tests/manager/test_filemanager.py b/tests/manager/test_filemanager.py
index 5b9fbb567..a7507cada 100644
--- a/tests/manager/test_filemanager.py
+++ b/tests/manager/test_filemanager.py
@@ -5,12 +5,12 @@ from random import choice
from tests.helper.Stubs import Core
from tests.helper.BenchmarkTest import BenchmarkTest
-from module.database import DatabaseBackend
+from pyload.database import DatabaseBackend
# disable asyncronous queries
DatabaseBackend.async = DatabaseBackend.queue
-from module.Api import DownloadState
-from module.FileManager import FileManager
+from pyload.Api import DownloadState
+from pyload.FileManager import FileManager
class TestFileManager(BenchmarkTest):
diff --git a/tests/manager/test_interactionManager.py b/tests/manager/test_interactionManager.py
index 0ab7af80d..5ff74c0f0 100644
--- a/tests/manager/test_interactionManager.py
+++ b/tests/manager/test_interactionManager.py
@@ -4,8 +4,8 @@ from unittest import TestCase
from tests.helper.Stubs import Core
-from module.Api import InputType, Interaction
-from module.interaction.InteractionManager import InteractionManager
+from pyload.Api import InputType, Interaction
+from pyload.interaction.InteractionManager import InteractionManager
class TestInteractionManager(TestCase):
diff --git a/tests/other/test_configparser.py b/tests/other/test_configparser.py
index 7f34e64d3..0efd41aee 100644
--- a/tests/other/test_configparser.py
+++ b/tests/other/test_configparser.py
@@ -4,7 +4,7 @@ from nose.tools import raises
from tests.helper.Stubs import Core
-from module.config.ConfigParser import ConfigParser
+from pyload.config.ConfigParser import ConfigParser
class TestConfigParser():
diff --git a/tests/other/test_filedatabase.py b/tests/other/test_filedatabase.py
index 9a5b236a8..f2a60e997 100644
--- a/tests/other/test_filedatabase.py
+++ b/tests/other/test_filedatabase.py
@@ -3,8 +3,8 @@
from tests.helper.Stubs import Core
from tests.helper.BenchmarkTest import BenchmarkTest
-from module.Api import DownloadState, PackageInfo, FileInfo
-from module.database import DatabaseBackend
+from pyload.Api import DownloadState, PackageInfo, FileInfo
+from pyload.database import DatabaseBackend
# disable asyncronous queries
DatabaseBackend.async = DatabaseBackend.queue
diff --git a/tests/plugin_tests.sh b/tests/plugin_tests.sh
index be06c0dc5..789dddd91 100755
--- a/tests/plugin_tests.sh
+++ b/tests/plugin_tests.sh
@@ -3,5 +3,5 @@ NS=nosetests
which nosetests2 > /dev/null && NS=nosetests2
# must be executed within tests dir
cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-$NS HosterPluginTester.py CrypterPluginTester.py -s --with-xunit --with-coverage --cover-erase --cover-package=module.plugins --with-id
+$NS HosterPluginTester.py CrypterPluginTester.py -s --with-xunit --with-coverage --cover-erase --cover-package=pyload.plugins --with-id
coverage xml
diff --git a/tests/pyflakes.sh b/tests/pyflakes.sh
index 0c7e03891..df2805f1f 100755
--- a/tests/pyflakes.sh
+++ b/tests/pyflakes.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-find -name '*.py' |egrep -v '^.(/tests/|/module/lib)'|xargs pyflakes > pyflakes.log || :
+find -name '*.py' |egrep -v '^.(/tests/|/pyload/lib)'|xargs pyflakes > pyflakes.log || :
# Filter warnings and strip ./ from path
cat pyflakes.log | awk -F\: '{printf "%s:%s: [E]%s\n", $1, $2, $3}' | grep -i -E -v "'_'|pypath|webinterface|pyreq|hookmanager" > pyflakes.txt
sed -i 's/^.\///g' pyflakes.txt
diff --git a/tests/quit_pyload.sh b/tests/quit_pyload.sh
index e466bcb31..3bfb3e13a 100755
--- a/tests/quit_pyload.sh
+++ b/tests/quit_pyload.sh
@@ -1,7 +1,7 @@
#!/bin/bash
PYTHON=python
which python2 > /dev/null && PYTHON=python2
-$PYTHON pyLoadCore.py --configdir=tests/config --quit
+$PYTHON pyload.py --configdir=tests/config --quit
if [ -d userplugins ]; then
rm -r userplugins
fi \ No newline at end of file
diff --git a/tests/run_pyload.sh b/tests/run_pyload.sh
index 66498cd10..c272ad3c7 100755
--- a/tests/run_pyload.sh
+++ b/tests/run_pyload.sh
@@ -6,7 +6,7 @@ PYTHON=python
which python2 > /dev/null && PYTHON=python2
touch pyload.out
-$PYTHON pyLoadCore.py -d --configdir=tests/config > pyload.out 2> pyload.err &
+$PYTHON pyload.py -d --configdir=tests/config > pyload.out 2> pyload.err &
for i in {1..30}; do
grep 8001 pyload.out > /dev/null && echo "pyLoad started" && break