Commit Graph

145 Commits

Author SHA1 Message Date
Dmitry Shachnev
28ad1c5847 Remove CompileGrammarCommand, it uses removed sphinx.pycode.pgen2 module 2018-03-01 18:33:42 +03:00
Takeshi KOMIYA
4344fa149c
Merge pull request #4505 from tk0miya/use_flake8-import-order
Use flake8-import-order
2018-01-29 22:13:48 +09:00
Takeshi KOMIYA
6926a3ed91
Merge branch '1.7-release' into use_flake8-import-order 2018-01-28 19:03:31 +09:00
Takeshi KOMIYA
d60ef2d6b2 Fix utils package is installed 2018-01-28 15:11:59 +09:00
Takeshi KOMIYA
9f5c676322 Use flake8-import-order 2018-01-28 01:52:16 +09:00
Stephen Finucane
f3074d1747 setup: Configure flake8 extension as a local plugin
We don't want to install this as a system plugin. Now that flake8 3.5.0
is in the wild, we can use this.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes: #4492
2018-01-26 09:41:50 +00:00
Takeshi KOMIYA
7ba54500fc Fix #4183: doctest: `:pyversion:` option also follows PEP-440 specification 2018-01-08 11:59:50 +09:00
Stephen Finucane
393f59da00 Improve README
We're going to be adding additional badges to this but, before we do
that, we should improve the README and remove a lot of the duplication
that has built up here.

The 'long_description' from 'setup.py' is moved into the README as there
is serious value in displaying this on GitHub, as much as there is value
in including the badges and other content from README.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-19 15:00:06 +00:00
Stephen Finucane
a102e8e29b setup.py: Include 'flake8' in 'test' requirements
We are using this in our testing and actually need it for the flake8
plugin, so include this in the list of 'test' requirements.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-18 19:44:05 +00:00
Stephen Finucane
a5ef67b96a setup: Install mock for Python 3 too
'mock' is part of the standard library in Python 3 since Python 3.3.
However, it's found in 'unittest.mock' - not 'mock'. We should install
the version for PyPi in all cases to minimize differences between the
two. When Python 2.7 support is dropped, we can consider switching to
the standard library version.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes #4284
2017-12-13 19:59:45 +00:00
Takeshi KOMIYA
cfa2eff733 Merge pull request #4120 from stephenfin/the-great-toxification-4
The great toxification (part 4)
2017-10-18 01:48:45 +09:00
Hugo
dd91df0be2 Update classifiers with supported versions 2017-10-11 17:16:15 +03:00
Stephen Finucane
eb8efce7d8 requirements: Reduce duplication
Simply installing packages will ensure that most of the dependencies in
'setup.py' are installed, meaning 'test-reqs.txt' need only contain
those necessary for testing.

The only notable change is that the 'simplejson' module is dropped from
the requirements list. This included as a dependency for the PyPy
target, but it appears that this is not necessary today (though it may
have been when the target was added in 2011).

This retains 'setup.py test' which, as noted in the tox docs [1], is
sometimes expected for downstream distribution testing. We may wish to
find a way to synchronize requirements between 'test-reqs.txt' and this
section in the future, but that's work for another day.

[1] https://tox.readthedocs.io/en/latest/example/basic.html#integration-with-setup-py-test-command

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-10 14:06:10 +01:00
Stephen Finucane
dbd58d4c51 setup.py: Stop caring about pip 1.5.6
This version is silly old and anyone that's _still_ using this is not
going to be building Sphinx from source. Simply remove it.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-10 14:03:48 +01:00
Stephen Finucane
f5c0d64658 utils: Move "header check" to a flake8 plugin
If we want to check style, we run 'tox -e flake8': it shouldn't be
necessary to run some obscure 'make' command too. Make this possible by
moving the sole useful test from the target of this make command to a
flake8 plugin.

This includes a fix for a header that was previously excluded from
checks, but is now included.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-05 17:17:27 +01:00
Stephen Finucane
1f5ed02225 sphinx-quickstart: Move code to 'sphinx.cmd'
We're going to move the executable's here (or at least those that part
of the core library). The 'sphinx-build' executable was already moved,
so lets do 'sphinx-quickstart' next.

To avoid breaking packages that are using this feature directly, aliases
for the old 'main' method are included. This is based on what Django
does [1] and, like Django, will allow us to safely remove the old
modules in Sphinx 2.0.

[1] https://github.com/django/django/blob/1.11/django/test/runner.py#L688-L695

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-02 15:42:23 +01:00
Stephen Finucane
89f9c7cab7 sphinx-build: Move code out of 'sphinx.__init__'
We have multiple executables in tree and, while 'sphinx-build' is
arguably the most important of these, there's no reason its importance
should warrant inclusion at the package level.

Create a new module, 'sphinx.cmd', and move the code from
'sphinx.__init__' into a 'build' submodule within. This name might be a
bit disingenuous at present, given the availability of 'make-mode' here
too, but that's an artifact of the current executable design and can be
cleaned up later.

To avoid breaking packages that are using this feature directly, aliases
for the old 'main' method are included. This is based on what Django
does [1] and, like Django, will allow us to safely remove the old
modules in Sphinx 2.0.

[1] https://github.com/django/django/blob/1.11/django/test/runner.py#L688-L695

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-10-02 15:39:31 +01:00
Stephen Finucane
96cf498c9e apidoc: Move apidoc to ext/apidoc
The 'sphinx-apidoc' tool is no longer the only kid on the block when it
comes to automatic documentation of Python projects, with the likes of
'sphinx-autoapi' in development [1], and is not really maintained. Given
the fact that the tool is tangential to Sphinx's main goal, there isn't
really anything that warrants its continue existence as a core module.

