parent
e19efcf8a8
commit
be3f61af62
@ -7,7 +7,7 @@ environment:
|
|||||||
PYTHONUNBUFFERED: 1
|
PYTHONUNBUFFERED: 1
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- C:\Python27\python -u scripts\ci_install.py
|
- C:\Python27\python -u scripts\dev\ci_install.py
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- C:\Python34\Scripts\tox -e smoke
|
- C:\Python34\Scripts\tox -e smoke
|
||||||
|
@ -8,7 +8,7 @@ os:
|
|||||||
language: c
|
language: c
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- python scripts/ci_install.py
|
- python scripts/dev/ci_install.py
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- xvfb-run -s "-screen 0 640x480x16" tox -e unittests,smoke
|
- xvfb-run -s "-screen 0 640x480x16" tox -e unittests,smoke
|
||||||
|
11
MANIFEST.in
11
MANIFEST.in
@ -16,15 +16,8 @@ include requirements.txt
|
|||||||
include tox.ini
|
include tox.ini
|
||||||
include qutebrowser.py
|
include qutebrowser.py
|
||||||
|
|
||||||
include scripts/__init__.py
|
prune scripts/dev
|
||||||
include scripts/hostblock_blame.py
|
exclude scripts/asciidoc2html.py
|
||||||
include scripts/importer.py
|
|
||||||
include scripts/keytester.py
|
|
||||||
include scripts/link_pyqt.py
|
|
||||||
include scripts/minimal_webkit_testbrowser.py
|
|
||||||
include scripts/setupcommon.py
|
|
||||||
include scripts/utils.py
|
|
||||||
|
|
||||||
exclude doc/notes
|
exclude doc/notes
|
||||||
recursive-exclude doc *.asciidoc
|
recursive-exclude doc *.asciidoc
|
||||||
include doc/qutebrowser.1.asciidoc
|
include doc/qutebrowser.1.asciidoc
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
|
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
|
||||||
|
|
||||||
"""Various scripts used to develop/install qutebrowser."""
|
"""Various utility scripts."""
|
||||||
|
3
scripts/dev/__init__.py
Normal file
3
scripts/dev/__init__.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
|
||||||
|
|
||||||
|
"""Various scripts used for developing qutebrowser."""
|
@ -28,7 +28,8 @@ import shutil
|
|||||||
import subprocess
|
import subprocess
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir))
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir,
|
||||||
|
os.pardir))
|
||||||
|
|
||||||
import qutebrowser
|
import qutebrowser
|
||||||
from scripts import utils
|
from scripts import utils
|
@ -27,7 +27,8 @@ import glob
|
|||||||
import shutil
|
import shutil
|
||||||
import fnmatch
|
import fnmatch
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir))
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir,
|
||||||
|
os.pardir))
|
||||||
|
|
||||||
from scripts import utils
|
from scripts import utils
|
||||||
|
|
@ -32,12 +32,13 @@ import distutils
|
|||||||
import cx_Freeze as cx # pylint: disable=import-error
|
import cx_Freeze as cx # pylint: disable=import-error
|
||||||
# cx_Freeze is hard to install (needs C extensions) so we don't check for it.
|
# cx_Freeze is hard to install (needs C extensions) so we don't check for it.
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir))
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir,
|
||||||
|
os.pardir))
|
||||||
from scripts import setupcommon
|
from scripts import setupcommon
|
||||||
|
|
||||||
|
|
||||||
BASEDIR = os.path.join(os.path.dirname(os.path.realpath(__file__)),
|
BASEDIR = os.path.join(os.path.dirname(os.path.realpath(__file__)),
|
||||||
os.path.pardir)
|
os.path.pardir, os.path.pardir)
|
||||||
|
|
||||||
|
|
||||||
def get_egl_path():
|
def get_egl_path():
|
@ -30,15 +30,17 @@ import cx_Freeze as cx # pylint: disable=import-error
|
|||||||
# cx_Freeze is hard to install (needs C extensions) so we don't check for it.
|
# cx_Freeze is hard to install (needs C extensions) so we don't check for it.
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir))
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir,
|
||||||
from scripts import setupcommon, freeze
|
os.pardir))
|
||||||
|
from scripts import setupcommon
|
||||||
|
from scripts.dev import freeze
|
||||||
|
|
||||||
|
|
||||||
@contextlib.contextmanager
|
@contextlib.contextmanager
|
||||||
def temp_git_commit_file():
|
def temp_git_commit_file():
|
||||||
"""Context manager to temporarily create a fake git-commit-id file."""
|
"""Context manager to temporarily create a fake git-commit-id file."""
|
||||||
basedir = os.path.join(os.path.dirname(os.path.realpath(__file__)),
|
basedir = os.path.join(os.path.dirname(os.path.realpath(__file__)),
|
||||||
os.path.pardir)
|
os.path.pardir, os.pardir)
|
||||||
path = os.path.join(basedir, 'qutebrowser', 'git-commit-id')
|
path = os.path.join(basedir, 'qutebrowser', 'git-commit-id')
|
||||||
with open(path, 'wb') as f:
|
with open(path, 'wb') as f:
|
||||||
f.write(b'fake-frozen-git-commit')
|
f.write(b'fake-frozen-git-commit')
|
||||||
@ -59,7 +61,7 @@ def main():
|
|||||||
"""Main entry point."""
|
"""Main entry point."""
|
||||||
with temp_git_commit_file():
|
with temp_git_commit_file():
|
||||||
cx.setup(
|
cx.setup(
|
||||||
executables=[cx.Executable('scripts/run_frozen_tests.py',
|
executables=[cx.Executable('scripts/dev/run_frozen_tests.py',
|
||||||
targetName='run-frozen-tests')],
|
targetName='run-frozen-tests')],
|
||||||
options={'build_exe': get_build_exe_options()},
|
options={'build_exe': get_build_exe_options()},
|
||||||
**setupcommon.setupdata
|
**setupcommon.setupdata
|
@ -30,7 +30,8 @@ import tokenize
|
|||||||
import traceback
|
import traceback
|
||||||
import collections
|
import collections
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir))
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir,
|
||||||
|
os.pardir))
|
||||||
|
|
||||||
from scripts import utils
|
from scripts import utils
|
||||||
|
|
||||||
@ -88,7 +89,7 @@ def check_spelling():
|
|||||||
ok = True
|
ok = True
|
||||||
for fn in _py_files():
|
for fn in _py_files():
|
||||||
with tokenize.open(fn) as f:
|
with tokenize.open(fn) as f:
|
||||||
if fn == os.path.join('.', 'scripts', 'misc_checks.py'):
|
if fn == os.path.join('.', 'scripts', 'dev', 'misc_checks.py'):
|
||||||
continue
|
continue
|
||||||
for line in f:
|
for line in f:
|
||||||
for w in words:
|
for w in words:
|
@ -28,7 +28,8 @@ from pylint import interfaces, checkers
|
|||||||
from pylint.checkers import utils
|
from pylint.checkers import utils
|
||||||
|
|
||||||
sys.path.insert(
|
sys.path.insert(
|
||||||
0, os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
|
0, os.path.join(os.path.dirname(__file__), os.pardir, os.pardir,
|
||||||
|
os.pardir))
|
||||||
|
|
||||||
from qutebrowser.config import configdata
|
from qutebrowser.config import configdata
|
||||||
|
|
@ -28,7 +28,8 @@ import tempfile
|
|||||||
import subprocess
|
import subprocess
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir))
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir,
|
||||||
|
os.pardir))
|
||||||
|
|
||||||
import qutebrowser.qutebrowser # pylint: disable=unused-import
|
import qutebrowser.qutebrowser # pylint: disable=unused-import
|
||||||
|
|
@ -29,7 +29,8 @@ import sys
|
|||||||
import os.path
|
import os.path
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir))
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir,
|
||||||
|
os.pardir))
|
||||||
|
|
||||||
from scripts import utils
|
from scripts import utils
|
||||||
|
|
@ -26,7 +26,8 @@ import sys
|
|||||||
import subprocess
|
import subprocess
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir))
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir,
|
||||||
|
os.pardir))
|
||||||
|
|
||||||
from scripts import utils
|
from scripts import utils
|
||||||
|
|
@ -31,7 +31,8 @@ import collections
|
|||||||
import tempfile
|
import tempfile
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir))
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir,
|
||||||
|
os.pardir))
|
||||||
|
|
||||||
# We import qutebrowser.app so all @cmdutils-register decorators are run.
|
# We import qutebrowser.app so all @cmdutils-register decorators are run.
|
||||||
import qutebrowser.app
|
import qutebrowser.app
|
16
tox.ini
16
tox.ini
@ -40,7 +40,7 @@ deps =
|
|||||||
cx_Freeze==4.3.4
|
cx_Freeze==4.3.4
|
||||||
commands =
|
commands =
|
||||||
{envpython} scripts/link_pyqt.py --tox {envdir}
|
{envpython} scripts/link_pyqt.py --tox {envdir}
|
||||||
{envpython} scripts/freeze_tests.py build_exe -b {envdir}/build
|
{envpython} scripts/dev/freeze_tests.py build_exe -b {envdir}/build
|
||||||
{envdir}/build/run-frozen-tests --strict -rfEsw {posargs}
|
{envdir}/build/run-frozen-tests --strict -rfEsw {posargs}
|
||||||
|
|
||||||
[testenv:coverage]
|
[testenv:coverage]
|
||||||
@ -56,13 +56,13 @@ commands =
|
|||||||
|
|
||||||
[testenv:misc]
|
[testenv:misc]
|
||||||
commands =
|
commands =
|
||||||
{envpython} scripts/misc_checks.py git
|
{envpython} scripts/dev/misc_checks.py git
|
||||||
{envpython} scripts/misc_checks.py vcs
|
{envpython} scripts/dev/misc_checks.py vcs
|
||||||
{envpython} scripts/misc_checks.py spelling
|
{envpython} scripts/dev/misc_checks.py spelling
|
||||||
|
|
||||||
[testenv:pylint]
|
[testenv:pylint]
|
||||||
skip_install = true
|
skip_install = true
|
||||||
setenv = PYTHONPATH={toxinidir}/scripts
|
setenv = PYTHONPATH={toxinidir}/scripts/dev
|
||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
astroid==1.3.6
|
astroid==1.3.6
|
||||||
@ -73,7 +73,7 @@ deps =
|
|||||||
commands =
|
commands =
|
||||||
{envpython} scripts/link_pyqt.py --tox {envdir}
|
{envpython} scripts/link_pyqt.py --tox {envdir}
|
||||||
{envpython} -m pylint scripts qutebrowser --rcfile=.pylintrc --output-format=colorized --reports=no --expected-line-ending-format=LF
|
{envpython} -m pylint scripts qutebrowser --rcfile=.pylintrc --output-format=colorized --reports=no --expected-line-ending-format=LF
|
||||||
{envpython} scripts/run_pylint_on_tests.py --rcfile=.pylintrc --output-format=colorized --reports=no --expected-line-ending-format=LF
|
{envpython} scripts/dev/run_pylint_on_tests.py --rcfile=.pylintrc --output-format=colorized --reports=no --expected-line-ending-format=LF
|
||||||
|
|
||||||
[testenv:pep257]
|
[testenv:pep257]
|
||||||
skip_install = true
|
skip_install = true
|
||||||
@ -167,7 +167,7 @@ deps =
|
|||||||
cx_Freeze==4.3.4
|
cx_Freeze==4.3.4
|
||||||
commands =
|
commands =
|
||||||
{envpython} scripts/link_pyqt.py --tox {envdir}
|
{envpython} scripts/link_pyqt.py --tox {envdir}
|
||||||
{envpython} scripts/freeze.py build_exe --qute-skip-html -b {envdir}/build
|
{envpython} scripts/dev/freeze.py build_exe --qute-skip-html -b {envdir}/build
|
||||||
{envdir}/build/qutebrowser --no-err-windows --nowindow --temp-basedir about:blank ":later 500 quit"
|
{envdir}/build/qutebrowser --no-err-windows --nowindow --temp-basedir about:blank ":later 500 quit"
|
||||||
|
|
||||||
[testenv:cxfreeze-windows]
|
[testenv:cxfreeze-windows]
|
||||||
@ -178,7 +178,7 @@ skip_install = true
|
|||||||
deps = {[testenv:smoke-frozen]deps}
|
deps = {[testenv:smoke-frozen]deps}
|
||||||
commands =
|
commands =
|
||||||
{envpython} scripts/link_pyqt.py --tox {envdir}
|
{envpython} scripts/link_pyqt.py --tox {envdir}
|
||||||
{envpython} scripts/freeze.py {posargs}
|
{envpython} scripts/dev/freeze.py {posargs}
|
||||||
|
|
||||||
[pytest]
|
[pytest]
|
||||||
norecursedirs = .tox .venv
|
norecursedirs = .tox .venv
|
||||||
|
Loading…
Reference in New Issue
Block a user