Skip to content

Commit

Permalink
Merge pull request #1377 from twisted/9509-extra-extra-read-all-about…
Browse files Browse the repository at this point in the history
…-hamcrest

Author: twm
Reviewer: glyph, adiroiban
Fixes: ticket:9509

Move PyHamcrest dependency to [test] extra
  • Loading branch information
twm committed Oct 20, 2020
2 parents f6980e3 + 1b2b086 commit 7211555
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
# git blame --ignore-revs-file .git-blame-ignore-revs ...
#
# Note that these features require Git 2.23 (released August 2019).
03cabb7f55d54e2b09eefd0e03df2d440f962bc4
bc96c774be6e307e8e3e4d39780d37b045d0973a
6 changes: 4 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ install_requires =
incremental >= 16.10.1
Automat >= 0.8.0
hyperlink >= 17.1.1
PyHamcrest >= 1.9.0
attrs >= 19.2.0
setup_requires = incremental >= 16.10.1
include_package_data = True
Expand All @@ -39,6 +38,9 @@ package_dir = =src
packages = find:

[options.extras_require]
test =
cython-test-exception-raiser ~= 1.0
PyHamcrest >= 1.9.0
dev =
pyflakes >= 1.0.0
twisted-dev-tools >= 0.0.2
Expand Down Expand Up @@ -75,7 +77,7 @@ http2 =
contextvars =
contextvars >= 2.4, < 3; python_version < "3.7"
all_non_platform =
cython-test-exception-raiser ~= 1.0
%(test)s
%(tls)s
%(conch)s
%(serial)s
Expand Down
1 change: 1 addition & 0 deletions src/twisted/newsfragments/9509.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Twisted's dependency on PyHamcrest has been moved from the base package to the new "test" extra. Consequently the test extra must be installed for Twisted's test suite to pass.
7 changes: 4 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
; same environment:
;
; * alldeps - install all possible dependencies.
; * nodeps - avoid installing any dependency.
; * nodeps - avoid installing any dependencies apart from testing tools.
; * withcov - run the tests wrapped using the coverage.
; * nocov - run the tests directly, without using the coverage wrapper.
; * wheel - build the wheel distribution
Expand Down Expand Up @@ -45,6 +45,9 @@ sources = setup.py src/ docs/conch/examples docs/mail/examples docs/names/exampl
[testenv]
;; dependencies managed by extras in setup.cfg
extras =
; The "nodeps" build still depends on PyHamcrest.
nodeps: test

alldeps: all_non_platform

windows: windows_platform
Expand Down Expand Up @@ -116,8 +119,6 @@ commands =
;
python {toxinidir}/admin/dump_all_version_info.py

# We need to define nodeps *somewhere* so tox recognises it
nodeps: python -c "print('No dependencies installed...')"
posix: python -c "print('Running on POSIX (no special dependencies)')"

; Run tests without wrapping them using coverage.
Expand Down

0 comments on commit 7211555

Please sign in to comment.