Signify this by moving the feature to 'ext'. This allows the feature to
continue to exist in the package, but indicates that stability might be
worse than one would expect from the core library.

To avoid breaking packages that are using this feature directly, such as
pbr [3], aliases for the old 'main' method are included. This is based
on what Django does and, like Django, will allow us to safely remove the
old modules in Sphinx 2.0.

[1] https://github.com/rtfd/sphinx-autoapi
[2] https://github.com/sphinx-doc/sphinx/pull/3485#issuecomment-288081223
[3] https://github.com/django/django/blob/1.11/django/test/runner.py#L688-L695

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-09-20 13:42:57 +01:00
Takeshi KOMIYA
2d9034d3af Fix flake8 violations 2017-05-26 00:42:28 +09:00
Takeshi KOMIYA
ca6a1edd2f Merge branch 'stable' 2017-05-26 00:15:00 +09:00
Takeshi KOMIYA
180d665b6c setup.py: Add requires for installation from tarball 2017-05-26 00:13:47 +09:00
Takeshi KOMIYA
13a383e061 Refactor setup.py 2017-05-26 00:12:45 +09:00
Julien Schueller
ee286e4f27 Do not require typing module for python>=3.5
pkg_resources.DistributionNotFound: The 'typing' distribution was not found and is required by Sphinx
2017-05-26 00:11:06 +09:00
Julien Schueller
3ea4ed9cad Do not require typing module for python>=3.5
pkg_resources.DistributionNotFound: The 'typing' distribution was not found and is required by Sphinx
2017-05-25 09:48:22 +02:00
Takeshi KOMIYA
0135948485 Fix #3683: sphinx.websupport module is not provided by default 2017-05-03 23:00:03 +09:00
Takeshi KOMIYA
370bdddc7c make websupport-dependency optional 2017-04-29 15:29:51 +09:00
Takeshi KOMIYA
fef9f870d4 Split websupport to sphinxcontrib-websupport package 2017-04-22 17:54:20 +09:00
Brecht Machiels
ce5799a37a Builder entry points require pkg_resources/setuptools 2017-04-10 13:08:33 +02:00
Alexander Shadchin
992a795907 Fix test depend 2017-02-26 15:31:21 +03:00
Takeshi KOMIYA
d33cf04979 Merge branch 'stable' 2017-01-29 18:05:17 +09:00
Takeshi KOMIYA
14a864a637 Support requests-2.0.0 (experimental) (refs: #3367) 2017-01-29 13:15:49 +09:00
Takeshi KOMIYA
5c72b8cf47 Merge branch 'stable' 2017-01-07 15:36:55 +09:00
Takeshi KOMIYA
70cdc7be8f Dependency requirement updates: requests 2.4.0 or above (refs: #3268, #3310) 2017-01-07 14:29:36 +09:00
shimizukawa
0a7d039df5 Merge branch '1.5-release' into master 2016-12-05 23:14:25 +09:00
shimizukawa
37a41be2a2 small fix in setup.py and release-checklist. 2016-12-04 22:03:25 +09:00
Takeshi KOMIYA
db732ac0b8 Prepare to type-check using mypy 2016-11-16 12:05:44 +09:00
Takeshi KOMIYA
3c3c8e7533 Fix flake8 violation 2016-11-16 12:02:40 +09:00
Takeshi KOMIYA
c147f6496e Fix #2919: Drop py26 support 2016-09-15 22:47:47 +09:00
Takeshi KOMIYA
1da1a71511 Drop python 3.3 support 2016-08-30 00:43:15 +09:00
Takeshi KOMIYA
184bedef4b Merge branch 'stable' 2016-08-20 18:06:33 +09:00
Takeshi KOMIYA
dbac9aa8ec Add compile_grammar command to setup.py (ref: #2765) 2016-08-19 20:16:02 +09:00
Julien Schueller
626be8b5f3 Require six 1.5 for html_parser 2016-08-18 09:34:43 +02:00
Takeshi KOMIYA
2ccb75c98f Bundle sphinx/pycode/Grammar-*.pickle (ref: #2765)
So far, sphinx generates the grammar files on demand.
It causes uninstallation does not remove whole of files.
With this fix, Sphinx bundles the files in the package.
2016-07-12 12:15:12 +09:00
Ville Skyttä
e8a8be5788 Handle more file closing with "with" 2016-07-07 18:53:34 +03:00
Avram Lubkin
76b92ad24f Use html5lib to parse HTML in tests instead of XMLParser 2016-05-28 02:51:21 -04:00
Takeshi KOMIYA
2578f47664 Merge branch 'stable' 2016-05-26 20:55:26 +09:00
Dmitry Shachnev
65638c12b8 Make our custom compile_catalog command work with Babel 2.3
In new Babel versions, self.domain is a list rather than a string.
2016-05-17 15:43:59 +03:00
Darragh Bailey
0b9ee8d451 Switch to using requests for better charset detection
Python requests does a better job of detecting the charsets of
webpages, performing automatic decoding when the text content is
requested, avoiding issues around needing to do detection.

This allows checking the following urls & anchors correctly:

    http://www.yaml.org/spec/1.2/spec.html#id2761803
    http://www.yaml.org/spec/1.2/spec.html#id2765878
    http://www.yaml.org/spec/1.2/spec.html#id2765878
2016-04-21 13:20:02 +01:00
Alex Gaynor
7b759b1db7 Removed ez_setup.py
There are no common cases where it will be used anymore:

* pip always installs stuff with setuptools
* Modern pythons preinstall setuptools
2016-02-13 10:14:16 -05:00
Takeshi KOMIYA
fd674ef9f9 Fix #2199: Use `imagesize` package to obtain size of images 2016-02-10 00:46:22 +09:00