Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update helpers v3.2.1 #291

Merged
merged 3 commits into from
Jul 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ matrix:
- env: PYTHON_VERSION=3.6
SETUP_CMD='build_docs -w'
CONDA_CHANNELS='conda-forge astropy'
PIP_DEPENDENCIES='sphinx-astropy'

# Do a test without the optional dependencies
- env: SETUP_CMD='test'
Expand Down
51 changes: 19 additions & 32 deletions ah_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,37 +48,20 @@
from distutils import log
from distutils.debug import DEBUG


try:
from ConfigParser import ConfigParser, RawConfigParser
except ImportError:
from configparser import ConfigParser, RawConfigParser
from configparser import ConfigParser, RawConfigParser

import pkg_resources

from setuptools import Distribution
from setuptools.package_index import PackageIndex

# This is the minimum Python version required for astropy-helpers
__minimum_python_version__ = (2, 7)

if sys.version_info[0] < 3:
_str_types = (str, unicode)
_text_type = unicode
PY3 = False
else:
_str_types = (str, bytes)
_text_type = str
PY3 = True
__minimum_python_version__ = (3, 5)

# TODO: Maybe enable checking for a specific version of astropy_helpers?
DIST_NAME = 'astropy-helpers'
PACKAGE_NAME = 'astropy_helpers'

if PY3:
UPPER_VERSION_EXCLUSIVE = None
else:
UPPER_VERSION_EXCLUSIVE = '3'
UPPER_VERSION_EXCLUSIVE = None

# Defaults for other options
DOWNLOAD_IF_NEEDED = True
Expand Down Expand Up @@ -138,35 +121,39 @@
# allow pre-releases to count as 'new enough'
if not req.specifier.contains(python_version, True):
if parent_package is None:
print("ERROR: Python {} is required by this package".format(req.specifier))
message = "ERROR: Python {} is required by this package\n".format(req.specifier)
else:
print("ERROR: Python {} is required by {}".format(req.specifier, parent_package))
message = "ERROR: Python {} is required by {}\n".format(req.specifier, parent_package)
sys.stderr.write(message)
sys.exit(1)

if sys.version_info < __minimum_python_version__:

if parent_package is None:
print("ERROR: Python {} or later is required by astropy-helpers".format(
__minimum_python_version__))
message = "ERROR: Python {} or later is required by astropy-helpers\n".format(
__minimum_python_version__)
else:
print("ERROR: Python {} or later is required by astropy-helpers for {}".format(
__minimum_python_version__, parent_package))
message = "ERROR: Python {} or later is required by astropy-helpers for {}\n".format(
__minimum_python_version__, parent_package)

sys.stderr.write(message)
sys.exit(1)

_str_types = (str, bytes)


# What follows are several import statements meant to deal with install-time
# issues with either missing or misbehaving pacakges (including making sure
# setuptools itself is installed):

# Check that setuptools 1.0 or later is present
# Check that setuptools 30.3 or later is present
from distutils.version import LooseVersion

try:
import setuptools
assert LooseVersion(setuptools.__version__) >= LooseVersion('1.0')
assert LooseVersion(setuptools.__version__) >= LooseVersion('30.3')
except (ImportError, AssertionError):
print("ERROR: setuptools 1.0 or later is required by astropy-helpers")
sys.stderr.write("ERROR: setuptools 30.3 or later is required by astropy-helpers\n")
sys.exit(1)

