parent
e19efcf8a8
commit
be3f61af62
@ -7,7 +7,7 @@ environment:
|
||||
PYTHONUNBUFFERED: 1
|
||||
|
||||
install:
|
||||
- C:\Python27\python -u scripts\ci_install.py
|
||||
- C:\Python27\python -u scripts\dev\ci_install.py
|
||||
|
||||
test_script:
|
||||
- C:\Python34\Scripts\tox -e smoke
|
||||
|
@ -8,7 +8,7 @@ os:
|
||||
language: c
|
||||
|
||||
install:
|
||||
- python scripts/ci_install.py
|
||||
- python scripts/dev/ci_install.py
|
||||
|
||||
script:
|
||||
- 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 qutebrowser.py
|
||||
|
||||
include scripts/__init__.py
|
||||
include scripts/hostblock_blame.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
|
||||
|
||||
prune scripts/dev
|
||||
exclude scripts/asciidoc2html.py
|
||||
exclude doc/notes
|
||||
recursive-exclude doc *.asciidoc
|
||||
include doc/qutebrowser.1.asciidoc
|
||||
|
@ -1,3 +1,3 @@
|
||||
# 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 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
|
||||
from scripts import utils
|
@ -27,7 +27,8 @@ import glob
|
||||
import shutil
|
||||
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
|
||||
|
@ -32,12 +32,13 @@ import distutils
|
||||
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.
|
||||
|
||||
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
|
||||
|
||||
|
||||
BASEDIR = os.path.join(os.path.dirname(os.path.realpath(__file__)),
|
||||
os.path.pardir)
|
||||
os.path.pardir, os.path.pardir)
|
||||
|
||||
|
||||
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.
|
||||
import pytest
|
||||
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir))
|
||||
from scripts import setupcommon, freeze
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir,
|
||||
os.pardir))
|
||||
from scripts import setupcommon
|
||||
from scripts.dev import freeze
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def temp_git_commit_file():
|
||||
"""Context manager to temporarily create a fake git-commit-id 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')
|
||||
with open(path, 'wb') as f:
|
||||
f.write(b'fake-frozen-git-commit')
|
||||
@ -59,7 +61,7 @@ def main():
|
||||
"""Main entry point."""
|
||||
with temp_git_commit_file():
|
||||
cx.setup(
|
||||
executables=[cx.Executable('scripts/run_frozen_tests.py',
|
||||
executables=[cx.Executable('scripts/dev/run_frozen_tests.py',
|
||||
targetName='run-frozen-tests')],
|
||||
options={'build_exe': get_build_exe_options()},
|
||||
**setupcommon.setupdata
|
@ -30,7 +30,8 @@ import tokenize
|
||||
import traceback
|
||||
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
|
||||
|
||||
@ -88,7 +89,7 @@ def check_spelling():
|
||||
ok = True
|
||||
for fn in _py_files():
|
||||
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
|
||||
for line in f:
|
||||
for w in words:
|
@ -28,7 +28,8 @@ from pylint import interfaces, checkers
|
||||
from pylint.checkers import utils
|
||||
|
||||
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
|
||||
|
@ -28,7 +28,8 @@ import tempfile
|
||||
import subprocess
|
||||
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
|
||||
|
@ -29,7 +29,8 @@ import sys
|
||||
import os.path
|
||||
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
|
||||
|
@ -26,7 +26,8 @@ import sys
|
||||
import subprocess
|
||||
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
|
||||
|
@ -31,7 +31,8 @@ import collections
|
||||
import tempfile
|
||||
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.
|
||||
import qutebrowser.app
|
16
tox.ini
16
tox.ini
@ -40,7 +40,7 @@ deps =
|
||||
cx_Freeze==4.3.4
|
||||
commands =
|
||||
{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}
|
||||
|
||||
[testenv:coverage]
|
||||
@ -56,13 +56,13 @@ commands =
|
||||
|
||||
[testenv:misc]
|
||||
commands =
|
||||
{envpython} scripts/misc_checks.py git
|
||||
{envpython} scripts/misc_checks.py vcs
|
||||
{envpython} scripts/misc_checks.py spelling
|
||||
{envpython} scripts/dev/misc_checks.py git
|
||||
{envpython} scripts/dev/misc_checks.py vcs
|
||||
{envpython} scripts/dev/misc_checks.py spelling
|
||||
|
||||
[testenv:pylint]
|
||||
skip_install = true
|
||||
setenv = PYTHONPATH={toxinidir}/scripts
|
||||
setenv = PYTHONPATH={toxinidir}/scripts/dev
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
astroid==1.3.6
|
||||
@ -73,7 +73,7 @@ deps =
|
||||
commands =
|
||||
{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} 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]
|
||||
skip_install = true
|
||||
@ -167,7 +167,7 @@ deps =
|
||||
cx_Freeze==4.3.4
|
||||
commands =
|
||||
{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"
|
||||
|
||||
[testenv:cxfreeze-windows]
|
||||
@ -178,7 +178,7 @@ skip_install = true
|
||||
deps = {[testenv:smoke-frozen]deps}
|
||||
commands =
|
||||
{envpython} scripts/link_pyqt.py --tox {envdir}
|
||||
{envpython} scripts/freeze.py {posargs}
|
||||
{envpython} scripts/dev/freeze.py {posargs}
|
||||
|
||||
[pytest]
|
||||
norecursedirs = .tox .venv
|
||||
|
Loading…
Reference in New Issue
Block a user