gecko-dev/servo/python/tidy
Xidorn Quan 7c5d675d77 servo: Merge #20227 - Fix `mach build` for Servo in Firefox tree (from upsuper:in-firefox-build); r=jdm
Running `mach build` in servo directory in Firefox tree currently doesn't work due to several errors when importing modules.

First error:
```text
Traceback (most recent call last):
  File "mach", line 93, in <module>
    main(sys.argv)
  File "mach", line 23, in main
    mach = mach_bootstrap.bootstrap(topdir)
  File "servo/python/mach_bootstrap.py", line 280, in bootstrap
    mach.load_commands_from_file(os.path.join(topdir, path))
  File "servo/python/_virtualenv/Lib/site-packages/mach/main.py", line 265, in load_commands_from_file
    imp.load_source(module_name, path)
  File "servo/python/servo/testing_commands.py", line 42, in <module>
    from update import updatecommandline
  File "servo/../testing/web-platform/update/__init__.py", line 17, in <module>
    from wptrunner.update import setup_logging, WPTUpdate
  File "servo/../testing/web-platform/tests/tools/wptrunner/wptrunner/update/__init__.py", line 8, in <module>
    from update import WPTUpdate
  File "servo/../testing/web-platform/tests/tools/wptrunner/wptrunner/update/update.py", line 8, in <module>
    from .. import environment as env
  File "servo/../testing/web-platform/tests/tools/wptrunner/wptrunner/environment.py", line 12, in <module>
    from wptserve.handlers import StringHandler
ImportError: No module named wptserve.handlers
```

Second error:
```text
Traceback (most recent call last):
  File "mach", line 93, in <module>
    main(sys.argv)
  File "mach", line 23, in main
    mach = mach_bootstrap.bootstrap(topdir)
  File "servo/python/mach_bootstrap.py", line 291, in bootstrap
    mach.load_commands_from_file(os.path.join(topdir, path))
  File "servo/python/_virtualenv/Lib/site-packages/mach/main.py", line 265, in load_commands_from_file
    imp.load_source(module_name, path)
  File "servo/python/servo/testing_commands.py", line 43, in <module>
    from servo_tidy import tidy
  File "servo/python/tidy/servo_tidy/tidy.py", line 34, in <module>
    from wptmanifest import parser, node
ImportError: No module named wptmanifest
```

The two commits fix these two errors respectively.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4e2f8ec8e162fe707240eff223ec225790bf29fd

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : fd8d95aa6ee79b994cdf8a6ca6f948ac3ba725b3
2018-03-07 09:19:25 -05:00
..
servo_tidy servo: Merge #20227 - Fix `mach build` for Servo in Firefox tree (from upsuper:in-firefox-build); r=jdm 2018-03-07 09:19:25 -05:00
servo_tidy_tests servo: Merge #19929 - Verify that all values in include.ini represent real directories (from terracotaPie:master); r=jdm 2018-02-03 22:39:23 -05:00
HISTORY.rst servo: Merge #15731 - Update `servo-tidy` to 0.3.0 (from UK992:tidy); r=Wafflespeanut 2017-02-25 06:41:05 -08:00
Makefile servo: Merge #10653 - Cleanup tidy for external deps (from askeing:cleanup_tidy_for_external_deps); r=edunham 2016-04-19 01:52:01 +05:01
README.rst servo: Merge #15731 - Update `servo-tidy` to 0.3.0 (from UK992:tidy); r=Wafflespeanut 2017-02-25 06:41:05 -08:00
setup.py servo: Merge #15731 - Update `servo-tidy` to 0.3.0 (from UK992:tidy); r=Wafflespeanut 2017-02-25 06:41:05 -08:00

README.rst

servo_tidy
==========

Servo's code and license checker.

Installation
++++++++++++

Install from PyPI:

::

  pip install servo-tidy

or from git:

::

  pip install -e git+https://github.com/servo/servo.git#egg=servo_tidy&subdirectory=python/tidy

To run the tests
++++++++++++++++

::

  ./mach test-tidy --self-test