# typing as a dependency for 1.6.1+ Sphinx causes issues when imported after
Expand Down Expand Up @@ -225,7 +212,7 @@ def __init__(self, path=None, index_url=None, use_git=None, offline=None,
if not (isinstance(path, _str_types) or path is False):
raise TypeError('path must be a string or False')

if PY3 and not isinstance(path, _text_type):
if not isinstance(path, str):
fs_encoding = sys.getfilesystemencoding()
path = path.decode(fs_encoding) # path to unicode

Expand Down Expand Up @@ -852,9 +839,9 @@ def run_cmd(cmd):
stdio_encoding = 'latin1'

# Unlikely to fail at this point but even then let's be flexible
if not isinstance(stdout, _text_type):
if not isinstance(stdout, str):
stdout = stdout.decode(stdio_encoding, 'replace')
if not isinstance(stderr, _text_type):
if not isinstance(stderr, str):
stderr = stderr.decode(stdio_encoding, 'replace')

return (p.returncode, stdout, stderr)
Expand Down
8 changes: 0 additions & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ environment:
MPLBACKEND: "Agg"

matrix:

# We test Python 2.7 and 3.7 because 2.7 is the supported Python 2
# release of Astropy and Python 3.7 is the latest Python 3 release.

- PYTHON_VERSION: "2.7"
ASTROPY_VERSION: "stable"
NUMPY_VERSION: "1.15"

- PYTHON_VERSION: "3.7"
ASTROPY_VERSION: "stable"
NUMPY_VERSION: "stable"
Expand Down
2 changes: 1 addition & 1 deletion astropy_helpers
Submodule astropy_helpers updated 89 files
+39 −0 .circleci/config.yml
+0 −0 .coveragerc
+3 −2 .gitignore
+10 −0 .readthedocs.yml
+78 −29 .travis.yml
+109 −1 CHANGES.rst
+18 −42 README.rst
+19 −32 ah_bootstrap.py
+7 −9 appveyor.yml
+1 −4 astropy_helpers/__init__.py
+2 −10 astropy_helpers/commands/_dummy.py
+0 −307 astropy_helpers/commands/_test_compat.py
+165 −435 astropy_helpers/commands/build_ext.py
+0 −39 astropy_helpers/commands/build_py.py
+116 −137 astropy_helpers/commands/build_sphinx.py
+0 −14 astropy_helpers/commands/install.py
+0 −14 astropy_helpers/commands/install_lib.py
+0 −53 astropy_helpers/commands/register.py
+0 −5 astropy_helpers/commands/setup_package.py
+14 −36 astropy_helpers/commands/src/compiler.c
+17 −12 astropy_helpers/commands/test.py
+0 −12 astropy_helpers/compat/__init__.py
+9 −3 astropy_helpers/conftest.py
+6 −0 astropy_helpers/distutils_helpers.py
+0 −11 astropy_helpers/extern/__init__.py
+0 −1 astropy_helpers/extern/automodapi/__init__.py
+0 −138 astropy_helpers/extern/automodapi/autodoc_enhancements.py
+0 −438 astropy_helpers/extern/automodapi/automodapi.py
+0 −694 astropy_helpers/extern/automodapi/automodsumm.py
+0 −107 astropy_helpers/extern/automodapi/smart_resolver.py
+0 −10 astropy_helpers/extern/automodapi/templates/autosummary_core/base.rst
+0 −65 astropy_helpers/extern/automodapi/templates/autosummary_core/class.rst
+0 −41 astropy_helpers/extern/automodapi/templates/autosummary_core/module.rst
+0 −214 astropy_helpers/extern/automodapi/utils.py
+0 −8 astropy_helpers/extern/numpydoc/__init__.py
+0 −624 astropy_helpers/extern/numpydoc/docscrape.py
+0 −425 astropy_helpers/extern/numpydoc/docscrape_sphinx.py
+0 −325 astropy_helpers/extern/numpydoc/numpydoc.py
+0 −16 astropy_helpers/extern/numpydoc/templates/numpydoc_docstring.rst
+0 −4 astropy_helpers/extern/setup_package.py
+2 −0 astropy_helpers/git_helpers.py
+230 −29 astropy_helpers/openmp_helpers.py
+97 −83 astropy_helpers/setup_helpers.py
+0 −8 astropy_helpers/sphinx/__init__.py
+2 −340 astropy_helpers/sphinx/conf.py
+0 −2 astropy_helpers/sphinx/ext/__init__.py
+0 −92 astropy_helpers/sphinx/ext/changelog_links.py
+0 −56 astropy_helpers/sphinx/ext/doctest.py
+0 −168 astropy_helpers/sphinx/ext/edit_on_github.py
+ astropy_helpers/sphinx/local/python2_local_links.inv
+0 −25 astropy_helpers/sphinx/local/python2_local_links.txt
+ astropy_helpers/sphinx/local/python3_local_links.inv
+0 −38 astropy_helpers/sphinx/local/python3_local_links.txt
+0 −10 astropy_helpers/sphinx/setup_package.py
+0 −3 astropy_helpers/sphinx/themes/bootstrap-astropy/globaltoc.html
+0 −96 astropy_helpers/sphinx/themes/bootstrap-astropy/layout.html
+0 −3 astropy_helpers/sphinx/themes/bootstrap-astropy/localtoc.html
+0 −7 astropy_helpers/sphinx/themes/bootstrap-astropy/searchbox.html
+0 −75 astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_linkout.svg
+ astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_linkout_20.png
+ astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_logo.ico
+0 −87 astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_logo.svg
+ astropy_helpers/sphinx/themes/bootstrap-astropy/static/astropy_logo_32.png
+0 −601 astropy_helpers/sphinx/themes/bootstrap-astropy/static/bootstrap-astropy.css
+0 −63 astropy_helpers/sphinx/themes/bootstrap-astropy/static/copybutton.js
+0 −160 astropy_helpers/sphinx/themes/bootstrap-astropy/static/sidebar.js
+0 −10 astropy_helpers/sphinx/themes/bootstrap-astropy/theme.conf
+0 −13 astropy_helpers/test_helpers.py
+3 −0 astropy_helpers/tests/__init__.py
+57 −16 astropy_helpers/tests/test_git_helpers.py
+32 −3 astropy_helpers/tests/test_openmp_helpers.py
+41 −208 astropy_helpers/tests/test_setup_helpers.py
+16 −566 astropy_helpers/utils.py
+94 −37 astropy_helpers/version_helpers.py
+19 −0 docs/Makefile
+22 −0 docs/advanced.rst
+14 −0 docs/api.rst
+273 −0 docs/basic.rst
+52 −0 docs/conf.py
+29 −0 docs/developers.rst
+36 −0 docs/index.rst
+12 −0 docs/known_issues.rst
+35 −0 docs/make.bat
+28 −0 docs/updating.rst
+53 −0 docs/using.rst
+0 −50 licenses/LICENSE_COPYBUTTON.rst
+0 −94 licenses/LICENSE_NUMPYDOC.rst
+34 −0 setup.cfg
+12 −44 setup.py